From a5052ea1e7286aee60e2e138a405d9864750db24 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Mon, 10 Jun 2013 11:16:38 +0200 Subject: qmlplugindump: adding verbose output for the instantiation operations Change-Id: Ic18d85de92f05c01b6ce00b071ef9b94d878434f Reviewed-by: Caroline Chao --- tools/qmlplugindump/main.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'tools/qmlplugindump/main.cpp') 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 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 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; + } } } -- cgit v1.2.3