Commit 5ac9a194 authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlDebugger: displaying tooltips while qml is running

Reviewed-by:  hjk
parent 0e476646
...@@ -247,6 +247,8 @@ public: ...@@ -247,6 +247,8 @@ public:
virtual bool setupQmlStep(bool /*on*/) { return false; } virtual bool setupQmlStep(bool /*on*/) { return false; }
virtual void readyToExecuteQmlStep() {} virtual void readyToExecuteQmlStep() {}
virtual bool canDisplayTooltip() const { return state() == InferiorStopOk; }
signals: signals:
void stateChanged(const DebuggerState &state); void stateChanged(const DebuggerState &state);
void updateViewsRequested(); void updateViewsRequested();
......
...@@ -1928,7 +1928,7 @@ void DebuggerPluginPrivate::showToolTip(ITextEditor *editor, ...@@ -1928,7 +1928,7 @@ void DebuggerPluginPrivate::showToolTip(ITextEditor *editor,
return; return;
if (!currentEngine()) if (!currentEngine())
return; return;
if (currentEngine()->state() != InferiorStopOk) if (!currentEngine()->canDisplayTooltip())
return; return;
QTC_ASSERT(handled, return); QTC_ASSERT(handled, return);
*handled = true; *handled = true;
......
...@@ -263,6 +263,11 @@ void QmlEngine::pauseConnection() ...@@ -263,6 +263,11 @@ void QmlEngine::pauseConnection()
d->m_adapter.pauseConnection(); d->m_adapter.pauseConnection();
} }
bool QmlEngine::canDisplayTooltip() const
{
return state() == InferiorRunOk || state() == InferiorStopOk;
}
void QmlEngine::closeConnection() void QmlEngine::closeConnection()
{ {
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager *pluginManager =
......
...@@ -60,6 +60,7 @@ public: ...@@ -60,6 +60,7 @@ public:
void gotoLocation(const Location &location); void gotoLocation(const Location &location);
void pauseConnection(); void pauseConnection();
bool canDisplayTooltip() const;
public slots: public slots:
void messageReceived(const QByteArray &message); void messageReceived(const QByteArray &message);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment