summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-11-12 16:00:54 +0100
committerhjk <hjk@qt.io>2018-11-14 09:47:52 +0000
commit4d3fe76796fa12e70a0c0548017f690c5f729f67 (patch)
treed07e8bcabf9357860bbd724c7453148a44f89bf4
parente9d0083ccd80c1edd09fb1dd5e97d48585b5507f (diff)
downloadqt-creator-4d3fe76796fa12e70a0c0548017f690c5f729f67.tar.gz
Debugger: Add some labels to the preset views
In the hope to make it more obvious what the new views are all about,. Change-Id: I3abde8a12cb5ac1f532f3b453c8d73f36498ff3d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 1c5370eb69..acf40b317e 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1023,6 +1023,15 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
const Context cppDebuggercontext(C_CPPDEBUGGER);
const Context qmljsDebuggercontext(C_QMLDEBUGGER);
+ const auto addLabel = [](QWidget *widget, const QString &text) {
+ auto vbox = qobject_cast<QVBoxLayout *>(widget->layout());
+ QTC_ASSERT(vbox, return);
+ auto label = new QLabel(widget);
+ label->setText(text);
+ label->setMargin(6);
+ vbox->insertWidget(0, label);
+ };
+
m_breakpointManagerView = new BaseTreeView;
m_breakpointManagerView->setIconSize(QSize(10, 10));
m_breakpointManagerView->setWindowIcon(Icons::BREAKPOINTS.icon());
@@ -1033,6 +1042,8 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
m_breakpointManagerWindow = addSearch(m_breakpointManagerView);
m_breakpointManagerWindow->setWindowTitle(tr("Breakpoint Preset"));
m_breakpointManagerWindow->setObjectName(DOCKWIDGET_BREAKPOINTMANAGER);
+ addLabel(m_breakpointManagerWindow, m_breakpointManagerWindow->windowTitle());
+
// Snapshot
m_engineManagerView = new BaseTreeView;
@@ -1043,6 +1054,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
m_engineManagerWindow = addSearch(m_engineManagerView);
m_engineManagerWindow->setWindowTitle(tr("Debugger Perspectives"));
m_engineManagerWindow->setObjectName(DOCKWIDGET_ENGINEMANAGER);
+ addLabel(m_engineManagerWindow, m_engineManagerWindow->windowTitle());
// Logging
m_globalLogWindow = new GlobalLogWindow;