0001-qtui-Set-desktop-file-name.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 919ac3d7184faee0ccfa7fe65c6635a7dcf5d234 Mon Sep 17 00:00:00 2001
  2. Message-Id: <919ac3d7184faee0ccfa7fe65c6635a7dcf5d234.1553291431.git.jan.steffens@gmail.com>
  3. From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
  4. Date: Fri, 22 Mar 2019 22:37:22 +0100
  5. Subject: [PATCH] qtui: Set desktop file name
  6. The XCB platform plugin defaults the WM class to the executable name,
  7. which already matches our desktop file name. Unfortunately, the Wayland
  8. platform plugin prepends the inverted organization domain, resulting in
  9. an app ID of "org.quassel-irc.quasselclient", thus breaking the
  10. association.
  11. Set the desktop file name explicitly so the Wayland platform doesn't get
  12. confused.
  13. ---
  14. src/qtui/monoapplication.cpp | 3 +++
  15. src/qtui/qtuiapplication.cpp | 3 +++
  16. 2 files changed, 6 insertions(+)
  17. diff --git a/src/qtui/monoapplication.cpp b/src/qtui/monoapplication.cpp
  18. index 809f1147..3f60523f 100644
  19. --- a/src/qtui/monoapplication.cpp
  20. +++ b/src/qtui/monoapplication.cpp
  21. @@ -32,6 +32,9 @@ MonolithicApplication::MonolithicApplication(int &argc, char **argv)
  22. : QtUiApplication(argc, argv)
  23. {
  24. Quassel::setRunMode(Quassel::Monolithic);
  25. +#if QT_VERSION >= 0x050700
  26. + QGuiApplication::setDesktopFileName(Quassel::buildInfo().applicationName + ".desktop");
  27. +#endif
  28. }
  29. diff --git a/src/qtui/qtuiapplication.cpp b/src/qtui/qtuiapplication.cpp
  30. index e5b0b773..989a1961 100644
  31. --- a/src/qtui/qtuiapplication.cpp
  32. +++ b/src/qtui/qtuiapplication.cpp
  33. @@ -92,6 +92,9 @@ QtUiApplication::QtUiApplication(int &argc, char **argv)
  34. #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
  35. QGuiApplication::setFallbackSessionManagementEnabled(false);
  36. #endif
  37. +#if QT_VERSION >= 0x050700
  38. + QGuiApplication::setDesktopFileName(Quassel::buildInfo().clientApplicationName + ".desktop");
  39. +#endif
  40. }
  41. --
  42. 2.21.0