Commit eadad258 authored by hjk's avatar hjk Committed by Eike Ziller
Browse files

debugger: fix toplevel expansion behaviour of pinned tooltips



That is the necessary part of the previously reverted patch.

Change-Id: Ie25171cd013712b7141de01d4c23deb20fe08578
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent dd66fe6c
......@@ -1017,7 +1017,7 @@ QAbstractItemModel *DebuggerToolTipWidget::swapModel(QAbstractItemModel *newMode
QAbstractItemModel *oldModel = m_treeView->swapModel(newModel);
// When looking at some 'this.m_foo.x', expand all items
if (newModel) {
if (const int level = m_expression.count(QLatin1Char('.'))) {
if (const int level = m_expression.count(QLatin1Char('.')) + 1) {
QModelIndex index = newModel->index(0, 0);
for (int i = 0; i < level && index.isValid(); i++, index = index.child(0, 0))
m_treeView->setExpanded(index, true);
......
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