QmlDebugger: displaying tooltips while qml is running

Reviewed-by:  hjk
This commit is contained in:
Christiaan Janssen
2011-01-24 16:58:35 +01:00
parent 0e4766465f
commit 5ac9a19465
4 changed files with 9 additions and 1 deletions

View File

@@ -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();

View File

@@ -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;

View File

@@ -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 =

View File

@@ -60,6 +60,7 @@ public:
void gotoLocation(const Location &location);
void pauseConnection();
bool canDisplayTooltip() const;
public slots:
void messageReceived(const QByteArray &message);