Make D-Bus types without a matching Qt one prettier in qdbus

Print "QMap<QString,QString>" for "a{ss}" and print a nicer expansion of
other types.

Change-Id: I0a7a2ecf8f0a62bd97931f3c129cd4cb4f471ef1
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
This commit is contained in:
Thiago Macieira 2014-01-29 12:37:02 -08:00 committed by The Qt Project
parent c1d4a634cb
commit 8b54cfff82

View File

@ -220,8 +220,11 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
} else if (signature == "a{sv}") {
result.name = "QVariantMap";
type = QVariant::Map;
} else if (signature == "a{ss}") {
result.name = "QMap<QString,QString>";
type = qMetaTypeId<QMap<QString, QString> >();
} else {
result.name = "QDBusRawType::" + signature;
result.name = "{D-Bus type \"" + signature + "\"}";
type = registerComplexDBusType(result.name);
}
} else {