[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:05:12 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=a2a1a3e

The following commit has been merged in the master branch:
commit a2a1a3e29067711c2caa8414a6a6f4687d5c725a
Author: George Kiagiadakis <kiagiadakis.george at gmail.com>
Date:   Wed May 30 01:14:21 2012 +0300

    TelepathyHandlerApplication: Set KDE_FULL_SESSION before initializing QApplication.
    
    This should solve issues with handlers loading wrong theme and
    not respecting KDE settings in general.
    BUG: 269861
    
    Reviewed-by: David Edmundson <kde at davidedmundson.co.uk>
---
 KTp/telepathy-handler-application.cpp | 19 +++++++++++++++++++
 KTp/telepathy-handler-application.h   |  1 +
 2 files changed, 20 insertions(+)

diff --git a/KTp/telepathy-handler-application.cpp b/KTp/telepathy-handler-application.cpp
index dfd5d54..179b018 100644
--- a/KTp/telepathy-handler-application.cpp
+++ b/KTp/telepathy-handler-application.cpp
@@ -20,6 +20,8 @@
 #include "telepathy-handler-application.h"
 #include "debug.h"
 
+#include <cstdlib>
+
 #include <QTimer>
 #include <KCmdLineArgs>
 #include <KDebug>
@@ -89,6 +91,23 @@ void TelepathyHandlerApplication::Private::_k_onTimeout()
 // this gets called before even entering QApplication::QApplication()
 KComponentData TelepathyHandlerApplication::Private::initHack()
 {
+    // This is a very very very ugly hack that attempts to solve the following problem:
+    // D-Bus service activated applications inherit the environment of dbus-daemon.
+    // Normally, in KDE, startkde sets these environment variables. However, the session's
+    // dbus-daemon is started before this happens, which means that dbus-daemon does NOT
+    // have these variables in its environment and therefore all service-activated UIs
+    // think that they are not running in KDE. This causes Qt not to load the KDE platform
+    // plugin, which leaves the UI in a sorry state, using a completely wrong theme,
+    // wrong colors, etc...
+    // See also:
+    // - https://bugs.kde.org/show_bug.cgi?id=269861
+    // - https://bugs.kde.org/show_bug.cgi?id=267770
+    // - https://git.reviewboard.kde.org/r/102194/
+    // Here we are just going to assume that kde-telepathy is always used in KDE and
+    // not anywhere else. This is probably the best that we can do.
+    setenv("KDE_FULL_SESSION", "true", 0);
+    setenv("KDE_SESSION_VERSION", "4", 0);
+
     KComponentData cData(KCmdLineArgs::aboutData());
     KCmdLineOptions handler_options;
     handler_options.add("persist", ki18n("Persistent mode (do not exit on timeout)"));
diff --git a/KTp/telepathy-handler-application.h b/KTp/telepathy-handler-application.h
index a020629..4f8a059 100644
--- a/KTp/telepathy-handler-application.h
+++ b/KTp/telepathy-handler-application.h
@@ -36,6 +36,7 @@ namespace KTp
  * - Adds the --debug option to enable telepathy-qt4 debug
  * - Enables telepathy-qt4 warnings
  * - Use Tp-Qt4 callback for redirecting debug output into KDebug
+ * - Sets the KDE_FULL_SESSION environment variable to workaround dbus activation issues.
  */
 class KTP_EXPORT TelepathyHandlerApplication : public KApplication
 {

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list