aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorhjk <[email protected]>2014-06-04 14:45:10 +0200
committerhjk <[email protected]>2014-06-04 17:17:49 +0200
commit11a2d3dc46688b1228371f86ec719e890e2967d8 (patch)
treeb6134f1af8c2072bd8f2fc04259e58d23cc3a563 /src/plugins/debugger
parent8d04a3aa809f488b009900037a7e5adf3847bba2 (diff)
Debugger: Consolidate Debugger view creation
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/basewindow.cpp73
-rw-r--r--src/plugins/debugger/basewindow.h56
-rw-r--r--src/plugins/debugger/breakwindow.cpp9
-rw-r--r--src/plugins/debugger/breakwindow.h11
-rw-r--r--src/plugins/debugger/debugger.pro2
-rw-r--r--src/plugins/debugger/debugger.qbs1
-rw-r--r--src/plugins/debugger/debuggercore.h3
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp169
-rw-r--r--src/plugins/debugger/moduleswindow.cpp9
-rw-r--r--src/plugins/debugger/moduleswindow.h11
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp14
-rw-r--r--src/plugins/debugger/qml/qmlengine.h2
-rw-r--r--src/plugins/debugger/registerwindow.cpp9
-rw-r--r--src/plugins/debugger/registerwindow.h11
-rw-r--r--src/plugins/debugger/snapshotwindow.h12
-rw-r--r--src/plugins/debugger/sourcefileswindow.cpp9
-rw-r--r--src/plugins/debugger/sourcefileswindow.h11
-rw-r--r--src/plugins/debugger/stackwindow.cpp3
-rw-r--r--src/plugins/debugger/stackwindow.h14
-rw-r--r--src/plugins/debugger/threadswindow.cpp7
-rw-r--r--src/plugins/debugger/threadswindow.h9
-rw-r--r--src/plugins/debugger/watchwindow.cpp5
-rw-r--r--src/plugins/debugger/watchwindow.h15
23 files changed, 137 insertions, 328 deletions
diff --git a/src/plugins/debugger/basewindow.cpp b/src/plugins/debugger/basewindow.cpp
deleted file mode 100644
index f80576e5e2a..00000000000
--- a/src/plugins/debugger/basewindow.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "basewindow.h"
-
-#include "debuggeractions.h"
-#include "debuggercore.h"
-
-#include <aggregation/aggregate.h>
-#include <coreplugin/findplaceholder.h>
-#include <coreplugin/find/treeviewfind.h>
-#include <utils/savedaction.h>
-#include <utils/basetreeview.h>
-
-#include <QVBoxLayout>
-
-namespace Debugger {
-namespace Internal {
-
-BaseWindow::BaseWindow(QTreeView *treeView, QWidget *parent)
- : QWidget(parent), m_treeView(treeView)
-{
- QAction *act = debuggerCore()->action(UseAlternatingRowColors);
- m_treeView->setAlternatingRowColors(act->isChecked());
- connect(act, SIGNAL(toggled(bool)),
- SLOT(setAlternatingRowColorsHelper(bool)));
-
- if (Utils::BaseTreeView *tv = qobject_cast<Utils::BaseTreeView *>(m_treeView)) {
- act = debuggerCore()->action(AlwaysAdjustColumnWidths);
- tv->setAlwaysAdjustColumns(act->isChecked());
- connect(act, SIGNAL(toggled(bool)),
- SLOT(setAlwaysAdjustColumns(bool)));
- }
-
- QVBoxLayout *vbox = new QVBoxLayout(this);
- vbox->setMargin(0);
- vbox->setSpacing(0);
- vbox->addWidget(m_treeView);
- vbox->addWidget(new Core::FindToolBarPlaceHolder(this));
-
- Aggregation::Aggregate *agg = new Aggregation::Aggregate;
- agg->add(m_treeView);
- agg->add(new Core::TreeViewFind(m_treeView));
-}
-
-} // namespace Internal
-} // namespace Debugger
diff --git a/src/plugins/debugger/basewindow.h b/src/plugins/debugger/basewindow.h
deleted file mode 100644
index 3258a40dc68..00000000000
--- a/src/plugins/debugger/basewindow.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef DEBUGGER_BASEWINDOW_H
-#define DEBUGGER_BASEWINDOW_H
-
-#include <QTreeView>
-
-namespace Debugger {
-namespace Internal {
-
-class BaseWindow : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit BaseWindow(QTreeView *treeView, QWidget *parent = 0);
- void setModel(QAbstractItemModel *model) { m_treeView->setModel(model); }
- QHeaderView *header() const { return m_treeView->header(); }
- QAbstractItemModel *model() const { return m_treeView->model(); }
- QTreeView *treeView() const { return m_treeView; }
-
-private:
- QTreeView *m_treeView;
-};
-
-} // namespace Internal
-} // namespace Debugger
-
-#endif // DEBUGGER_BASEWINDOW_H
diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp
index 5a2925200d6..5279e1c0efb 100644
--- a/src/plugins/debugger/breakwindow.cpp
+++ b/src/plugins/debugger/breakwindow.cpp
@@ -674,8 +674,7 @@ MultiBreakPointsDialog::MultiBreakPointsDialog(QWidget *parent) :
//
///////////////////////////////////////////////////////////////////////
-BreakTreeView::BreakTreeView(QWidget *parent)
- : BaseTreeView(parent)
+BreakTreeView::BreakTreeView()
{
setWindowIcon(QIcon(QLatin1String(":/debugger/images/debugger_breakpoints.png")));
setSelectionMode(QAbstractItemView::ExtendedSelection);
@@ -952,12 +951,6 @@ void BreakTreeView::rowActivated(const QModelIndex &index)
breakHandler()->gotoLocation(breakHandler()->findBreakpointByIndex(index));
}
-BreakWindow::BreakWindow()
- : BaseWindow(new BreakTreeView)
-{
- setWindowTitle(tr("Breakpoints"));
-}
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/breakwindow.h b/src/plugins/debugger/breakwindow.h
index 9245bfcfee6..66a79145a9d 100644
--- a/src/plugins/debugger/breakwindow.h
+++ b/src/plugins/debugger/breakwindow.h
@@ -31,7 +31,6 @@
#define DEBUGGER_BREAKWINDOW_H
#include "breakpoint.h"
-#include "basewindow.h"
#include <utils/basetreeview.h>
namespace Debugger {
@@ -42,7 +41,7 @@ class BreakTreeView : public Utils::BaseTreeView
Q_OBJECT
public:
- explicit BreakTreeView(QWidget *parent = 0);
+ BreakTreeView();
static void editBreakpoint(BreakpointModelId id, QWidget *parent);
void setModel(QAbstractItemModel *model);
@@ -64,14 +63,6 @@ private:
void setBreakpointsEnabled(const BreakpointModelIds &ids, bool enabled);
};
-class BreakWindow : public BaseWindow
-{
- Q_OBJECT
-
-public:
- BreakWindow();
-};
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro
index 2bbfbbc74d2..7c3b414e3f5 100644
--- a/src/plugins/debugger/debugger.pro
+++ b/src/plugins/debugger/debugger.pro
@@ -13,7 +13,6 @@ QT += gui \
CONFIG += exceptions
HEADERS += \
- basewindow.h \
breakhandler.h \
breakpoint.h \
breakpointmarker.h \
@@ -76,7 +75,6 @@ HEADERS += \
unstartedappwatcherdialog.h
SOURCES += \
- basewindow.cpp \
breakhandler.cpp \
breakpoint.cpp \
breakpointmarker.cpp \
diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs
index e66aacb7f40..eaad7392704 100644
--- a/src/plugins/debugger/debugger.qbs
+++ b/src/plugins/debugger/debugger.qbs
@@ -28,7 +28,6 @@ QtcPlugin {
Group {
name: "General"
files: [
- "basewindow.cpp", "basewindow.h",
"breakhandler.cpp", "breakhandler.h",
"breakpoint.cpp", "breakpoint.h",
"breakpointmarker.cpp", "breakpointmarker.h",
diff --git a/src/plugins/debugger/debuggercore.h b/src/plugins/debugger/debuggercore.h
index 3be5cb2851b..b53c8189495 100644
--- a/src/plugins/debugger/debuggercore.h
+++ b/src/plugins/debugger/debuggercore.h
@@ -41,6 +41,7 @@ QT_BEGIN_NAMESPACE
class QIcon;
class QMessageBox;
class QWidget;
+class QTreeView;
QT_END_NAMESPACE
namespace CPlusPlus { class Snapshot; }
@@ -122,6 +123,8 @@ public:
virtual DebuggerToolTipManager *toolTipManager() const = 0;
virtual QSharedPointer<GlobalDebuggerOptions> globalDebuggerOptions() const = 0;
+ static QTreeView *inspectorView();
+
public slots:
virtual void attachExternalApplication(ProjectExplorer::RunControl *rc) = 0;
};
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index e46caaf9f11..a362638f9d2 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -101,11 +101,13 @@
#include <texteditor/fontsettings.h>
#include <texteditor/texteditorsettings.h>
+#include <utils/basetreeview.h>
#include <utils/hostosinfo.h>
-#include <utils/qtcassert.h>
-#include <utils/styledbar.h>
#include <utils/proxyaction.h>
+#include <utils/qtcassert.h>
+#include <utils/savedaction.h>
#include <utils/statuslabel.h>
+#include <utils/styledbar.h>
#include <utils/winutils.h>
#include <QApplication>
@@ -121,6 +123,11 @@
#include <QToolButton>
#include <QtPlugin>
#include <QTreeWidget>
+#include <QVBoxLayout>
+
+#include <aggregation/aggregate.h>
+#include <coreplugin/findplaceholder.h>
+#include <coreplugin/find/treeviewfind.h>
#ifdef WITH_TESTS
#include <QTest>
@@ -526,6 +533,36 @@ public:
//
///////////////////////////////////////////////////////////////////////
+static QWidget *addSearch(BaseTreeView *treeView, const QString &title, const char *objectName)
+{
+ QWidget *widget = new QWidget;
+
+ QAction *act = debuggerCore()->action(UseAlternatingRowColors);
+ treeView->setAlternatingRowColors(act->isChecked());
+ QObject::connect(act, SIGNAL(toggled(bool)),
+ treeView, SLOT(setAlternatingRowColorsHelper(bool)));
+
+ act = debuggerCore()->action(AlwaysAdjustColumnWidths);
+ treeView->setAlwaysAdjustColumns(act->isChecked());
+ QObject::connect(act, SIGNAL(toggled(bool)),
+ treeView, SLOT(setAlwaysAdjustColumns(bool)));
+
+ QVBoxLayout *vbox = new QVBoxLayout(widget);
+ vbox->setMargin(0);
+ vbox->setSpacing(0);
+ vbox->addWidget(treeView);
+ vbox->addWidget(new Core::FindToolBarPlaceHolder(widget));
+
+ Aggregation::Aggregate *agg = new Aggregation::Aggregate;
+ agg->add(treeView);
+ agg->add(new Core::TreeViewFind(treeView));
+
+ widget->setObjectName(QLatin1String(objectName));
+ widget->setWindowTitle(title);
+
+ return widget;
+}
+
static QString executableForPid(qint64 pid)
{
foreach (const DeviceProcessItem &p, DeviceProcessList::localProcesses())
@@ -817,8 +854,8 @@ public slots:
void updateWatchersHeader(int section, int, int newSize)
{
- m_watchersWindow->header()->resizeSection(section, newSize);
- m_returnWindow->header()->resizeSection(section, newSize);
+ m_watchersView->header()->resizeSection(section, newSize);
+ m_returnView->header()->resizeSection(section, newSize);
}
@@ -1240,18 +1277,30 @@ public:
StatusLabel *m_statusLabel;
QComboBox *m_threadBox;
- BaseWindow *m_breakWindow;
+ BaseTreeView *m_breakView;
+ BaseTreeView *m_returnView;
+ BaseTreeView *m_localsView;
+ BaseTreeView *m_watchersView;
+ BaseTreeView *m_inspectorView;
+ BaseTreeView *m_registerView;
+ BaseTreeView *m_modulesView;
+ BaseTreeView *m_snapshotView;
+ BaseTreeView *m_sourceFilesView;
+ BaseTreeView *m_stackView;
+ BaseTreeView *m_threadsView;
+
+ QWidget *m_breakWindow;
BreakHandler *m_breakHandler;
- WatchWindow *m_returnWindow;
- WatchWindow *m_localsWindow;
- WatchWindow *m_watchersWindow;
- WatchWindow *m_inspectorWindow;
- BaseWindow *m_registerWindow;
- BaseWindow *m_modulesWindow;
- BaseWindow *m_snapshotWindow;
- BaseWindow *m_sourceFilesWindow;
- BaseWindow *m_stackWindow;
- BaseWindow *m_threadsWindow;
+ QWidget *m_returnWindow;
+ QWidget *m_localsWindow;
+ QWidget *m_watchersWindow;
+ QWidget *m_inspectorWindow;
+ QWidget *m_registerWindow;
+ QWidget *m_modulesWindow;
+ QWidget *m_snapshotWindow;
+ QWidget *m_sourceFilesWindow;
+ QWidget *m_stackWindow;
+ QWidget *m_threadsWindow;
LogWindow *m_logWindow;
LocalsAndExpressionsWindow *m_localsAndExpressionsWindow;
@@ -2097,15 +2146,15 @@ void DebuggerPluginPrivate::connectEngine(DebuggerEngine *engine)
m_currentEngine->resetLocation();
m_currentEngine = engine;
- m_localsWindow->setModel(engine->watchModel());
- m_modulesWindow->setModel(engine->modulesModel());
- m_registerWindow->setModel(engine->registerModel());
- m_returnWindow->setModel(engine->watchModel());
- m_sourceFilesWindow->setModel(engine->sourceFilesModel());
- m_stackWindow->setModel(engine->stackModel());
- m_threadsWindow->setModel(engine->threadsModel());
- m_watchersWindow->setModel(engine->watchModel());
- m_inspectorWindow->setModel(engine->watchModel());
+ m_localsView->setModel(engine->watchModel());
+ m_modulesView->setModel(engine->modulesModel());
+ m_registerView->setModel(engine->registerModel());
+ m_returnView->setModel(engine->watchModel());
+ m_sourceFilesView->setModel(engine->sourceFilesModel());
+ m_stackView->setModel(engine->stackModel());
+ m_threadsView->setModel(engine->threadsModel());
+ m_watchersView->setModel(engine->watchModel());
+ m_inspectorView->setModel(engine->watchModel());
mainWindow()->setEngineDebugLanguages(engine->startParameters().languages);
}
@@ -2239,8 +2288,8 @@ void DebuggerPluginPrivate::updateWatchersWindow(bool showWatch, bool showReturn
void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
{
QTC_ASSERT(engine, return);
- QTC_ASSERT(m_watchersWindow->model(), return);
- QTC_ASSERT(m_returnWindow->model(), return);
+ QTC_ASSERT(m_watchersView->model(), return);
+ QTC_ASSERT(m_returnView->model(), return);
QTC_ASSERT(!engine->isSlaveEngine(), return);
m_threadBox->setCurrentIndex(engine->threadsHandler()->currentThreadIndex());
@@ -2539,6 +2588,11 @@ QVariant DebuggerCore::sessionValue(const QByteArray &key)
return SessionManager::value(QString::fromUtf8(key));
}
+QTreeView *DebuggerCore::inspectorView()
+{
+ return theDebuggerCore->m_inspectorView;
+}
+
void DebuggerPluginPrivate::openTextEditor(const QString &titlePattern0,
const QString &contents)
{
@@ -2741,40 +2795,49 @@ void DebuggerPluginPrivate::extensionsInitialized()
m_statusLabel = new StatusLabel;
- m_breakHandler = new BreakHandler;
- m_breakWindow = new BreakWindow;
- m_breakWindow->setObjectName(QLatin1String(DOCKWIDGET_BREAK));
- m_breakWindow->setModel(m_breakHandler->model());
-
- m_modulesWindow = new ModulesWindow;
- m_modulesWindow->setObjectName(QLatin1String(DOCKWIDGET_MODULES));
m_logWindow = new LogWindow;
m_logWindow->setObjectName(QLatin1String(DOCKWIDGET_OUTPUT));
- m_registerWindow = new RegisterWindow;
- m_registerWindow->setObjectName(QLatin1String(DOCKWIDGET_REGISTER));
- m_stackWindow = new StackWindow;
- m_stackWindow->setObjectName(QLatin1String(DOCKWIDGET_STACK));
- m_sourceFilesWindow = new SourceFilesWindow;
- m_sourceFilesWindow->setObjectName(QLatin1String(DOCKWIDGET_SOURCE_FILES));
- m_threadsWindow = new ThreadsWindow;
- m_threadsWindow->setObjectName(QLatin1String(DOCKWIDGET_THREADS));
- m_returnWindow = new WatchWindow(ReturnType);
- m_returnWindow->setObjectName(QLatin1String("CppDebugReturn"));
- m_localsWindow = new WatchWindow(LocalsType);
- m_localsWindow->setObjectName(QLatin1String("CppDebugLocals"));
- m_watchersWindow = new WatchWindow(WatchersType);
- m_watchersWindow->setObjectName(QLatin1String("CppDebugWatchers"));
- m_inspectorWindow = new WatchWindow(InspectType);
- m_inspectorWindow->setObjectName(QLatin1String("Inspector"));
+
+ m_breakHandler = new BreakHandler;
+ m_breakView = new BreakTreeView;
+ m_breakView->setModel(m_breakHandler->model());
+ m_breakWindow = addSearch(m_breakView, tr("Breakpoints"), DOCKWIDGET_BREAK);
+
+ m_modulesView = new ModulesTreeView;
+ m_modulesWindow = addSearch(m_modulesView, tr("Modules"), DOCKWIDGET_MODULES);
+
+ m_registerView = new RegisterTreeView;
+ m_registerWindow = addSearch(m_registerView, tr("Registers"), DOCKWIDGET_REGISTER);
+
+ m_stackView = new StackTreeView;
+ m_stackWindow = addSearch(m_stackView, tr("Stack"), DOCKWIDGET_STACK);
+
+ m_sourceFilesView = new SourceFilesTreeView;
+ m_sourceFilesWindow = addSearch(m_sourceFilesView, tr("Source Files"), DOCKWIDGET_SOURCE_FILES);
+
+ m_threadsView = new ThreadsTreeView;
+ m_threadsWindow = addSearch(m_threadsView, tr("Threads"), DOCKWIDGET_THREADS);
+
+ m_returnView = new WatchTreeView(ReturnType);
+ m_returnWindow = addSearch(m_returnView, tr("Locals and Expressions"), "CppDebugReturn");
+
+ m_localsView = new WatchTreeView(LocalsType);
+ m_localsWindow = addSearch(m_localsView, tr("Locals and Expressions"), "CppDebugLocals");
+
+ m_watchersView = new WatchTreeView(WatchersType);
+ m_watchersWindow = addSearch(m_watchersView, tr("Locals and Expressions"), "CppDebugWatchers");
+
+ m_inspectorView = new WatchTreeView(InspectType);
+ m_inspectorWindow = addSearch(m_inspectorView, tr("Locals and Expressions"), "Inspector");
// Snapshot
m_snapshotHandler = new SnapshotHandler;
- m_snapshotWindow = new SnapshotWindow(m_snapshotHandler);
- m_snapshotWindow->setObjectName(QLatin1String(DOCKWIDGET_SNAPSHOTS));
- m_snapshotWindow->setModel(m_snapshotHandler->model());
+ m_snapshotView = new SnapshotTreeView(m_snapshotHandler);
+ m_snapshotView->setModel(m_snapshotHandler->model());
+ m_snapshotWindow = addSearch(m_snapshotView, tr("Snapshots"), DOCKWIDGET_SNAPSHOTS);
// Watchers
- connect(m_localsWindow->header(), SIGNAL(sectionResized(int,int,int)),
+ connect(m_localsView->header(), SIGNAL(sectionResized(int,int,int)),
SLOT(updateWatchersHeader(int,int,int)), Qt::QueuedConnection);
QAction *act = 0;
diff --git a/src/plugins/debugger/moduleswindow.cpp b/src/plugins/debugger/moduleswindow.cpp
index 6e3c5aac552..546f639ba6e 100644
--- a/src/plugins/debugger/moduleswindow.cpp
+++ b/src/plugins/debugger/moduleswindow.cpp
@@ -53,8 +53,7 @@
namespace Debugger {
namespace Internal {
-ModulesTreeView::ModulesTreeView(QWidget *parent)
- : BaseTreeView(parent)
+ModulesTreeView::ModulesTreeView()
{
setSortingEnabled(true);
@@ -175,11 +174,5 @@ void ModulesTreeView::contextMenuEvent(QContextMenuEvent *ev)
QProcess::startDetached(QLatin1String("depends"), QStringList(fileName));
}
-ModulesWindow::ModulesWindow()
- : BaseWindow(new ModulesTreeView)
-{
- setWindowTitle(tr("Modules"));
-}
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/moduleswindow.h b/src/plugins/debugger/moduleswindow.h
index c651d146769..632c5904414 100644
--- a/src/plugins/debugger/moduleswindow.h
+++ b/src/plugins/debugger/moduleswindow.h
@@ -30,7 +30,6 @@
#ifndef DEBUGGER_MODULESWINDOW_H
#define DEBUGGER_MODULESWINDOW_H
-#include "basewindow.h"
#include <utils/basetreeview.h>
namespace Debugger {
@@ -41,7 +40,7 @@ class ModulesTreeView : public Utils::BaseTreeView
Q_OBJECT
public:
- explicit ModulesTreeView(QWidget *parent = 0);
+ ModulesTreeView();
private slots:
void moduleActivated(const QModelIndex &index);
@@ -50,14 +49,6 @@ private:
void contextMenuEvent(QContextMenuEvent *ev);
};
-class ModulesWindow : public BaseWindow
-{
- Q_OBJECT
-
-public:
- ModulesWindow();
-};
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 63707d00d6b..1f5f4cbf084 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -80,6 +80,11 @@ using namespace AST;
namespace Debugger {
namespace Internal {
+static QTreeView *inspectorTreeView()
+{
+ return DebuggerCore::inspectorView();
+}
+
class ASTWalker : public Visitor
{
public:
@@ -1359,15 +1364,6 @@ bool QmlEngine::adjustBreakpointLineAndColumn(
return success;
}
-WatchTreeView *QmlEngine::inspectorTreeView() const
-{
- DebuggerMainWindow *dw = qobject_cast<DebuggerMainWindow *>(debuggerCore()->mainWindow());
- LocalsAndExpressionsWindow *leW = qobject_cast<LocalsAndExpressionsWindow *>(
- dw->dockWidget(_(DOCKWIDGET_WATCHERS))->widget());
- WatchWindow *inspectorWindow = qobject_cast<WatchWindow *>(leW->inspectorWidget());
- return qobject_cast<WatchTreeView *>(inspectorWindow->treeView());
-}
-
DebuggerEngine *createQmlEngine(const DebuggerStartParameters &sp)
{
return new QmlEngine(sp);
diff --git a/src/plugins/debugger/qml/qmlengine.h b/src/plugins/debugger/qml/qmlengine.h
index 8901f8f89ce..8a9e4bb98b5 100644
--- a/src/plugins/debugger/qml/qmlengine.h
+++ b/src/plugins/debugger/qml/qmlengine.h
@@ -184,8 +184,6 @@ private:
bool adjustBreakpointLineAndColumn(const QString &filePath, quint32 *line,
quint32 *column, bool *valid);
- WatchTreeView *inspectorTreeView() const;
-
QmlAdapter m_adapter;
QmlInspectorAdapter m_inspectorAdapter;
ProjectExplorer::ApplicationLauncher m_applicationLauncher;
diff --git a/src/plugins/debugger/registerwindow.cpp b/src/plugins/debugger/registerwindow.cpp
index 478745ca2e7..c641469a238 100644
--- a/src/plugins/debugger/registerwindow.cpp
+++ b/src/plugins/debugger/registerwindow.cpp
@@ -157,8 +157,7 @@ public:
//
///////////////////////////////////////////////////////////////////////
-RegisterTreeView::RegisterTreeView(QWidget *parent)
- : BaseTreeView(parent)
+RegisterTreeView::RegisterTreeView()
{
setItemDelegate(new RegisterDelegate(this));
}
@@ -267,11 +266,5 @@ void RegisterTreeView::reloadRegisters()
currentEngine()->reloadRegisters();
}
-RegisterWindow::RegisterWindow()
- : BaseWindow(new RegisterTreeView)
-{
- setWindowTitle(tr("Registers"));
-}
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/registerwindow.h b/src/plugins/debugger/registerwindow.h
index 902fe9532d9..df19feb88e1 100644
--- a/src/plugins/debugger/registerwindow.h
+++ b/src/plugins/debugger/registerwindow.h
@@ -30,7 +30,6 @@
#ifndef DEBUGGER_REGISTERWINDOW_H
#define DEBUGGER_REGISTERWINDOW_H
-#include "basewindow.h"
#include <utils/basetreeview.h>
namespace Debugger {
@@ -41,7 +40,7 @@ class RegisterTreeView : public Utils::BaseTreeView
Q_OBJECT
public:
- explicit RegisterTreeView(QWidget *parent = 0);
+ RegisterTreeView();
public slots:
void reloadRegisters();
@@ -50,14 +49,6 @@ private:
void contextMenuEvent(QContextMenuEvent *ev);
};
-class RegisterWindow : public BaseWindow
-{
- Q_OBJECT
-
-public:
- RegisterWindow();
-};
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/snapshotwindow.h b/src/plugins/debugger/snapshotwindow.h
index c8a5b280630..200295295d1 100644
--- a/src/plugins/debugger/snapshotwindow.h
+++ b/src/plugins/debugger/snapshotwindow.h
@@ -30,7 +30,6 @@
#ifndef DEBUGGER_SNAPSHOTWINDOW_H
#define DEBUGGER_SNAPSHOTWINDOW_H
-#include "basewindow.h"
#include <utils/basetreeview.h>
namespace Debugger {
@@ -54,17 +53,6 @@ private:
SnapshotHandler *m_snapshotHandler;
};
-class SnapshotWindow : public BaseWindow
-{
- Q_OBJECT
-public:
- explicit SnapshotWindow(SnapshotHandler *handler)
- : BaseWindow(new SnapshotTreeView(handler))
- {
- setWindowTitle(tr("Snapshots"));
- }
-};
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/sourcefileswindow.cpp b/src/plugins/debugger/sourcefileswindow.cpp
index 6ddb7143e7e..b8849f1666a 100644
--- a/src/plugins/debugger/sourcefileswindow.cpp
+++ b/src/plugins/debugger/sourcefileswindow.cpp
@@ -51,8 +51,7 @@
namespace Debugger {
namespace Internal {
-SourceFilesTreeView::SourceFilesTreeView(QWidget *parent)
- : BaseTreeView(parent)
+SourceFilesTreeView::SourceFilesTreeView()
{
setSortingEnabled(true);
}
@@ -100,12 +99,6 @@ void SourceFilesTreeView::contextMenuEvent(QContextMenuEvent *ev)
engine->gotoLocation(name);
}
-SourceFilesWindow::SourceFilesWindow()
- : BaseWindow(new SourceFilesTreeView)
-{
- setWindowTitle(tr("Source Files"));
-}
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/sourcefileswindow.h b/src/plugins/debugger/sourcefileswindow.h
index c1a82c5cc46..c3c19fd36bd 100644
--- a/src/plugins/debugger/sourcefileswindow.h
+++ b/src/plugins/debugger/sourcefileswindow.h
@@ -30,7 +30,6 @@
#ifndef SOURCEFILESWINDOW_H
#define SOURCEFILESWINDOW_H
-#include "basewindow.h"
#include <utils/basetreeview.h>
namespace Debugger {
@@ -41,21 +40,13 @@ class SourceFilesTreeView : public Utils::BaseTreeView
Q_OBJECT
public:
- SourceFilesTreeView(QWidget *parent = 0);
+ SourceFilesTreeView();
private:
void rowActivated(const QModelIndex &index);
void contextMenuEvent(QContextMenuEvent *ev);
};
-class SourceFilesWindow : public BaseWindow
-{
- Q_OBJECT
-
-public:
- SourceFilesWindow();
-};
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp
index 83d0f26ceec..99ef7af26e7 100644
--- a/src/plugins/debugger/stackwindow.cpp
+++ b/src/plugins/debugger/stackwindow.cpp
@@ -60,8 +60,7 @@ static DebuggerEngine *currentEngine()
return debuggerCore()->currentEngine();
}
-StackTreeView::StackTreeView(QWidget *parent)
- : BaseTreeView(parent)
+StackTreeView::StackTreeView()
{
setWindowTitle(tr("Stack"));
diff --git a/src/plugins/debugger/stackwindow.h b/src/plugins/debugger/stackwindow.h
index 137e872ccc7..c78b1fea256 100644
--- a/src/plugins/debugger/stackwindow.h
+++ b/src/plugins/debugger/stackwindow.h
@@ -30,7 +30,6 @@
#ifndef DEBUGGER_STACKWINDOW_H
#define DEBUGGER_STACKWINDOW_H
-#include "basewindow.h"
#include <utils/basetreeview.h>
namespace Debugger {
@@ -41,7 +40,7 @@ class StackTreeView : public Utils::BaseTreeView
Q_OBJECT
public:
- explicit StackTreeView(QWidget *parent = 0);
+ StackTreeView();
private slots:
void showAddressColumn(bool on);
@@ -54,17 +53,6 @@ private:
void copyContentsToClipboard();
};
-class StackWindow : public BaseWindow
-{
- Q_OBJECT
-
-public:
- StackWindow() : BaseWindow(new StackTreeView)
- {
- setWindowTitle(tr("Stack"));
- }
-};
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/threadswindow.cpp b/src/plugins/debugger/threadswindow.cpp
index 570223ea827..ba867b8477d 100644
--- a/src/plugins/debugger/threadswindow.cpp
+++ b/src/plugins/debugger/threadswindow.cpp
@@ -60,12 +60,5 @@ void ThreadsTreeView::contextMenuEvent(QContextMenuEvent *ev)
menu.exec(ev->globalPos());
}
-ThreadsWindow::ThreadsWindow()
- : BaseWindow(new ThreadsTreeView)
-{
- setWindowTitle(tr("Threads"));
- setObjectName(QLatin1String("ThreadsWindow"));
-}
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/threadswindow.h b/src/plugins/debugger/threadswindow.h
index 2f229acb26f..87c41acd68d 100644
--- a/src/plugins/debugger/threadswindow.h
+++ b/src/plugins/debugger/threadswindow.h
@@ -30,7 +30,6 @@
#ifndef THREADSWINDOW_H
#define THREADSWINDOW_H
-#include "basewindow.h"
#include <utils/basetreeview.h>
namespace Debugger {
@@ -48,14 +47,6 @@ private:
void contextMenuEvent(QContextMenuEvent *ev);
};
-class ThreadsWindow : public BaseWindow
-{
- Q_OBJECT
-
-public:
- ThreadsWindow();
-};
-
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index 8e2559403ce..d6fe5511992 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -470,9 +470,8 @@ static void addStackLayoutMemoryView(DebuggerEngine *engine, bool separateView,
//
/////////////////////////////////////////////////////////////////////
-WatchTreeView::WatchTreeView(WatchType type, QWidget *parent)
- : BaseTreeView(parent),
- m_type(type)
+WatchTreeView::WatchTreeView(WatchType type)
+ : m_type(type)
{
setObjectName(QLatin1String("WatchWindow"));
m_grabbing = false;
diff --git a/src/plugins/debugger/watchwindow.h b/src/plugins/debugger/watchwindow.h
index 6210bf0e143..3651e831a36 100644
--- a/src/plugins/debugger/watchwindow.h
+++ b/src/plugins/debugger/watchwindow.h
@@ -30,7 +30,6 @@
#ifndef DEBUGGER_WATCHWINDOW_H
#define DEBUGGER_WATCHWINDOW_H
-#include "basewindow.h"
#include <utils/basetreeview.h>
namespace Debugger {
@@ -49,7 +48,7 @@ class WatchTreeView : public Utils::BaseTreeView
Q_OBJECT
public:
- explicit WatchTreeView(WatchType type, QWidget *parent = 0);
+ explicit WatchTreeView(WatchType type);
WatchType type() const { return m_type; }
void setModel(QAbstractItemModel *model);
@@ -98,18 +97,6 @@ private:
bool m_grabbing;
};
-class WatchWindow : public BaseWindow
-{
- Q_OBJECT
-
-public:
- explicit WatchWindow(WatchType type)
- : BaseWindow(new WatchTreeView(type))
- {
- setWindowTitle(tr("Locals and Expressions"));
- }
-};
-
} // namespace Internal
} // namespace Debugger