const int protocolVersion = 1;
+// print detailed information about loading of plugins
+DEFINE_BOOL_CONFIG_OPTION(qmlDebugVerbose, QML_DEBUGGER_VERBOSE)
class QDeclarativeDebugServerPrivate : public QObjectPrivate
{
}
foreach (const QString &pluginPath, pluginCandidates) {
+ if (qmlDebugVerbose())
+ qDebug() << "QDeclarativeDebugServer: Trying to load plugin " << pluginPath << "...";
+
QPluginLoader loader(pluginPath);
if (!loader.load()) {
+ if (qmlDebugVerbose())
+ qDebug() << "QDeclarativeDebugServer: Error while loading: " << loader.errorString();
continue;
}
QDeclarativeDebugServerConnection *connection = 0;
if (QObject *instance = loader.instance())
connection = qobject_cast<QDeclarativeDebugServerConnection*>(instance);
- if (connection)
+ if (connection) {
+ if (qmlDebugVerbose())
+ qDebug() << "QDeclarativeDebugServer: Plugin successfully loaded.";
+
return connection;
+ }
+
+ if (qmlDebugVerbose())
+ qDebug() << "QDeclarativeDebugServer: Plugin does not implement interface QDeclarativeDebugServerConnection.";
+
loader.unload();
}
#endif
#include <QtCore/QDir>
#include <QtCore/QPluginLoader>
+// print detailed information about loading of plugins
+DEFINE_BOOL_CONFIG_OPTION(qmlDebugVerbose, QML_DEBUGGER_VERBOSE)
+
QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QDeclarativeInspectorService, serviceInstance)
}
}
+ if (!m_currentInspectorPlugin) {
+ qWarning() << "QDeclarativeInspector: No plugin available for view '" << m_views.first()->metaObject()->className() << "'.";
+ return;
+ }
m_currentInspectorPlugin->activate(m_views.first());
} else {
if (m_currentInspectorPlugin) {
}
foreach (const QString &pluginPath, pluginCandidates) {
+ if (qmlDebugVerbose())
+ qDebug() << "QDeclarativeInspector: Trying to load plugin " << pluginPath << "...";
+
QPluginLoader loader(pluginPath);
- if (!loader.load())
+ if (!loader.load()) {
+ if (qmlDebugVerbose())
+ qDebug() << "QDeclarativeInspector: Error while loading: " << loader.errorString();
+
continue;
+ }
QDeclarativeInspectorInterface *inspector =
qobject_cast<QDeclarativeInspectorInterface*>(loader.instance());
- if (inspector)
+ if (inspector) {
+ if (qmlDebugVerbose())
+ qDebug() << "QDeclarativeInspector: Plugin successfully loaded.";
m_inspectorPlugins << inspector;
- else
+ } else {
+ if (qmlDebugVerbose())
+ qDebug() << "QDeclarativeInspector: Plugin does not implement interface QDeclarativeInspectorInterface.";
+
loader.unload();
+ }
}
}