summaryrefslogtreecommitdiff
path: root/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2019-12-02 17:54:48 +0100
committerOlivier Goffart <ogoffart@woboq.com>2020-01-23 16:46:51 +0100
commit73d1476fb1397948a4d806bd921fce372bd8d63b (patch)
treea476349c26627027d78c1279da00ef633323311f /src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
parenta78d66743171557d79b16c08be775e3ac15bb4ef (diff)
downloadqtbase-73d1476fb1397948a4d806bd921fce372bd8d63b.tar.gz
Replace most use of QVariant::type and occurrences of QVariant::Type
I made a clazy automated check that replaced the use of QVariant::Type by the equivalent in QMetaType. This has been deprecated since Qt 5.0, but many uses were not yet removed. In addition, there was some manual changes to fix the compilation errors. Adapted the Private API of QDateTimeParser and QMimeDataPrivate and adjust QDateTimeEdit and QSpinBox. QVariant(QVariant::Invalid) in qstylesheet made no sense. But note that in QVariant::save, we actually wanted to use the non-user type. In the SQL module, many changes were actually reverted because the API still expects QVarient::Type. Change-Id: I98c368490e4ee465ed3a3b63bda8b8eaa50ea67e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp')
-rw-r--r--src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
index 81ebafad79..768594efb4 100644
--- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
+++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
@@ -115,7 +115,7 @@ static QString addFunction(const FunctionDef &mm, bool isSignal = false) {
.arg(typeNameToXml(typeName));
// do we need to describe this argument?
- if (QDBusMetaType::signatureToType(typeName) == QVariant::Invalid)
+ if (QDBusMetaType::signatureToType(typeName) == QMetaType::UnknownType)
xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n")
.arg(typeNameToXml(mm.normalizedType.constData()));
} else {
@@ -159,7 +159,7 @@ static QString addFunction(const FunctionDef &mm, bool isSignal = false) {
isOutput ? QLatin1String("out") : QLatin1String("in"));
// do we need to describe this argument?
- if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
+ if (QDBusMetaType::signatureToType(signature) == QMetaType::UnknownType) {
const char *typeName = QMetaType::typeName(types.at(j));
xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.%1%2\" value=\"%3\"/>\n")
.arg(isOutput ? QLatin1String("Out") : QLatin1String("In"))
@@ -225,7 +225,7 @@ static QString generateInterfaceXml(const ClassDef *mo)
QLatin1String(signature),
QLatin1String(accessvalues[access]));
- if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
+ if (QDBusMetaType::signatureToType(signature) == QMetaType::UnknownType) {
retval += QString::fromLatin1(">\n <annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"%3\"/>\n </property>\n")
.arg(typeNameToXml(mp.type.constData()));
} else {