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>
bb10
Volker Krause 2018-04-27 19:04:33 +02:00 committed by Volker Krause
parent 9fdbd9dce9
commit 9ac9bea16c
1 changed files with 7 additions and 0 deletions

View File

@ -181,6 +181,13 @@ int qDBusParametersForMethod(const QList<QByteArray> &parameterTypes, 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;