diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp index 9fb3cfdf596adbdfd3ec39065b8a50a5926f7d2c..e7da4a7c2127c5209c22f0b4f844d2ecc272693c 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp +++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp @@ -64,10 +64,11 @@ bool ClientProxy::connectToViewer(const QString &host, quint16 port) qDebug() << Q_FUNC_INFO; if (m_client) { - disconnect(m_client, SIGNAL(propertyDumpReceived(QDeclarativeDebugPropertyDump)), - this, SIGNAL(propertyDumpReceived(QDeclarativeDebugPropertyDump))); +#warning disconnect selectedItemsChanged here +#if 0 disconnect(m_client, SIGNAL(selectedItemsChanged(QList<QDeclarativeDebugObjectReference>)), this, SIGNAL(selectedItemsChanged(QList<QDeclarativeDebugObjectReference>))); +#endif emit aboutToDisconnect(); @@ -151,12 +152,12 @@ void ClientProxy::connectionStateChanged() m_client = new QDeclarativeEngineDebug(m_conn, this); emit connected(m_client); - connect(m_client, - SIGNAL(propertyDumpReceived(QDeclarativeDebugPropertyDump)), - SIGNAL(propertyDumpReceived(QDeclarativeDebugPropertyDump))); +#warning add support for selectedItemsChanged here +#if 0 connect(m_client, SIGNAL(selectedItemsChanged(QList<QDeclarativeDebugObjectReference>)), SIGNAL(selectedItemsChanged(QList<QDeclarativeDebugObjectReference>))); +#endif } reloadEngines(); diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.h b/src/plugins/qmljsinspector/qmljsclientproxy.h index e593abd2913f92a8550bab551429b5bc8b9d0916..80937f88fdd8e801901e11d1e3468bd1519a1cd0 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.h +++ b/src/plugins/qmljsinspector/qmljsclientproxy.h @@ -37,7 +37,6 @@ QT_FORWARD_DECLARE_CLASS(QUrl) QT_FORWARD_DECLARE_CLASS(QDeclarativeEngineDebug) QT_FORWARD_DECLARE_CLASS(QDeclarativeDebugConnection) QT_FORWARD_DECLARE_CLASS(QDeclarativeDebugExpressionQuery) -QT_FORWARD_DECLARE_CLASS(QDeclarativeDebugPropertyDump) namespace Debugger { class DebuggerRunControl; @@ -79,7 +78,6 @@ signals: void aboutToReloadEngines(); void enginesChanged(); - void propertyDumpReceived(const QDeclarativeDebugPropertyDump &propertyDump); void selectedItemsChanged(const QList<QDeclarativeDebugObjectReference> &selectedItems); void connected(QDeclarativeEngineDebug *client); diff --git a/src/plugins/qmljsinspector/qmljsinspector.cpp b/src/plugins/qmljsinspector/qmljsinspector.cpp index e6a79dbc789df65759493a5ac6b4132b2eda93e6..857c9ba9126e3fa76834a1d946c5da572aca587c 100644 --- a/src/plugins/qmljsinspector/qmljsinspector.cpp +++ b/src/plugins/qmljsinspector/qmljsinspector.cpp @@ -164,14 +164,15 @@ void Inspector::updateEngineList() { qDebug() << Q_FUNC_INFO; - QList<QDeclarativeDebugEngineReference> engines = m_clientProxy->engines(); + const QList<QDeclarativeDebugEngineReference> engines = m_clientProxy->engines(); + +#warning update the QML engines combo if (engines.isEmpty()) qWarning("qmldebugger: no engines found!"); - -#warning update the QML engines combo - if (engines.count() > 0) { - m_clientProxy->queryEngineContext(engines.at(0).debugId()); + else { + const QDeclarativeDebugEngineReference engine = engines.first(); + m_clientProxy->queryEngineContext(engine.debugId()); } } @@ -542,14 +543,6 @@ void Inspector::setSelectedItemsByObjectReference(QList<QDeclarativeDebugObjectR gotoObjectReferenceDefinition(objectReferences.first()); } -#if 0 -void QmlInspector::handlePropertyDump(const QDeclarativeDebugPropertyDump &dump) -{ - qDebug() << Q_FUNC_INFO; - m_rewriter->mapObjectToQml(dump.object()); -} -#endif - void Inspector::gotoObjectReferenceDefinition(const QDeclarativeDebugObjectReference &obj) { Q_UNUSED(obj); @@ -586,7 +579,7 @@ QDeclarativeDebugExpressionQuery *Inspector::executeExpression(int objectDebugId if (objectId.length()) { QString quoteWrappedValue = value.toString(); if (addQuotesForData(value)) - quoteWrappedValue = QString("'%1'").arg(quoteWrappedValue); + quoteWrappedValue = QString("'%1'").arg(quoteWrappedValue); // ### FIXME this code is wrong! QString constructedExpression = objectId + "." + propertyName + "=" + quoteWrappedValue; return m_client.data()->queryExpressionResult(objectDebugId, constructedExpression, this); diff --git a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp index fa1b980254bf099810934f83a1b09980842a25d5..e4168f2c060914bf0326d3bdd08fee6c09f0c37e 100644 --- a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp +++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp @@ -183,13 +183,12 @@ void InspectorPlugin::activateDebuggerForProject(ProjectExplorer::Project *proje # warning start a QML/JS debugging session using the information stored in the current project #endif -#if 0 // FIXME we probably want to activate the debugger for other projects than QmlProjects, // if they contain Qml files. Some kind of options should exist for this behavior. - QmlProjectManager::QmlProject *qmlproj = qobject_cast<QmlProjectManager::QmlProject*>(project); - if (qmlproj && m_inspector->setDebugConfigurationDataFromProject(qmlproj)) - m_inspector->startQmlProjectDebugger(); -#endif + if (QmlProjectManager::QmlProject *qmlproj = qobject_cast<QmlProjectManager::QmlProject*>(project)) { + if (_inspector->setDebugConfigurationDataFromProject(qmlproj)) + _inspector->startQmlProjectDebugger(); + } } }