aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlplugindump/main.cpp
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2013-06-10 11:16:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 21:42:02 +0200
commita5052ea1e7286aee60e2e138a405d9864750db24 (patch)
tree72adf53e9e8a3055767af2645d584fb656fed1da /tools/qmlplugindump/main.cpp
parentcaddd0ef4ad9039c60c62a5110dd4452cca132d5 (diff)
qmlplugindump: adding verbose output for the instantiation operations
Change-Id: Ic18d85de92f05c01b6ce00b071ef9b94d878434f Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'tools/qmlplugindump/main.cpp')
-rw-r--r--tools/qmlplugindump/main.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 472d3f591c..6939ce92e2 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -254,7 +254,16 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine, const
if (ty->isSingleton()) {
QQmlType::SingletonInstanceInfo *siinfo = ty->singletonInstanceInfo();
+ if (!siinfo) {
+ qWarning() << "Internal error, " << tyName
+ << "(" << QString::fromUtf8(ty->typeName()) << ")"
+ << " is singleton, but has no singletonInstanceInfo";
+ continue;
+ }
if (siinfo->qobjectCallback) {
+ if (verbose)
+ qDebug() << "Trying to get singleton for " << tyName
+ << " (" << siinfo->typeName << ")";
siinfo->init(engine);
collectReachableMetaObjects(object, &metas);
object = siinfo->qobjectApi(engine);
@@ -263,15 +272,22 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine, const
continue; // we don't handle QJSValue singleton types.
}
} else {
+ if (verbose)
+ qDebug() << "Trying to create object " << tyName
+ << " (" << QString::fromUtf8(ty->typeName()) << ")";
object = ty->create();
}
inObjectInstantiation.clear();
- if (object)
+ if (object) {
+ if (verbose)
+ qDebug() << "Got " << tyName
+ << " (" << QString::fromUtf8(ty->typeName()) << ")";
collectReachableMetaObjects(object, &metas);
- else
+ } else {
qWarning() << "Could not create" << tyName;
+ }
}
}