summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-08-20 14:22:13 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-09-05 07:42:01 +0000
commit041fae00351164fbd72763e4bd947fdeb9956a5d (patch)
tree2c47804d884b8e8887e3b2504928be3bea1adf28 /src/platformsupport
parentc5068866cfa88c41b3bb8ccc5083b7798128e9b2 (diff)
Fix crash on exit caused by QStringLiterals
These QStringLiterals are passed to QtDBus, which records them. They will be used even after the libQt5XcbQpa.so library is unloaded, which causes a crash on exit, one that even valgrind gets lost on. Change-Id: I7de033f80b0e4431b7f1ffff13fc4888e45a346a Reviewed-by: Albert Astals Cid <aacid@kde.org> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/linuxaccessibility/dbusconnection.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/platformsupport/linuxaccessibility/dbusconnection.cpp b/src/platformsupport/linuxaccessibility/dbusconnection.cpp
index 637b06549a..ae1ba1819a 100644
--- a/src/platformsupport/linuxaccessibility/dbusconnection.cpp
+++ b/src/platformsupport/linuxaccessibility/dbusconnection.cpp
@@ -47,8 +47,11 @@
QT_BEGIN_NAMESPACE
-QString A11Y_SERVICE = QStringLiteral("org.a11y.Bus");
-QString A11Y_PATH = QStringLiteral("/org/a11y/bus");
+/* note: do not change these to QStringLiteral;
+ we are unloaded before QtDBus is done using the strings.
+ */
+#define A11Y_SERVICE QLatin1String("org.a11y.Bus")
+#define A11Y_PATH QLatin1String("/org/a11y/bus")
/*!
\class DBusConnection
@@ -137,7 +140,7 @@ void DBusConnection::connectA11yBus(const QString &address)
qWarning("Could not find Accessibility DBus address.");
return;
}
- m_a11yConnection = QDBusConnection(QDBusConnection::connectToBus(address, QStringLiteral("a11y")));
+ m_a11yConnection = QDBusConnection(QDBusConnection::connectToBus(address, QLatin1String("a11y")));
if (m_enabled)
emit enabledChanged(true);