summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-09-24 19:51:51 +0200
committerTannin <devnull@localhost>2014-09-24 19:51:51 +0200
commita62ecc5bf1e92e6dd2ba8e6e61a797641c254d92 (patch)
tree5e3538861b2768a1c16b3daf7f073e05b5764059 /src/main.cpp
parent5f1022917b655650f842dc8f34967716081685ef (diff)
- several style fixes suggested by static analysis
- will now support up to 4 levels of version numbers (major.minor.subminor.subsubminor
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1ae3e932..84efc65f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -447,14 +447,9 @@ int main(int argc, char *argv[])
settings.setValue("gamePath", gamePath.toUtf8().constData());
}
- int edition = 0;
- if (settings.contains("game_edition")) {
- edition = settings.value("game_edition").toInt();
- } else {
+ if (!settings.contains("game_edition")) {
std::vector<std::wstring> editions = GameInfo::instance().getSteamVariants();
- if (editions.size() < 2) {
- edition = 0;
- } else {
+ if (editions.size() > 1) {
SelectionDialog selection(QObject::tr("Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!)"), NULL);
int index = 0;
for (auto iter = editions.begin(); iter != editions.end(); ++iter) {
@@ -467,7 +462,7 @@ int main(int argc, char *argv[])
}
}
}
-
+#pragma message("edition isn't used?")
qDebug("managing game at %s", qPrintable(QDir::toNativeSeparators(gamePath)));
ExecutablesList executablesList;