forked from qt-creator/qt-creator
Start the inspector.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user