From b7cb63ddb1e2b263d5e485c97faea527c7c0af44 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 6 Nov 2020 11:37:12 -0500 Subject: removed some redundant functions in InstanceManager, made them all non-static documentation --- src/main.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index e56197c9..7f0886f6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -280,7 +280,7 @@ std::optional selectInstance() PluginContainer pc(nullptr); pc.loadPlugins(); - if (m.instancePaths().empty() && !m.portableInstanceExists()) { + if (!m.hasAnyInstances()) { // no instances configured CreateInstanceDialog dlg(pc, nullptr); if (dlg.exec() != QDialog::Accepted) { @@ -454,10 +454,6 @@ int runApplication( log::info("data path: {}", dataPath); - if (InstanceManager::isPortablePath(dataPath)) { - log::debug("this is a portable instance"); - } - log::info("working directory: {}", QDir::currentPath()); if (!instance.secondary()) { @@ -529,6 +525,10 @@ int runApplication( } } + if (currentInstance.isPortable()) { + log::debug("this is a portable instance"); + } + checkPathsForSanity(*currentInstance.gamePlugin(), settings); organizer.setManagedGame(currentInstance.gamePlugin()); @@ -665,13 +665,13 @@ int doOneRun( if (!currentInstance->directory().exists()) { // the previously used instance doesn't exist anymore - if (m.instanceNames().empty() && !m.portableInstanceExists()) { + if (m.hasAnyInstances()) { criticalOnTop(QObject::tr( - "Instance at '%1' not found. You must create a new instance") - .arg(currentInstance->directory().absolutePath())); + "Instance at '%1' not found. Select another instance.") + .arg(currentInstance->directory().absolutePath())); } else { criticalOnTop(QObject::tr( - "Instance at '%1' not found. Select another instance.") + "Instance at '%1' not found. You must create a new instance") .arg(currentInstance->directory().absolutePath())); } -- cgit v1.3.1