Commit 9c57b100 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: Do not display empty tooltips



Task-number: QTCREATORBUG-6893
Change-Id: Idb780e97c23f6cc5d1bcede149959b2e58f9eaa2
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 84b82446
......@@ -3734,10 +3734,9 @@ bool GdbEngine::showToolTip()
return true;
}
const QModelIndex index = watchHandler()->itemIndex(iname);
if (!index.isValid()) {
if (!watchHandler()->isValidToolTip(iname)) {
watchHandler()->removeData(iname);
return false;
return true;
}
DebuggerToolTipWidget *tw = new DebuggerToolTipWidget;
tw->setExpression(expression);
......
......@@ -1893,5 +1893,11 @@ void WatchHandler::resetLocation()
}
}
bool WatchHandler::isValidToolTip(const QByteArray &iname) const
{
WatchItem *item = m_tooltips->findItem(iname, m_tooltips->m_root);
return item && !item->type.trimmed().isEmpty();
}
} // namespace Internal
} // namespace Debugger
......@@ -203,6 +203,7 @@ public:
void scheduleResetLocation();
void resetLocation();
bool isValidToolTip(const QByteArray &iname) const;
private:
friend class WatchModel;
......
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