aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/testlib/main.cpp')
-rw-r--r--src/imports/testlib/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp
index 3c28000e35..fc013d5afc 100644
--- a/src/imports/testlib/main.cpp
+++ b/src/imports/testlib/main.cpp
@@ -91,14 +91,14 @@ public Q_SLOTS:
{
QString name(v.typeName());
if (v.canConvert<QObject*>()) {
- QQmlType *type = 0;
+ QQmlType type;
const QMetaObject *mo = v.value<QObject*>()->metaObject();
- while (!type && mo) {
+ while (!type.isValid() && mo) {
type = QQmlMetaType::qmlType(mo);
mo = mo->superClass();
}
- if (type) {
- name = type->qmlTypeName();
+ if (type.isValid()) {
+ name = type.qmlTypeName();
}
}