summaryrefslogtreecommitdiffstats
path: root/src/qdbus/qdbusviewer/propertydialog.cpp
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2012-05-21 18:20:45 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-24 10:50:49 +0200
commitd2a460d35d6dbcdf3ea87bd116769780650e6e64 (patch)
treef8f620311c07e0882b5e38d6229ac1316ff24680 /src/qdbus/qdbusviewer/propertydialog.cpp
parentcbc05ab5c065feca768b6059fb3d758c895e860b (diff)
Prefer QMetaType over QVariant during a type information query.
As a side effect the patch probably fix special case, when an interface wants a variant and one of the parameters has to be converted. Before QVariant::nameToType was returning only builtin types ids. Change-Id: I473a9bcbd9249acf7c232492fa62c53de3ff5c71 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/qdbus/qdbusviewer/propertydialog.cpp')
-rw-r--r--src/qdbus/qdbusviewer/propertydialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qdbus/qdbusviewer/propertydialog.cpp b/src/qdbus/qdbusviewer/propertydialog.cpp
index 15c4e8f94..0223de70a 100644
--- a/src/qdbus/qdbusviewer/propertydialog.cpp
+++ b/src/qdbus/qdbusviewer/propertydialog.cpp
@@ -73,7 +73,7 @@ void PropertyDialog::setInfo(const QString &caption)
label->setText(caption);
}
-void PropertyDialog::addProperty(const QString &aname, QVariant::Type type)
+void PropertyDialog::addProperty(const QString &aname, int type)
{
int rowCount = propertyTable->rowCount();
propertyTable->setRowCount(rowCount + 1);
@@ -82,7 +82,7 @@ void PropertyDialog::addProperty(const QString &aname, QVariant::Type type)
if (name.isEmpty())
name = QLatin1String("argument ") + QString::number(rowCount + 1);
name += QLatin1String(" (");
- name += QLatin1String(QVariant::typeToName(type));
+ name += QLatin1String(QMetaType::typeName(type));
name += QLatin1String(")");
QTableWidgetItem *nameItem = new QTableWidgetItem(name);
nameItem->setFlags(nameItem->flags() &
@@ -90,7 +90,7 @@ void PropertyDialog::addProperty(const QString &aname, QVariant::Type type)
propertyTable->setItem(rowCount, 0, nameItem);
QTableWidgetItem *valueItem = new QTableWidgetItem;
- valueItem->setData(Qt::DisplayRole, QVariant(type));
+ valueItem->setData(Qt::DisplayRole, QVariant(type, /* copy */ 0));
propertyTable->setItem(rowCount, 1, valueItem);
}