Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/plugins/folder/foldermodel.cpp
Show First 20 Lines • Show All 518 Lines • ▼ Show 20 Line(s) | 512 | { | |||
---|---|---|---|---|---|
519 | QUrl url(item.targetUrl()); | 519 | QUrl url(item.targetUrl()); | ||
520 | 520 | | |||
521 | // FIXME TODO: This can go once we depend on a KIO w/ fe1f50caaf2. | 521 | // FIXME TODO: This can go once we depend on a KIO w/ fe1f50caaf2. | ||
522 | if (url.scheme().isEmpty()) { | 522 | if (url.scheme().isEmpty()) { | ||
523 | url.setScheme(QStringLiteral("file")); | 523 | url.setScheme(QStringLiteral("file")); | ||
524 | } | 524 | } | ||
525 | 525 | | |||
526 | KRun *run = new KRun(url, 0); | 526 | KRun *run = new KRun(url, 0); | ||
527 | run->setShowScriptExecutionPrompt(true); | 527 | // On desktop:/ we want to be able to run .desktop files right away, | ||
528 | // otherwise ask for security reasons. We also don't use the targetUrl() | ||||
529 | // from above since we don't want the resolved /home/foo/Desktop URL. | ||||
530 | run->setShowScriptExecutionPrompt(item.url().scheme() != QLatin1String("desktop") | ||||
531 | || item.url().adjusted(QUrl::RemoveFilename).path() != QLatin1String("/")); | ||||
528 | } | 532 | } | ||
529 | 533 | | |||
530 | void FolderModel::runSelected() | 534 | void FolderModel::runSelected() | ||
531 | { | 535 | { | ||
532 | if (!m_selectionModel->hasSelection()) { | 536 | if (!m_selectionModel->hasSelection()) { | ||
533 | return; | 537 | return; | ||
534 | } | 538 | } | ||
535 | 539 | | |||
▲ Show 20 Lines • Show All 1056 Lines • Show Last 20 Lines |