diff --git a/containments/homescreen/applicationlistmodel.cpp b/containments/homescreen/applicationlistmodel.cpp index 3db36498..71563d82 100644 --- a/containments/homescreen/applicationlistmodel.cpp +++ b/containments/homescreen/applicationlistmodel.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -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)