forked from qt-creator/qt-creator
QmlDebugger: displaying tooltips while qml is running
Reviewed-by: hjk
This commit is contained in:
@@ -247,6 +247,8 @@ public:
|
||||
virtual bool setupQmlStep(bool /*on*/) { return false; }
|
||||
virtual void readyToExecuteQmlStep() {}
|
||||
|
||||
virtual bool canDisplayTooltip() const { return state() == InferiorStopOk; }
|
||||
|
||||
signals:
|
||||
void stateChanged(const DebuggerState &state);
|
||||
void updateViewsRequested();
|
||||
|
||||
@@ -1928,7 +1928,7 @@ void DebuggerPluginPrivate::showToolTip(ITextEditor *editor,
|
||||
return;
|
||||
if (!currentEngine())
|
||||
return;
|
||||
if (currentEngine()->state() != InferiorStopOk)
|
||||
if (!currentEngine()->canDisplayTooltip())
|
||||
return;
|
||||
QTC_ASSERT(handled, return);
|
||||
*handled = true;
|
||||
|
||||
@@ -263,6 +263,11 @@ void QmlEngine::pauseConnection()
|
||||
d->m_adapter.pauseConnection();
|
||||
}
|
||||
|
||||
bool QmlEngine::canDisplayTooltip() const
|
||||
{
|
||||
return state() == InferiorRunOk || state() == InferiorStopOk;
|
||||
}
|
||||
|
||||
void QmlEngine::closeConnection()
|
||||
{
|
||||
ExtensionSystem::PluginManager *pluginManager =
|
||||
|
||||
@@ -60,6 +60,7 @@ public:
|
||||
|
||||
void gotoLocation(const Location &location);
|
||||
void pauseConnection();
|
||||
bool canDisplayTooltip() const;
|
||||
|
||||
public slots:
|
||||
void messageReceived(const QByteArray &message);
|
||||
|
||||
Reference in New Issue
Block a user