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
commit93bd29c13d3355b2544c2fd40dff1f4f985f9b57 (patch)
tree9f07f3c0e7d9e9bac8a27d511e6dfdd06f42344b /src/main.cpp
parent637ce6bcc1b10198eb2a21570b6a97e122814f55 (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 3198208a..642bfa1a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -455,14 +455,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) {
@@ -475,7 +470,7 @@ int main(int argc, char *argv[])
}
}
}
-
+#pragma message("edition isn't used?")
qDebug("managing game at %s", qPrintable(QDir::toNativeSeparators(gamePath)));
ExecutablesList executablesList;