Debugger[CDB]: Show expandable tooltips.

By setting a filter model on the locals model.
Prepare infrastructure for filter models for pinneable
tooltips in debuggertooltips.
This commit is contained in:
Friedemann Kleint
2011-01-25 13:59:25 +01:00
parent b19521603c
commit bc30185bed
3 changed files with 48 additions and 3 deletions

View File

@@ -440,9 +440,11 @@ void CdbEngine::setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEd
if (!(exp.at(0).isLetter() || exp.at(0) == QLatin1Char('_')))
return;
const QByteArray iname = QByteArray(localsPrefixC) + exp.toAscii();
if (const WatchData *data = watchHandler()->findItem(iname)) {
QToolTip::hideText();
QToolTip::showText(mousePos, data->toToolTip());
const QModelIndex index = watchHandler()->itemIndex(iname);
if (index.isValid()) {
showDebuggerToolTip(mousePos, watchHandler()->modelForIName(iname), index.row());
} else {
hideDebuggerToolTip();
}
}