mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-27 14:33:08 +00:00
Specify the required CWD when running the applications
This commit is contained in:
parent
d4e675ec27
commit
b3e1fbea95
1 changed files with 4 additions and 1 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#include <KSharedConfig>
|
||||
#include <KSycoca>
|
||||
#include <KSycocaEntry>
|
||||
#include <KShell>
|
||||
#include <KIOWidgets/KRun>
|
||||
#include <QDebug>
|
||||
|
||||
|
|
@ -241,8 +242,10 @@ void ApplicationListModel::runApplication(const QString &storageId)
|
|||
|
||||
KService::Ptr service = KService::serviceByStorageId(storageId);
|
||||
|
||||
QStringList args = KShell::splitArgs(service->exec().replace(QRegExp("%\\w"), ""));
|
||||
QString exec = args.takeFirst();
|
||||
//ignore parameters like %u
|
||||
QProcess::startDetached(service->exec().replace(QRegExp("%\\w"), ""));
|
||||
QProcess::startDetached(exec, args, service->path());
|
||||
}
|
||||
|
||||
void ApplicationListModel::runApplicationKRun(const QString &storageId)
|
||||
|
|
|
|||
Loading…
Reference in a new issue