summaryrefslogtreecommitdiffstats
path: root/tools/qdbus
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdbus')
-rw-r--r--tools/qdbus/qdbus/qdbus.cpp8
-rw-r--r--tools/qdbus/qdbusviewer/qdbusviewer.cpp4
-rw-r--r--tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp8
3 files changed, 10 insertions, 10 deletions
diff --git a/tools/qdbus/qdbus/qdbus.cpp b/tools/qdbus/qdbus/qdbus.cpp
index 8e1c384..a3821a1 100644
--- a/tools/qdbus/qdbus/qdbus.cpp
+++ b/tools/qdbus/qdbus/qdbus.cpp
@@ -332,7 +332,7 @@ static int placeCall(const QString &service, const QString &path, const QString
if (id == int(QMetaType::UChar)) {
// special case: QVariant::convert doesn't convert to/from
// UChar because it can't decide if it's a character or a number
- p = qVariantFromValue<uchar>(p.toUInt());
+ p = QVariant::fromValue<uchar>(p.toUInt());
} else if (id < int(QMetaType::User) && id != int(QVariant::Map)) {
p.convert(QVariant::Type(id));
if (p.type() == QVariant::Invalid) {
@@ -342,7 +342,7 @@ static int placeCall(const QString &service, const QString &path, const QString
}
} else if (id == qMetaTypeId<QDBusVariant>()) {
QDBusVariant tmp(p);
- p = qVariantFromValue(tmp);
+ p = QVariant::fromValue(tmp);
} else if (id == qMetaTypeId<QDBusObjectPath>()) {
QDBusObjectPath path(argument);
if (path.path().isNull()) {
@@ -350,7 +350,7 @@ static int placeCall(const QString &service, const QString &path, const QString
qPrintable(argument));
return 1;
}
- p = qVariantFromValue(path);
+ p = QVariant::fromValue(path);
} else if (id == qMetaTypeId<QDBusSignature>()) {
QDBusSignature sig(argument);
if (sig.signature().isNull()) {
@@ -358,7 +358,7 @@ static int placeCall(const QString &service, const QString &path, const QString
qPrintable(argument));
return 1;
}
- p = qVariantFromValue(sig);
+ p = QVariant::fromValue(sig);
} else {
fprintf(stderr, "Sorry, can't pass arg of type '%s'.\n",
types.at(i).constData());
diff --git a/tools/qdbus/qdbusviewer/qdbusviewer.cpp b/tools/qdbus/qdbusviewer/qdbusviewer.cpp
index 40ca561..cab1093 100644
--- a/tools/qdbus/qdbusviewer/qdbusviewer.cpp
+++ b/tools/qdbus/qdbusviewer/qdbusviewer.cpp
@@ -217,7 +217,7 @@ void QDBusViewer::setProperty(const BusSignature &sig)
QDBusMessage message = QDBusMessage::createMethodCall(sig.mService, sig.mPath, QLatin1String("org.freedesktop.DBus.Properties"), QLatin1String("Set"));
QList<QVariant> arguments;
- arguments << sig.mInterface << sig.mName << qVariantFromValue(QDBusVariant(value));
+ arguments << sig.mInterface << sig.mName << QVariant::fromValue(QDBusVariant(value));
message.setArguments(arguments);
c.callWithCallback(message, this, SLOT(dumpMessage(QDBusMessage)));
@@ -283,7 +283,7 @@ void QDBusViewer::callMethod(const BusSignature &sig)
// interface wants a variant
for (int i = 0; i < args.count(); ++i) {
if (types.at(i) == qMetaTypeId<QDBusVariant>())
- args[i] = qVariantFromValue(QDBusVariant(args.at(i)));
+ args[i] = QVariant::fromValue(QDBusVariant(args.at(i)));
}
QDBusMessage message = QDBusMessage::createMethodCall(sig.mService, sig.mPath, sig.mInterface,
diff --git a/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp b/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp
index 8ebf85e..cfe848e 100644
--- a/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -617,7 +617,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
if (property.access != QDBusIntrospection::Property::Read) {
hs << " inline void " << setter << "(" << constRefArg(type) << "value)" << endl
<< " { setProperty(\"" << property.name
- << "\", qVariantFromValue(value)); }" << endl;
+ << "\", QVariant::fromValue(value)); }" << endl;
}
hs << endl;
@@ -660,7 +660,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
if (!method.inputArgs.isEmpty()) {
hs << " argumentList";
for (int argPos = 0; argPos < method.inputArgs.count(); ++argPos)
- hs << " << qVariantFromValue(" << argNames.at(argPos) << ')';
+ hs << " << QVariant::fromValue(" << argNames.at(argPos) << ')';
hs << ";" << endl;
}
@@ -693,7 +693,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
if (!method.inputArgs.isEmpty()) {
hs << " argumentList";
for (argPos = 0; argPos < method.inputArgs.count(); ++argPos)
- hs << " << qVariantFromValue(" << argNames.at(argPos) << ')';
+ hs << " << QVariant::fromValue(" << argNames.at(argPos) << ')';
hs << ";" << endl;
}
@@ -940,7 +940,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
cs << "void " << className << "::" << setter << "(" << constRefType << "value)" << endl
<< "{" << endl
<< " // set the value of property " << property.name << endl
- << " parent()->setProperty(\"" << property.name << "\", qVariantFromValue(value";
+ << " parent()->setProperty(\"" << property.name << "\", QVariant::fromValue(value";
if (constRefType.contains(QLatin1String("QDBusVariant")))
cs << ".variant()";
cs << "));" << endl