Changeset 33 in tspsg-svn for trunk/src/mainwindow.cpp
- Timestamp:
- Jun 30, 2009, 7:14:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mainwindow.cpp
r31 r33 196 196 { 197 197 QPrintDialog pd(printer,this); 198 #if QT_VERSION >= 0x040500 199 // No such methods in Qt < 4.5 198 200 pd.setOption(QAbstractPrintDialog::PrintSelection,false); 199 201 pd.setOption(QAbstractPrintDialog::PrintPageRange,false); 202 #endif 200 203 pd.exec(); 201 204 } … … 253 256 { 254 257 QSettings langinfo("i18n/languages.ini",QSettings::IniFormat); 258 #if QT_VERSION >= 0x040500 259 // In Qt < 4.5 QSettings doesn't have method setIniCodec. 255 260 langinfo.setIniCodec("UTF-8"); 261 #endif 256 262 QDir dir("i18n","*.qm",QDir::Name | QDir::IgnoreCase,QDir::Files); 257 263 if (!dir.exists()) … … 264 270 QFileInfo lang = langs.at(k); 265 271 if (!lang.completeBaseName().startsWith("qt_") && lang.completeBaseName().compare("en")) { 272 #if QT_VERSION >= 0x040500 266 273 a = menuSettingsLanguage->addAction(langinfo.value(lang.completeBaseName() + "/NativeName",lang.completeBaseName()).toString()); 274 #else 275 // We use Name if Qt < 4.5 because NativeName is in UTF-8, QSettings 276 // reads .ini file as ASCII and there is no way to set file encoding. 277 a = menuSettingsLanguage->addAction(langinfo.value(lang.completeBaseName() + "/Name",lang.completeBaseName()).toString()); 278 #endif 267 279 a->setData(lang.completeBaseName()); 268 280 a->setCheckable(true);
Note: See TracChangeset
for help on using the changeset viewer.