summaryrefslogtreecommitdiff
path: root/src/envshortcut.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/envshortcut.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/envshortcut.cpp')
-rw-r--r--src/envshortcut.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/envshortcut.cpp b/src/envshortcut.cpp
index b13a7d9f..4c50a20e 100644
--- a/src/envshortcut.cpp
+++ b/src/envshortcut.cpp
@@ -145,11 +145,13 @@ Shortcut::Shortcut()
Shortcut::Shortcut(const Executable& exe)
: Shortcut()
{
+ const auto i = *InstanceManager::singleton().currentInstance();
+
m_name = exe.title();
m_target = QFileInfo(qApp->applicationFilePath()).absoluteFilePath();
m_arguments = QString("\"moshortcut://%1:%2\"")
- .arg(InstanceManager::singleton().currentInstance()->name())
+ .arg(i.isPortable() ? "" : i.displayName())
.arg(exe.title());
m_description = QString("Run %1 with ModOrganizer").arg(exe.title());