summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2017-02-11 10:24:00 (GMT)
committerKai Uwe Broulik <kde@privat.broulik.de>2017-02-11 10:24:00 (GMT)
commitb088e451623758015f577e52d567761fb130e92b (patch)
tree9b896d6a5a160bfe4f43aeb36a0536a627525a97
parent07c05cc9f3df35dea4c72cb9c9581cc0b531e1d4 (diff)
[Folder View] Don't show script execution prompt on desktop:/
This utterly breaks the workflow of users when you have a default desktop containment and some application shortcuts on there. Differential Revision: https://phabricator.kde.org/D4534
-rw-r--r--containments/desktop/plugins/folder/foldermodel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/containments/desktop/plugins/folder/foldermodel.cpp b/containments/desktop/plugins/folder/foldermodel.cpp
index 1ba1245..8705a9a 100644
--- a/containments/desktop/plugins/folder/foldermodel.cpp
+++ b/containments/desktop/plugins/folder/foldermodel.cpp
@@ -510,7 +510,11 @@ void FolderModel::run(int row)
}
KRun *run = new KRun(url, 0);
- run->setShowScriptExecutionPrompt(true);
+ // On desktop:/ we want to be able to run .desktop files right away,
+ // otherwise ask for security reasons. We also don't use the targetUrl()
+ // from above since we don't want the resolved /home/foo/Desktop URL.
+ run->setShowScriptExecutionPrompt(item.url().scheme() != QLatin1String("desktop")
+ || item.url().adjusted(QUrl::RemoveFilename).path() != QLatin1String("/"));
}
void FolderModel::rename(int row, const QString& name)