diff options
author | Volker Krause <vkrause@kde.org> | 2018-04-27 19:04:33 +0200 |
---|---|---|
committer | Volker Krause <volker.krause@kdab.com> | 2018-04-29 16:44:32 +0000 |
commit | 9ac9bea16c502b26fb99448b118960f43272b335 (patch) | |
tree | e3e7b9dd8026da1b83f4f30366f017f9824e8106 | |
parent | 9fdbd9dce917e90f0e644bedd8dca183f88304d6 (diff) |
Fix handling of QDBusMessage in qdbuscpp2xml in bootstrapped mode
In bootstrapped mode QDBusMessage isn't available, so looking up the type
via QMetaType wont work. QDBusMetaTypeId has this special-cased, but that
alone isn't enough for qdbuscpp2xml to produce the same result as in non-
bootstrapped mode.
The effect of this has also been described here before in detail:
http://lists.qt-project.org/pipermail/development/2017-February/028756.html
Change-Id: Id309a3a910f971c6150cdc6d06f2b48f1b95c787
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/dbus/qdbusmisc.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp index 930c3bd2da..eb8f61c783 100644 --- a/src/dbus/qdbusmisc.cpp +++ b/src/dbus/qdbusmisc.cpp @@ -181,6 +181,13 @@ int qDBusParametersForMethod(const QList<QByteArray> ¶meterTypes, QVector<in } int id = QMetaType::type(type); +#ifdef QT_BOOTSTRAPPED + // in bootstrap mode QDBusMessage isn't included, thus we need to resolve it manually here + if (type == "QDBusMessage") { + id = QDBusMetaTypeId::message(); + } +#endif + if (id == QMetaType::UnknownType) { errorMsg = QLatin1String("Unregistered input type in parameter list: ") + QLatin1String(type); return -1; |