summaryrefslogtreecommitdiff
path: root/src/envshortcut.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/envshortcut.cpp
parent7dc28b10d9ed4cd4af15eeaca89b50996d6fd27d (diff)
parent48274f33579076711c0475e84c7adf68c52df733 (diff)
Merge pull request #1408 from isanae/portable-shortcuts
Fixes for portable shortcuts
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());