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>
This commit is contained in:
parent
c5068866cf
commit
041fae0035
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user