Changeset 140912822f in tspsg for src
- Timestamp:
- Jun 30, 2009, 7:14:52 PM (15 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- c02b4903bd
- Parents:
- 2b9257627c
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main.cpp
r2b9257627c r140912822f 27 27 { 28 28 QApplication app(argc, argv); 29 QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf8")); 30 QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8")); 31 QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8")); 29 32 app.setOrganizationName("..::Lёppsville::.."); 30 33 app.setOrganizationDomain("www.leppsville.com"); 31 34 app.setApplicationName("TSPSG"); 32 QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));33 35 MainWindow mainwindow; 34 36 mainwindow.show(); -
src/mainwindow.cpp
r2b9257627c r140912822f 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.