diff options
| author | hjk <hjk@theqtcompany.com> | 2015-02-10 17:11:43 +0100 |
|---|---|---|
| committer | hjk <hjk@theqtcompany.com> | 2015-02-11 08:22:47 +0000 |
| commit | eff2ac7a3da7d313c982f677d5bcf9b021bcdd65 (patch) | |
| tree | 3461a817f783ea58d00be046e4eb8e99de13a264 | |
| parent | 3ff13acf750c73d1292b66ca7c8150e3558436cc (diff) | |
| download | qt-creator-eff2ac7a3da7d313c982f677d5bcf9b021bcdd65.tar.gz | |
Debugger: Go back to plain QTreeView for tooltips
Nothing of the BaseTreeView functionality is used, and there seems
to be a off-by-1 in column width computation leading to unnecessary
eliding.
Change-Id: I4426070742801864edfdba4c912ad8cc8a15f7bb
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
| -rw-r--r-- | src/plugins/debugger/debuggertooltipmanager.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp index 5ec48281ce..5c84e54568 100644 --- a/src/plugins/debugger/debuggertooltipmanager.cpp +++ b/src/plugins/debugger/debuggertooltipmanager.cpp @@ -360,7 +360,7 @@ void ToolTipModel::restoreTreeModel(QXmlStreamReader &r) */ -class DebuggerToolTipTreeView : public BaseTreeView +class DebuggerToolTipTreeView : public QTreeView { public: explicit DebuggerToolTipTreeView(QWidget *parent = 0); @@ -386,7 +386,7 @@ public: }; DebuggerToolTipTreeView::DebuggerToolTipTreeView(QWidget *parent) - : BaseTreeView(parent) + : QTreeView(parent) { setHeaderHidden(true); setEditTriggers(NoEditTriggers); @@ -450,10 +450,11 @@ void DebuggerToolTipTreeView::computeSize() reexpand(m->index(0, 0)); const int columnCount = m->columnCount(); rootDecorated = m->rowCount() > 0; - if (rootDecorated) - for (int i = 0; i < columnCount; ++i) { - resizeColumnToContents(i); - columns += sizeHintForColumn(i); + if (rootDecorated) { + for (int i = 0; i < columnCount; ++i) { + resizeColumnToContents(i); + columns += sizeHintForColumn(i); + } } if (columns < 100) columns = 100; // Prevent toolbar from shrinking when displaying 'Previous' @@ -582,7 +583,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget() auto mainLayout = new QVBoxLayout(this); mainLayout->setSizeConstraint(QLayout::SetFixedSize); - mainLayout->setContentsMargins(1, 1, 1, 1); + mainLayout->setContentsMargins(0, 0, 0, 0); mainLayout->addWidget(toolBar); mainLayout->addWidget(treeView); |
