forked from qt-creator/qt-creator
QmlJSScriptConsole: Refactored ScriptConsole, added functionality.
The ScriptConsole is renamed to QmlJSScriptConsole. The console can be used to evaluate expressions during a QML application debug session. Changes: * Console can be used even when application is not on a debug break * The object context is the currently selected object in Inspector * ContextMenu has a Clear option * Multiple line expressions are supported * Traverse Command History using up and down arrow keys Change-Id: I4e1cd8763d60be43dbba395ead2a9a086d6bab7d Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -54,7 +54,9 @@ public:
|
||||
explicit QmlAdapterPrivate(DebuggerEngine *engine)
|
||||
: m_engine(engine)
|
||||
, m_qmlClient(0)
|
||||
, m_engineDebugClient(0)
|
||||
, m_conn(0)
|
||||
, m_currentSelectedDebugId(-1)
|
||||
{
|
||||
m_connectionTimer.setInterval(4000);
|
||||
m_connectionTimer.setSingleShot(true);
|
||||
@@ -62,9 +64,12 @@ public:
|
||||
|
||||
QWeakPointer<DebuggerEngine> m_engine;
|
||||
QmlDebuggerClient *m_qmlClient;
|
||||
QmlJsDebugClient::QDeclarativeEngineDebug *m_engineDebugClient;
|
||||
QTimer m_connectionTimer;
|
||||
QDeclarativeDebugConnection *m_conn;
|
||||
QHash<QString, QmlDebuggerClient*> debugClients;
|
||||
int m_currentSelectedDebugId;
|
||||
QString m_currentSelectedDebugName;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
@@ -272,6 +277,34 @@ QHash<QString, Internal::QmlDebuggerClient*> QmlAdapter::debuggerClients()
|
||||
{
|
||||
return d->debugClients;
|
||||
}
|
||||
|
||||
QmlJsDebugClient::QDeclarativeEngineDebug *QmlAdapter::engineDebugClient() const
|
||||
{
|
||||
return d->m_engineDebugClient;
|
||||
}
|
||||
|
||||
void QmlAdapter::setEngineDebugClient(QmlJsDebugClient::QDeclarativeEngineDebug *client)
|
||||
{
|
||||
d->m_engineDebugClient = client;
|
||||
}
|
||||
|
||||
int QmlAdapter::currentSelectedDebugId() const
|
||||
{
|
||||
return d->m_currentSelectedDebugId;
|
||||
}
|
||||
|
||||
QString QmlAdapter::currentSelectedDisplayName() const
|
||||
{
|
||||
return d->m_currentSelectedDebugName;
|
||||
}
|
||||
|
||||
void QmlAdapter::setCurrentSelectedDebugInfo(int currentDebugId, const QString &displayName)
|
||||
{
|
||||
d->m_currentSelectedDebugId = currentDebugId;
|
||||
d->m_currentSelectedDebugName = displayName;
|
||||
emit selectionChanged();
|
||||
}
|
||||
|
||||
void QmlAdapter::logServiceStatusChange(const QString &service,
|
||||
QDeclarativeDebugClient::Status newStatus)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user