void-packages/srcpkgs/heaptrack/patches/004.desktop.patch

62 lines
2.1 KiB
Diff

# src: upstream/master
From f2349d480fc30cf55281218b2b8063c4e5207abb Mon Sep 17 00:00:00 2001
From: "Friedrich W. H. Kossebau" <kossebau@kde.org>
Date: Tue, 5 Feb 2019 04:08:55 +0100
Subject: [PATCH] Set StartupWMClass in desktop file
Used by non-Plasma unixoid X-based shells to map windows to desktop files
e.g. in launcher UIs, which do not know about _KDE_NET_WM_DESKTOP_FILE and
instead expect (one of) the WM_CLASS entries to match the basename of the
desktop file by default. StartupWMClass overwrites that default.
---
src/analyze/gui/org.kde.heaptrack.desktop | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/analyze/gui/org.kde.heaptrack.desktop b/src/analyze/gui/org.kde.heaptrack.desktop
index 8c92706..ddae134 100644
--- src/analyze/gui/org.kde.heaptrack.desktop
+++ src/analyze/gui/org.kde.heaptrack.desktop
@@ -7,6 +7,7 @@ MimeType=application/x-heaptrack;
Icon=heaptrack
# FIXME: write docs!
# X-DocPath=kcachegrind/index.html
+StartupWMClass=heaptrack_gui
Terminal=false
Name=Heaptrack
Name[ca]=Heaptrack
From 30ca42deadcb3bf0a73cd37806ceca5d290fbbce Mon Sep 17 00:00:00 2001
From: "Friedrich W. H. Kossebau" <kossebau@kde.org>
Date: Tue, 5 Feb 2019 04:23:58 +0100
Subject: [PATCH] Add correct desktopfilename property for heaptrack_gui
---
src/analyze/gui/gui.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/analyze/gui/gui.cpp b/src/analyze/gui/gui.cpp
index 96048b1..846d5fb 100644
--- src/analyze/gui/gui.cpp
+++ src/analyze/gui/gui.cpp
@@ -19,6 +19,7 @@
#include <QApplication>
#include <QCommandLineParser>
+#include <kcoreaddons_version.h>
#include <KAboutData>
#include <KLocalizedString>
@@ -45,7 +46,9 @@ int main(int argc, char** argv)
QStringLiteral("http://milianw.de"));
aboutData.setOrganizationDomain("kde.org");
-
+#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 16, 0)
+ aboutData.setDesktopFileName(QStringLiteral("org.kde.heaptrack"));
+#endif
KAboutData::setApplicationData(aboutData);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("office-chart-area")));