29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
From cf430d82c09978d4d9e43e90f6bc60e2a2900942 Mon Sep 17 00:00:00 2001
|
|
From: David Faure <faure@kde.org>
|
|
Date: Tue, 8 Jul 2014 17:48:23 +0200
|
|
Subject: [PATCH 08/10] warn about asserting when people can't write proper
|
|
desktop files
|
|
|
|
Tested by Eike Hein with mpv's desktop file.
|
|
---
|
|
src/core/desktopexecparser.cpp | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/core/desktopexecparser.cpp b/src/core/desktopexecparser.cpp
|
|
index 085643d..be62791 100644
|
|
--- a/src/core/desktopexecparser.cpp
|
|
+++ b/src/core/desktopexecparser.cpp
|
|
@@ -176,7 +176,8 @@ QStringList KIO::DesktopExecParser::supportedProtocols(const KService &service)
|
|
KRunMX1 mx1(service);
|
|
QString exec = service.exec();
|
|
if (mx1.expandMacrosShellQuote(exec) && !mx1.hasUrls) {
|
|
- Q_ASSERT(supportedProtocols.isEmpty()); // huh? If you support protocols you need %u or %U...
|
|
+ qWarning() << service.entryPath() << "contains a X-KDE-Protocols line but doesn't use %u or %U in its Exec line! This is inconsistent.";
|
|
+ return QStringList();
|
|
} else {
|
|
if (supportedProtocols.isEmpty()) {
|
|
// compat mode: assume KIO if not set and it's a KDE app (or a KDE service)
|
|
--
|
|
2.0.0
|
|
|