From 48274f33579076711c0475e84c7adf68c52df733 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 12 Feb 2021 03:22:52 -0500 Subject: - 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 --- src/envshortcut.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/envshortcut.cpp') 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()); -- cgit v1.3.1