From 4d3fe76796fa12e70a0c0548017f690c5f729f67 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 12 Nov 2018 16:00:54 +0100 Subject: [PATCH] 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 --- src/plugins/debugger/debuggerplugin.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 1c5370eb699..acf40b317ea 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(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;