summaryrefslogtreecommitdiff
path: root/src/instancemanager.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2021-02-12 03:22:52 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2021-02-12 03:22:52 -0500
commit48274f33579076711c0475e84c7adf68c52df733 (patch)
tree51e564e682430179920b7ab937a5f66c27e0645f /src/instancemanager.cpp
parent7d36bc20d0a6c327079141149a7f138c0f7726ac (diff)
- renamed instance::name() to displayName() to reduce confusion with portable instances
- better errors when running incorrect shortcuts - fixed shortcuts being created with moshortcut://Portable:exe instead of an empty instance name for portable instances
Diffstat (limited to 'src/instancemanager.cpp')
-rw-r--r--src/instancemanager.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/instancemanager.cpp b/src/instancemanager.cpp
index 8add4af8..a1b17577 100644
--- a/src/instancemanager.cpp
+++ b/src/instancemanager.cpp
@@ -48,7 +48,7 @@ Instance::Instance(QString dir, bool portable, QString profileName) :
{
}
-QString Instance::name() const
+QString Instance::displayName() const
{
if (isPortable())
return QObject::tr("Portable");
@@ -105,7 +105,7 @@ bool Instance::isActive() const
if (m_portable) {
return i->isPortable();
} else {
- return (i->name() == name());
+ return (i->displayName() == displayName());
}
}
@@ -822,7 +822,7 @@ SetupInstanceResults selectGame(Instance& instance, PluginContainer& pc)
CreateInstanceDialog dlg(pc, nullptr);
// only show the game page
- dlg.setSinglePage<cid::GamePage>(instance.name());
+ dlg.setSinglePage<cid::GamePage>(instance.displayName());
dlg.show();
dlg.activateWindow();
@@ -860,7 +860,7 @@ SetupInstanceResults selectVariant(Instance& instance, PluginContainer& pc)
instance.gamePlugin(), instance.gameDirectory());
// only show the variant page
- dlg.setSinglePage<cid::VariantsPage>(instance.name());
+ dlg.setSinglePage<cid::VariantsPage>(instance.displayName());
dlg.show();
dlg.activateWindow();
@@ -897,7 +897,7 @@ SetupInstanceResults setupInstance(Instance& instance, PluginContainer& pc)
reportError(
QObject::tr("Cannot open instance '%1', failed to read INI file %2.")
- .arg(instance.name()).arg(instance.iniPath()));
+ .arg(instance.displayName()).arg(instance.iniPath()));
return SetupInstanceResults::SelectAnother;
}
@@ -914,7 +914,7 @@ SetupInstanceResults setupInstance(Instance& instance, PluginContainer& pc)
QObject::tr(
"Cannot open instance '%1', the managed game was not found in the INI "
"file %2. Select the game managed by this instance.")
- .arg(instance.name()).arg(instance.iniPath()));
+ .arg(instance.displayName()).arg(instance.iniPath()));
return selectGame(instance, pc);
}
@@ -928,7 +928,7 @@ SetupInstanceResults setupInstance(Instance& instance, PluginContainer& pc)
QObject::tr(
"Cannot open instance '%1', the game plugin '%2' doesn't exist. It "
"may have been deleted by an antivirus. Select another instance.")
- .arg(instance.name()).arg(instance.gameName()));
+ .arg(instance.displayName()).arg(instance.gameName()));
return SetupInstanceResults::SelectAnother;
}
@@ -943,7 +943,7 @@ SetupInstanceResults setupInstance(Instance& instance, PluginContainer& pc)
"Cannot open instance '%1', the game directory '%2' doesn't exist or "
"the game plugin '%3' doesn't recognize it. Select the game managed "
"by this instance.")
- .arg(instance.name())
+ .arg(instance.displayName())
.arg(instance.gameDirectory())
.arg(instance.gameName()));