summaryrefslogtreecommitdiff
path: root/src/instancemanager.cpp
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2021-02-12 18:09:15 +0100
committerGitHub <noreply@github.com>2021-02-12 18:09:15 +0100
commit607fafa364a1f3935b289172e3291eafed13014b (patch)
treea4695ea1507a8c25fada52617ff4e2b7d58e9ae3 /src/instancemanager.cpp
parent7dc28b10d9ed4cd4af15eeaca89b50996d6fd27d (diff)
parent48274f33579076711c0475e84c7adf68c52df733 (diff)
Merge pull request #1408 from isanae/portable-shortcuts
Fixes for portable shortcuts
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()));