From d43f35f56bc2d9164b6fe9aa5591eef287bebe07 Mon Sep 17 00:00:00 2001 From: Eran Mizrahi Date: Sun, 10 Dec 2017 23:33:01 +0200 Subject: Run shortcuts using moshortcut:// to avoid command line problems --- src/mainwindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1db895fc..632b64e9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3199,11 +3199,10 @@ void MainWindow::addWindowsLink(const ShortcutType mapping) QString executable = QDir::toNativeSeparators(selectedExecutable.m_BinaryInfo.absoluteFilePath()); std::wstring targetFile = ToWString(exeInfo.absoluteFilePath()); - std::wstring parameter = ToWString(QString("\"%1\" %2").arg(executable) - .arg(selectedExecutable.m_Arguments)); - std::wstring description = ToWString(selectedExecutable.m_BinaryInfo.fileName()); + std::wstring parameter = ToWString(QString("\"moshortcut://%1\"").arg(selectedExecutable.m_Title)); + std::wstring description = ToWString(QString("Run %1 with ModOrganizer").arg(selectedExecutable.m_Title)); std::wstring iconFile = ToWString(executable); - std::wstring currentDirectory = ToWString(QDir::toNativeSeparators(exeInfo.absolutePath())); + std::wstring currentDirectory = ToWString(QDir::toNativeSeparators(qApp->applicationDirPath())); if (CreateShortcut(targetFile.c_str() , parameter.c_str() -- cgit v1.3.1