summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2017-02-10 17:54:10 (GMT)
committerKai Uwe Broulik <kde@privat.broulik.de>2017-02-10 17:54:10 (GMT)
commitc2f74cc8c8dd7b814518057be62cea79f930719c (patch)
tree651e6e306b6fe2e093b29107f7d48e0f3cd7d0d6
parent7e08e22f519dd23a0a4f6350a8019885d229c0e1 (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 970d7c8..ecddf12 100644
--- a/containments/desktop/plugins/folder/foldermodel.cpp
+++ b/containments/desktop/plugins/folder/foldermodel.cpp
@@ -524,7 +524,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::runSelected()