Let LyX compile again against Qt 3.0

* src/frontends/qt2/qt_helpers.C (toqstr): use fromAscii only
	with Qt 3.1 and higher.

	* src/frontends/qt2/QLyXKeySym.C (initEncodings): use
	setCodecForCStrings only with Qt 3.1 and higher.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15011 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2006-09-15 15:22:55 +00:00
parent 73da83f89e
commit 8b485bbd97
3 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2006-09-15 Enrico Forestieri <forenr@tlc.unipr.it>
* qt_helpers.C (toqstr): use fromAscii only with Qt 3.1 and higher.
* QLyXKeySym.C (initEncodings): use setCodecForCStrings only with
Qt 3.1 and higher.
2006-08-19 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* QContentPane.C (focusInEvent, focusOutEvent): new methods;

View File

@ -130,7 +130,9 @@ void initEncodings()
QTextCodec * defaultCodec = encoding_map[s];
encoding_map[""] = defaultCodec;
#if QT_VERSION >= 0x030100
QTextCodec::setCodecForCStrings(defaultCodec);
#endif
}

View File

@ -116,7 +116,11 @@ void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
QString const toqstr(char const * str)
{
#if QT_VERSION >= 0x030100
return QString::fromAscii(str);
#else
return QString::fromLatin1(str);
#endif
}