# HG changeset patch # User unc0rr # Date 1358185024 -14400 # Node ID 2aaa2995a32e574bc8d60d7a2068b70ec7538c43 # Parent 9e8924ff981360fc9a546fb24ff4942c821aacdf - Fix another ton of bugs and misbehavior - Try my fix to grey colors problem diff -r 9e8924ff9813 -r 2aaa2995a32e QTfrontend/gameuiconfig.cpp --- a/QTfrontend/gameuiconfig.cpp Mon Jan 14 21:17:42 2013 +0400 +++ b/QTfrontend/gameuiconfig.cpp Mon Jan 14 21:37:04 2013 +0400 @@ -156,7 +156,7 @@ { // load colors QStandardItemModel * model = DataManager::instance().colorsModel(); for(int i = model->rowCount() - 1; i >= 0; --i) - model->item(i)->setData(QColor(value(QString("colors/color%1").arg(i), model->item(i)->data().value()).value())); + model->item(i)->setData(value(QString("colors/color%1").arg(i), model->item(i)->data())); } { // load binds diff -r 9e8924ff9813 -r 2aaa2995a32e QTfrontend/model/MapModel.cpp --- a/QTfrontend/model/MapModel.cpp Mon Jan 14 21:17:42 2013 +0400 +++ b/QTfrontend/model/MapModel.cpp Mon Jan 14 21:37:04 2013 +0400 @@ -49,18 +49,14 @@ //QList missionMaps; QList mapList; - // only 2 map relate files are relevant: - // - the cfg file that contains the settings/info of the map - // - the lua file - if it exists it's a mission, otherwise it isn't - QFile mapLuaFile; - QFile mapCfgFile; - // add mission/static maps to lists foreach (QString map, maps) { - mapCfgFile.setFileName(QString("physfs://Maps/%1/map.cfg").arg(map)); - mapLuaFile.setFileName(QString("physfs://Maps/%1/map.lua").arg(map)); - QSettings descSettings(QString("physfs://Maps/%1/desc.txt").arg(map), QSettings::IniFormat); + // only 2 map relate files are relevant: + // - the cfg file that contains the settings/info of the map + // - the lua file - if it exists it's a mission, otherwise it isn't + QFile mapLuaFile(QString("physfs://Maps/%1/map.lua").arg(map)); + QFile mapCfgFile(QString("physfs://Maps/%1/map.cfg").arg(map)); if (mapCfgFile.open(QFile::ReadOnly)) { @@ -92,6 +88,8 @@ if (isMission) { QString locale = HWApplication::keyboardInputLocale().name(); + + QSettings descSettings(QString("physfs://Maps/%1/desc.txt").arg(map), QSettings::IniFormat); desc = descSettings.value(locale, QString()).toString().replace("|", "\n"); } diff -r 9e8924ff9813 -r 2aaa2995a32e QTfrontend/ui/page/pageoptions.cpp --- a/QTfrontend/ui/page/pageoptions.cpp Mon Jan 14 21:17:42 2013 +0400 +++ b/QTfrontend/ui/page/pageoptions.cpp Mon Jan 14 21:37:04 2013 +0400 @@ -682,7 +682,7 @@ connect(btnDefaults, SIGNAL(clicked()), this, SLOT(setDefaultOptions())); #endif - connect(this, SIGNAL(pageEnter()), this, SLOT(setTeamOptionsEnabled())); + //connect(this, SIGNAL(pageEnter()), this, SLOT(setTeamOptionsEnabled())); connect(SLQuality, SIGNAL(valueChanged(int)), this, SLOT(setQuality(int))); connect(CBResolution, SIGNAL(currentIndexChanged(int)), this, SLOT(setResolution(int))); connect(CBFullscreen, SIGNAL(stateChanged(int)), this, SLOT(setFullscreen(int))); diff -r 9e8924ff9813 -r 2aaa2995a32e QTfrontend/ui/widget/feedbackdialog.cpp --- a/QTfrontend/ui/widget/feedbackdialog.cpp Mon Jan 14 21:17:42 2013 +0400 +++ b/QTfrontend/ui/widget/feedbackdialog.cpp Mon Jan 14 21:37:04 2013 +0400 @@ -252,11 +252,12 @@ #ifdef Q_WS_X11 number_of_cores += QString::number(sysconf(_SC_NPROCESSORS_ONLN)) + "\n"; long pages = sysconf(_SC_PHYS_PAGES), +/* #ifndef Q_OS_FREEBSD available_pages = sysconf(_SC_AVPHYS_PAGES), #else available_pages = 0, -#endif +#endif*/ page_size = sysconf(_SC_PAGE_SIZE); total_ram += QString::number(pages * page_size) + "\n"; os_version += "GNU/Linux or BSD\n"; @@ -479,4 +480,4 @@ header.setRawHeader("Content-Length", QString::number(body.size()).toAscii()); nam->post(header, body); -} \ No newline at end of file +} diff -r 9e8924ff9813 -r 2aaa2995a32e QTfrontend/ui/widget/flowlayout.cpp --- a/QTfrontend/ui/widget/flowlayout.cpp Mon Jan 14 21:17:42 2013 +0400 +++ b/QTfrontend/ui/widget/flowlayout.cpp Mon Jan 14 21:37:04 2013 +0400 @@ -187,4 +187,4 @@ } else { return static_cast(parent)->spacing(); } - } \ No newline at end of file + } diff -r 9e8924ff9813 -r 2aaa2995a32e QTfrontend/ui/widget/seedprompt.cpp --- a/QTfrontend/ui/widget/seedprompt.cpp Mon Jan 14 21:17:42 2013 +0400 +++ b/QTfrontend/ui/widget/seedprompt.cpp Mon Jan 14 21:37:04 2013 +0400 @@ -82,4 +82,4 @@ void SeedPrompt::setSeed() { emit seedSelected(editBox->text()); -} \ No newline at end of file +} diff -r 9e8924ff9813 -r 2aaa2995a32e QTfrontend/util/MessageDialog.cpp --- a/QTfrontend/util/MessageDialog.cpp Mon Jan 14 21:17:42 2013 +0400 +++ b/QTfrontend/util/MessageDialog.cpp Mon Jan 14 21:37:04 2013 +0400 @@ -36,4 +36,4 @@ msgMsg.setText(msg); msgMsg.setWindowModality(Qt::WindowModal); return msgMsg.exec(); -} \ No newline at end of file +}