summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-02-01 10:59:24 +0100
committerhjk <hjk@qt.io>2018-02-01 10:28:54 +0000
commit1b87d19a64d45072e72980505a936df38dda4d72 (patch)
tree8b149ec832de2d8ad67f270ca6adccdce37b5418 /src/plugins
parent7c417204792fd3c023cf389693d3b3fba8712167 (diff)
downloadqt-creator-1b87d19a64d45072e72980505a936df38dda4d72.tar.gz
Debugger: Modernize
Mostly nullptr instead of 0, but also a few bits of collateral damage. Change-Id: I921991272aca921dcdecf302dfff3716e79dfc24 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/debugger/analyzer/detailederrorview.h2
-rw-r--r--src/plugins/debugger/analyzer/startremotedialog.h2
-rw-r--r--src/plugins/debugger/breakhandler.cpp4
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp4
-rw-r--r--src/plugins/debugger/cdb/cdboptionspage.cpp6
-rw-r--r--src/plugins/debugger/cdb/cdboptionspage.h4
-rw-r--r--src/plugins/debugger/cdb/cdbparsehelpers.h2
-rw-r--r--src/plugins/debugger/console/consoleitemdelegate.h2
-rw-r--r--src/plugins/debugger/console/consoleitemmodel.h2
-rw-r--r--src/plugins/debugger/console/consoleview.cpp8
-rw-r--r--src/plugins/debugger/debuggeractions.cpp2
-rw-r--r--src/plugins/debugger/debuggerdialogs.h7
-rw-r--r--src/plugins/debugger/debuggerengine.h3
-rw-r--r--src/plugins/debugger/debuggeritemmanager.cpp6
-rw-r--r--src/plugins/debugger/debuggermainwindow.h2
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp156
-rw-r--r--src/plugins/debugger/debuggersourcepathmappingwidget.h2
-rw-r--r--src/plugins/debugger/debuggertooltipmanager.cpp4
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp2
-rw-r--r--src/plugins/debugger/gdb/gdboptionspage.cpp2
-rw-r--r--src/plugins/debugger/imageviewer.cpp2
-rw-r--r--src/plugins/debugger/imageviewer.h10
-rw-r--r--src/plugins/debugger/logwindow.h4
-rw-r--r--src/plugins/debugger/outputcollector.cpp13
-rw-r--r--src/plugins/debugger/outputcollector.h8
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp6
-rw-r--r--src/plugins/debugger/registerpostmortemaction.h4
-rw-r--r--src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp4
-rw-r--r--src/plugins/debugger/shared/cdbsymbolpathlisteditor.h10
-rw-r--r--src/plugins/debugger/shared/peutils.cpp2
-rw-r--r--src/plugins/debugger/shared/symbolpathsdialog.h2
-rw-r--r--src/plugins/debugger/sourceutils.cpp4
-rw-r--r--src/plugins/debugger/sourceutils.h4
-rw-r--r--src/plugins/debugger/terminal.cpp2
-rw-r--r--src/plugins/debugger/terminal.h8
-rw-r--r--src/plugins/debugger/unstartedappwatcherdialog.h2
-rw-r--r--src/plugins/debugger/watchdelegatewidgets.h19
-rw-r--r--src/plugins/debugger/watchhandler.cpp4
38 files changed, 160 insertions, 170 deletions
diff --git a/src/plugins/debugger/analyzer/detailederrorview.h b/src/plugins/debugger/analyzer/detailederrorview.h
index 74fbc78aab..9411244b07 100644
--- a/src/plugins/debugger/analyzer/detailederrorview.h
+++ b/src/plugins/debugger/analyzer/detailederrorview.h
@@ -37,7 +37,7 @@ class DEBUGGER_EXPORT DetailedErrorView : public QTreeView
Q_OBJECT
public:
- DetailedErrorView(QWidget *parent = 0);
+ DetailedErrorView(QWidget *parent = nullptr);
~DetailedErrorView();
void goNext();
diff --git a/src/plugins/debugger/analyzer/startremotedialog.h b/src/plugins/debugger/analyzer/startremotedialog.h
index 1a9df377fa..028e512f8b 100644
--- a/src/plugins/debugger/analyzer/startremotedialog.h
+++ b/src/plugins/debugger/analyzer/startremotedialog.h
@@ -40,7 +40,7 @@ class DEBUGGER_EXPORT StartRemoteDialog : public QDialog
Q_OBJECT
public:
- explicit StartRemoteDialog(QWidget *parent = 0);
+ explicit StartRemoteDialog(QWidget *parent = nullptr);
~StartRemoteDialog() override;
ProjectExplorer::StandardRunnable runnable() const;
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index bae65fe320..8938c07708 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -304,7 +304,7 @@ class BreakpointDialog : public QDialog
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::BreakHandler)
public:
- explicit BreakpointDialog(Breakpoint b, QWidget *parent = 0);
+ explicit BreakpointDialog(Breakpoint b, QWidget *parent = nullptr);
bool showDialog(BreakpointParameters *data, BreakpointParts *parts);
void setParameters(const BreakpointParameters &data);
@@ -850,7 +850,7 @@ class MultiBreakPointsDialog : public QDialog
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::BreakHandler)
public:
- MultiBreakPointsDialog(QWidget *parent = 0);
+ MultiBreakPointsDialog(QWidget *parent = nullptr);
QString condition() const { return m_lineEditCondition->text(); }
int ignoreCount() const { return m_spinBoxIgnoreCount->value(); }
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 31e10d0bc0..f64dd94d64 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -154,7 +154,7 @@ static const char localsPrefixC[] = "local.";
struct MemoryViewCookie
{
- explicit MemoryViewCookie(MemoryAgent *a = 0, quint64 addr = 0, quint64 l = 0)
+ explicit MemoryViewCookie(MemoryAgent *a = nullptr, quint64 addr = 0, quint64 l = 0)
: agent(a), address(addr), length(l)
{}
@@ -2735,7 +2735,7 @@ CdbEngine::NormalizedSourceFileName CdbEngine::sourceMapNormalizeFileNameFromDeb
// Parse frame from GDBMI. Duplicate of the gdb code, but that
// has more processing.
-static StackFrames parseFrames(const GdbMi &gdbmi, bool *incomplete = 0)
+static StackFrames parseFrames(const GdbMi &gdbmi, bool *incomplete = nullptr)
{
if (incomplete)
*incomplete = false;
diff --git a/src/plugins/debugger/cdb/cdboptionspage.cpp b/src/plugins/debugger/cdb/cdboptionspage.cpp
index 92dfba966c..416294b496 100644
--- a/src/plugins/debugger/cdb/cdboptionspage.cpp
+++ b/src/plugins/debugger/cdb/cdboptionspage.cpp
@@ -80,12 +80,12 @@ CdbBreakEventWidget::CdbBreakEventWidget(QWidget *parent) : QWidget(parent)
QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->setMargin(0);
QVBoxLayout *leftLayout = new QVBoxLayout;
- QFormLayout *parameterLayout = 0;
+ QFormLayout *parameterLayout = nullptr;
mainLayout->addLayout(leftLayout);
const size_t eventCount = sizeof(eventDescriptions) / sizeof(EventsDescription);
for (size_t e = 0; e < eventCount; e++) {
QCheckBox *cb = new QCheckBox(tr(eventDescriptions[e].description));
- QLineEdit *le = 0;
+ QLineEdit *le = nullptr;
if (eventDescriptions[e].hasParameter) {
if (!parameterLayout) {
parameterLayout = new QFormLayout;
@@ -245,7 +245,7 @@ public:
CdbSymbolPathListEditor *m_symbolPathListEditor;
Utils::PathListEditor *m_sourcePathListEditor;
- CdbPathsPageWidget(QWidget *parent = 0);
+ CdbPathsPageWidget(QWidget *parent = nullptr);
};
CdbPathsPageWidget::CdbPathsPageWidget(QWidget *parent) :
diff --git a/src/plugins/debugger/cdb/cdboptionspage.h b/src/plugins/debugger/cdb/cdboptionspage.h
index 041c69198d..8d2de5b344 100644
--- a/src/plugins/debugger/cdb/cdboptionspage.h
+++ b/src/plugins/debugger/cdb/cdboptionspage.h
@@ -53,7 +53,7 @@ class CdbBreakEventWidget : public QWidget
Q_OBJECT
public:
- explicit CdbBreakEventWidget(QWidget *parent = 0);
+ explicit CdbBreakEventWidget(QWidget *parent = nullptr);
void setBreakEvents(const QStringList &l);
QStringList breakEvents() const;
@@ -71,7 +71,7 @@ class CdbOptionsPageWidget : public QWidget
Q_OBJECT
public:
- explicit CdbOptionsPageWidget(QWidget *parent = 0);
+ explicit CdbOptionsPageWidget(QWidget *parent = nullptr);
QStringList breakEvents() const;
Utils::SavedActionSet group;
diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.h b/src/plugins/debugger/cdb/cdbparsehelpers.h
index d8df9b63ec..d9c906fa94 100644
--- a/src/plugins/debugger/cdb/cdbparsehelpers.h
+++ b/src/plugins/debugger/cdb/cdbparsehelpers.h
@@ -66,7 +66,7 @@ QString cdbClearBreakpointCommand(const BreakpointModelId &id);
// Parse extension command listing breakpoints.
// Note that not all fields are returned, since file, line, function are encoded
// in the expression (that is in addition deleted on resolving for a bp-type breakpoint).
-void parseBreakPoint(const GdbMi &gdbmi, BreakpointResponse *r, QString *expression = 0);
+void parseBreakPoint(const GdbMi &gdbmi, BreakpointResponse *r, QString *expression = nullptr);
// Write memory (f ...).
QString cdbWriteMemoryCommand(quint64 addr, const QByteArray &data);
diff --git a/src/plugins/debugger/console/consoleitemdelegate.h b/src/plugins/debugger/console/consoleitemdelegate.h
index 0cf6889bfe..87896a89c2 100644
--- a/src/plugins/debugger/console/consoleitemdelegate.h
+++ b/src/plugins/debugger/console/consoleitemdelegate.h
@@ -60,7 +60,7 @@ protected:
const QModelIndex &index) const;
private:
- qreal layoutText(QTextLayout &tl, int width, bool *success = 0) const;
+ qreal layoutText(QTextLayout &tl, int width, bool *success = nullptr) const;
private:
ConsoleItemModel *m_model;
diff --git a/src/plugins/debugger/console/consoleitemmodel.h b/src/plugins/debugger/console/consoleitemmodel.h
index 0dadb3945f..5aaab0335c 100644
--- a/src/plugins/debugger/console/consoleitemmodel.h
+++ b/src/plugins/debugger/console/consoleitemmodel.h
@@ -42,7 +42,7 @@ class ConsoleItemModel : public Utils::TreeModel<>
Q_OBJECT
public:
- explicit ConsoleItemModel(QObject *parent = 0);
+ explicit ConsoleItemModel(QObject *parent = nullptr);
void shiftEditableRow();
diff --git a/src/plugins/debugger/console/consoleview.cpp b/src/plugins/debugger/console/consoleview.cpp
index b3586ce6e5..d9352a2ef6 100644
--- a/src/plugins/debugger/console/consoleview.cpp
+++ b/src/plugins/debugger/console/consoleview.cpp
@@ -53,14 +53,16 @@ public:
ConsoleViewStyle(const QString &baseStyleName) : ManhattanStyle(baseStyleName) {}
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter,
- const QWidget *widget = 0) const
+ const QWidget *widget = nullptr) const final
{
if (element != QStyle::PE_PanelItemViewRow)
ManhattanStyle::drawPrimitive(element, option, painter, widget);
}
- int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0,
- QStyleHintReturn *returnData = 0) const {
+ int styleHint(StyleHint hint, const QStyleOption *option = nullptr,
+ const QWidget *widget = nullptr,
+ QStyleHintReturn *returnData = nullptr) const final
+ {
if (hint == SH_ItemView_ShowDecorationSelected)
return 0;
else
diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp
index ebdc77c9d0..791985588c 100644
--- a/src/plugins/debugger/debuggeractions.cpp
+++ b/src/plugins/debugger/debuggeractions.cpp
@@ -106,7 +106,7 @@ DebuggerSettings::DebuggerSettings()
const QString debugModeGroup = QLatin1String(debugModeSettingsGroupC);
const QString cdbSettingsGroup = QLatin1String(cdbSettingsGroupC);
- SavedAction *item = 0;
+ SavedAction *item = nullptr;
item = new SavedAction(this);
insertItem(SettingsDialog, item);
diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h
index d9f3790a14..5a0bad3270 100644
--- a/src/plugins/debugger/debuggerdialogs.h
+++ b/src/plugins/debugger/debuggerdialogs.h
@@ -54,10 +54,10 @@ class DebuggerKitChooser : public ProjectExplorer::KitChooser
public:
enum Mode { AnyDebugging, LocalDebugging };
- explicit DebuggerKitChooser(Mode mode = AnyDebugging, QWidget *parent = 0);
+ explicit DebuggerKitChooser(Mode mode = AnyDebugging, QWidget *parent = nullptr);
protected:
- QString kitToolTip(ProjectExplorer::Kit *k) const;
+ QString kitToolTip(ProjectExplorer::Kit *k) const final;
private:
const ProjectExplorer::Abi m_hostAbi;
@@ -127,8 +127,9 @@ private:
class AddressDialog : public QDialog
{
Q_OBJECT
+
public:
- explicit AddressDialog(QWidget *parent = 0);
+ explicit AddressDialog(QWidget *parent = nullptr);
void setAddress(quint64 a);
quint64 address() const;
diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h
index ee91ef009c..f87947dbe3 100644
--- a/src/plugins/debugger/debuggerengine.h
+++ b/src/plugins/debugger/debuggerengine.h
@@ -73,7 +73,6 @@ class Breakpoint;
class QmlCppEngine;
class DebuggerToolTipContext;
class MemoryViewSetupData;
-class Terminal;
class TerminalRunner;
class ThreadId;
@@ -158,7 +157,7 @@ public:
bool isNativeMixedDebugging() const;
void validateExecutable();
- Utils::MacroExpander *macroExpander = 0;
+ Utils::MacroExpander *macroExpander = nullptr;
// For Debugger testing.
int testCase = 0;
diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp
index b3026a67e7..6893aa307a 100644
--- a/src/plugins/debugger/debuggeritemmanager.cpp
+++ b/src/plugins/debugger/debuggeritemmanager.cpp
@@ -97,11 +97,11 @@ public:
QString uniqueDisplayName(const QString &base);
PersistentSettingsWriter m_writer;
- DebuggerItemModel *m_model;
- IOptionsPage *m_optionsPage = 0;
+ DebuggerItemModel *m_model = nullptr;
+ IOptionsPage *m_optionsPage = nullptr;
};
-static DebuggerItemManagerPrivate *d = 0;
+static DebuggerItemManagerPrivate *d = nullptr;
// -----------------------------------------------------------------------
// DebuggerItemConfigWidget
diff --git a/src/plugins/debugger/debuggermainwindow.h b/src/plugins/debugger/debuggermainwindow.h
index 3d98380edb..cc93e7a00f 100644
--- a/src/plugins/debugger/debuggermainwindow.h
+++ b/src/plugins/debugger/debuggermainwindow.h
@@ -70,7 +70,7 @@ public:
Perspective() = default;
// Takes ownership of \a centralWidget and all dock widgets in \a operations.
Perspective(const QString &name, const QVector<Operation> &operations,
- QWidget *centralWidget = 0);
+ QWidget *centralWidget = nullptr);
~Perspective();
void addOperation(const Operation &operation);
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index a442907afc..8825e72ecf 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -575,7 +575,7 @@ static Kit *findUniversalCdbKit()
//
///////////////////////////////////////////////////////////////////////
-static DebuggerPluginPrivate *dd = 0;
+static DebuggerPluginPrivate *dd = nullptr;
/*!
\class Debugger::Internal::DebuggerCore
@@ -928,95 +928,95 @@ public:
QPointer<QWidget> m_modeWindow;
QPointer<DebugMode> m_mode;
- ActionContainer *m_menu = 0;
+ ActionContainer *m_menu = nullptr;
- Project *m_previousProject = 0;
+ Project *m_previousProject = nullptr;
QPointer<Target> m_previousTarget;
QPointer<RunConfiguration> m_previousRunConfiguration;
Id m_previousMode;
QVector<DebuggerRunTool *> m_scheduledStarts;
- ProxyAction *m_visibleStartAction = 0;
- ProxyAction *m_hiddenStopAction = 0;
- QAction *m_startAction = 0;
- QAction *m_debugWithoutDeployAction = 0;
- QAction *m_startAndDebugApplicationAction = 0;
- QAction *m_attachToRunningApplication = 0;
- QAction *m_attachToUnstartedApplication = 0;
- QAction *m_attachToQmlPortAction = 0;
- QAction *m_attachToRemoteServerAction = 0;
- QAction *m_startRemoteCdbAction = 0;
- QAction *m_attachToCoreAction = 0;
- QAction *m_detachAction = 0;
- QAction *m_continueAction = 0;
- QAction *m_exitAction = 0; // On application output button if "Stop" is possible
- QAction *m_interruptAction = 0; // On the fat debug button if "Pause" is possible
- QAction *m_undisturbableAction = 0; // On the fat debug button if nothing can be done
- QAction *m_abortAction = 0;
- QAction *m_stepAction = 0;
- QAction *m_stepOutAction = 0;
- QAction *m_runToLineAction = 0; // In the debug menu
- QAction *m_runToSelectedFunctionAction = 0;
- QAction *m_jumpToLineAction = 0; // In the Debug menu.
- QAction *m_returnFromFunctionAction = 0;
- QAction *m_nextAction = 0;
- QAction *m_watchAction = 0;
- Command *m_watchCommand = 0;
- QAction *m_breakAction = 0;
- QAction *m_reverseDirectionAction = 0;
- QAction *m_frameUpAction = 0;
- QAction *m_frameDownAction = 0;
- QAction *m_resetAction = 0;
- QAction *m_operateByInstructionAction = 0;
-
- QToolButton *m_reverseToolButton = 0;
-
- QLabel *m_threadLabel = 0;
- QComboBox *m_threadBox = 0;
-
- BaseTreeView *m_breakView = 0;
- BaseTreeView *m_returnView = 0;
- BaseTreeView *m_localsView = 0;
- BaseTreeView *m_watchersView = 0;
- WatchTreeView *m_inspectorView = 0;
- BaseTreeView *m_registerView = 0;
- BaseTreeView *m_modulesView = 0;
- BaseTreeView *m_snapshotView = 0;
- BaseTreeView *m_sourceFilesView = 0;
- BaseTreeView *m_stackView = 0;
- BaseTreeView *m_threadsView = 0;
-
- QWidget *m_breakWindow = 0;
- BreakHandler *m_breakHandler = 0;
- QWidget *m_returnWindow = 0;
- QWidget *m_localsWindow = 0;
- QWidget *m_watchersWindow = 0;
- QWidget *m_inspectorWindow = 0;
- QWidget *m_registerWindow = 0;
- QWidget *m_modulesWindow = 0;
- QWidget *m_snapshotWindow = 0;
- QWidget *m_sourceFilesWindow = 0;
- QWidget *m_stackWindow = 0;
- QWidget *m_threadsWindow = 0;
- LogWindow *m_logWindow = 0;
- LocalsAndInspectorWindow *m_localsAndInspectorWindow = 0;
-
- bool m_busy;
+ ProxyAction *m_visibleStartAction = nullptr;
+ ProxyAction *m_hiddenStopAction = nullptr;
+ QAction *m_startAction = nullptr;
+ QAction *m_debugWithoutDeployAction = nullptr;
+ QAction *m_startAndDebugApplicationAction = nullptr;
+ QAction *m_attachToRunningApplication = nullptr;
+ QAction *m_attachToUnstartedApplication = nullptr;
+ QAction *m_attachToQmlPortAction = nullptr;
+ QAction *m_attachToRemoteServerAction = nullptr;
+ QAction *m_startRemoteCdbAction = nullptr;
+ QAction *m_attachToCoreAction = nullptr;
+ QAction *m_detachAction = nullptr;
+ QAction *m_continueAction = nullptr;
+ QAction *m_exitAction = nullptr; // On application output button if "Stop" is possible
+ QAction *m_interruptAction = nullptr; // On the fat debug button if "Pause" is possible
+ QAction *m_undisturbableAction = nullptr; // On the fat debug button if nothing can be done
+ QAction *m_abortAction = nullptr;
+ QAction *m_stepAction = nullptr;
+ QAction *m_stepOutAction = nullptr;
+ QAction *m_runToLineAction = nullptr; // In the debug menu
+ QAction *m_runToSelectedFunctionAction = nullptr;
+ QAction *m_jumpToLineAction = nullptr; // In the Debug menu.
+ QAction *m_returnFromFunctionAction = nullptr;
+ QAction *m_nextAction = nullptr;
+ QAction *m_watchAction = nullptr;
+ Command *m_watchCommand = nullptr;
+ QAction *m_breakAction = nullptr;
+ QAction *m_reverseDirectionAction = nullptr;
+ QAction *m_frameUpAction = nullptr;
+ QAction *m_frameDownAction = nullptr;
+ QAction *m_resetAction = nullptr;
+ QAction *m_operateByInstructionAction = nullptr;
+
+ QToolButton *m_reverseToolButton = nullptr;
+
+ QLabel *m_threadLabel = nullptr;
+ QComboBox *m_threadBox = nullptr;
+
+ BaseTreeView *m_breakView = nullptr;
+ BaseTreeView *m_returnView = nullptr;
+ BaseTreeView *m_localsView = nullptr;
+ BaseTreeView *m_watchersView = nullptr;
+ WatchTreeView *m_inspectorView = nullptr;
+ BaseTreeView *m_registerView = nullptr;
+ BaseTreeView *m_modulesView = nullptr;
+ BaseTreeView *m_snapshotView = nullptr;
+ BaseTreeView *m_sourceFilesView = nullptr;
+ BaseTreeView *m_stackView = nullptr;
+ BaseTreeView *m_threadsView = nullptr;
+
+ QWidget *m_breakWindow = nullptr;
+ BreakHandler *m_breakHandler = nullptr;
+ QWidget *m_returnWindow = nullptr;
+ QWidget *m_localsWindow = nullptr;
+ QWidget *m_watchersWindow = nullptr;
+ QWidget *m_inspectorWindow = nullptr;
+ QWidget *m_registerWindow = nullptr;
+ QWidget *m_modulesWindow = nullptr;
+ QWidget *m_snapshotWindow = nullptr;
+ QWidget *m_sourceFilesWindow = nullptr;
+ QWidget *m_stackWindow = nullptr;
+ QWidget *m_threadsWindow = nullptr;
+ LogWindow *m_logWindow = nullptr;
+ LocalsAndInspectorWindow *m_localsAndInspectorWindow = nullptr;
+
+ bool m_busy = false;
QString m_lastPermanentStatusMessage;
mutable CPlusPlus::Snapshot m_codeModelSnapshot;
- DebuggerPlugin *m_plugin = 0;
+ DebuggerPlugin *m_plugin = nullptr;
- SnapshotHandler *m_snapshotHandler = 0;
+ SnapshotHandler *m_snapshotHandler = nullptr;
QTimer m_shutdownTimer;
bool m_shuttingDown = false;
QPointer<DebuggerEngine> m_previouslyActiveEngine;
QPointer<DebuggerRunTool> m_currentRunTool;
- DebuggerSettings *m_debuggerSettings = 0;
+ DebuggerSettings *m_debuggerSettings = nullptr;
QStringList m_arguments;
DebuggerToolTipManager m_toolTipManager;
- DummyEngine *m_dummyEngine = 0;
+ DummyEngine *m_dummyEngine = nullptr;
const QSharedPointer<GlobalDebuggerOptions> m_globalDebuggerOptions;
DebuggerItemManager m_debuggerItemManager;
@@ -1042,13 +1042,13 @@ DebuggerPluginPrivate::~DebuggerPluginPrivate()
m_optionPages.clear();
delete m_debuggerSettings;
- m_debuggerSettings = 0;
+ m_debuggerSettings = nullptr;
delete m_snapshotHandler;
- m_snapshotHandler = 0;
+ m_snapshotHandler = nullptr;
delete m_breakHandler;
- m_breakHandler = 0;
+ m_breakHandler = nullptr;
}
DebuggerEngine *DebuggerPluginPrivate::dummyEngine()
@@ -1068,7 +1068,7 @@ static QString msgParameterMissing(const QString &a)
static Kit *guessKitFromAbis(const QList<Abi> &abis)
{
- Kit *kit = 0;
+ Kit *kit = nullptr;
// Try to find a kit via ABI.
if (!abis.isEmpty()) {
@@ -1852,7 +1852,7 @@ QVariant configValue(const QString &name)
void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
{
- RunConfiguration *activeRc = 0;
+ RunConfiguration *activeRc = nullptr;
if (project) {
Target *target = project->activeTarget();
if (target)
diff --git a/src/plugins/debugger/debuggersourcepathmappingwidget.h b/src/plugins/debugger/debuggersourcepathmappingwidget.h
index ec587a2007..4a4cabb294 100644
--- a/src/plugins/debugger/debuggersourcepathmappingwidget.h
+++ b/src/plugins/debugger/debuggersourcepathmappingwidget.h
@@ -52,7 +52,7 @@ class DebuggerSourcePathMappingWidget : public QGroupBox
public:
typedef QMap<QString, QString> SourcePathMap;
- explicit DebuggerSourcePathMappingWidget(QWidget *parent = 0);
+ explicit DebuggerSourcePathMappingWidget(QWidget *parent = nullptr);
SourcePathMap sourcePathMap() const;
void setSourcePathMap(const SourcePathMap &);
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index 06bc3beee6..642f02678f 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -946,7 +946,7 @@ void DebuggerToolTipHolder::saveSessionData(QXmlStreamWriter &w) const
(by file name and function) acquire the engine, others release.
*/
-static DebuggerToolTipManager *m_instance = 0;
+static DebuggerToolTipManager *m_instance = nullptr;
DebuggerToolTipManager::DebuggerToolTipManager()
{
@@ -955,7 +955,7 @@ DebuggerToolTipManager::DebuggerToolTipManager()
DebuggerToolTipManager::~DebuggerToolTipManager()
{
- m_instance = 0;
+ m_instance = nullptr;
}
void DebuggerToolTipManager::updateVisibleToolTips()
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 7b8ee095ce..cab0cda7e7 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -237,7 +237,7 @@ QString GdbEngine::failedToStartMessage()
// Parse "~:gdb: unknown target exception 0xc0000139 at 0x77bef04e\n"
// and return an exception message
-static QString msgWinException(const QString &data, unsigned *exCodeIn = 0)
+static QString msgWinException(const QString &data, unsigned *exCodeIn = nullptr)
{
if (exCodeIn)
*exCodeIn = 0;
diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp
index 822e7d8b8c..1a3cd5bb9f 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.cpp
+++ b/src/plugins/debugger/gdb/gdboptionspage.cpp
@@ -349,7 +349,7 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2()
checkBoxBreakOnAbort->setText(CommonOptionsPage::msgSetBreakpointAtFunction("abort"));
checkBoxBreakOnAbort->setToolTip(CommonOptionsPage::msgSetBreakpointAtFunctionToolTip("abort"));
- QCheckBox *checkBoxEnableReverseDebugging = 0;
+ QCheckBox *checkBoxEnableReverseDebugging = nullptr;
if (isReverseDebuggingEnabled()) {
checkBoxEnableReverseDebugging = new QCheckBox(groupBoxDangerous);
checkBoxEnableReverseDebugging->setText(GdbOptionsPage::tr("Enable reverse debugging"));
diff --git a/src/plugins/debugger/imageviewer.cpp b/src/plugins/debugger/imageviewer.cpp
index 02deecfadf..bd54331c81 100644
--- a/src/plugins/debugger/imageviewer.cpp
+++ b/src/plugins/debugger/imageviewer.cpp
@@ -49,7 +49,7 @@ class ImageWidget : public QWidget
{
Q_OBJECT
public:
- explicit ImageWidget(QWidget *parent = 0) : QWidget(parent) {}
+ ImageWidget() {}
void setImage(const QImage &image);
const QImage &image() const { return m_image; }
diff --git a/src/plugins/debugger/imageviewer.h b/src/plugins/debugger/imageviewer.h
index ece5465486..7ba8e739ee 100644
--- a/src/plugins/debugger/imageviewer.h
+++ b/src/plugins/debugger/imageviewer.h
@@ -43,15 +43,13 @@ class ImageViewer : public QWidget
{
Q_OBJECT
public:
- explicit ImageViewer(QWidget *parent = 0);
+ explicit ImageViewer(QWidget *parent = nullptr);
void setImage(const QImage &image);
void setInfo(const QString &description);
-protected:
- void contextMenuEvent(QContextMenuEvent *);
-
private:
+ void contextMenuEvent(QContextMenuEvent *) final;
void clicked(const QString &);
QScrollArea *m_scrollArea;
@@ -64,13 +62,13 @@ class PlotViewer : public QWidget
{
Q_OBJECT
public:
- explicit PlotViewer(QWidget *parent = 0);
+ explicit PlotViewer(QWidget *parent = nullptr);
typedef std::vector<double> Data;
void setData(const Data &data);
void setInfo(const QString &description);
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(QPaintEvent *ev) final;
private:
Data m_data;
diff --git a/src/plugins/debugger/logwindow.h b/src/plugins/debugger/logwindow.h
index adced53832..f5024d2014 100644
--- a/src/plugins/debugger/logwindow.h
+++ b/src/plugins/debugger/logwindow.h
@@ -48,7 +48,7 @@ class LogWindow : public QWidget
Q_OBJECT
public:
- explicit LogWindow(QWidget *parent = 0);
+ explicit LogWindow(QWidget *parent = nullptr);
void setCursor(const QCursor &cursor);
@@ -59,7 +59,7 @@ public:
static QString logTimeStamp();
- static bool writeLogContents(const QPlainTextEdit *editor, QWidget *parent = 0);
+ static bool writeLogContents(const QPlainTextEdit *editor, QWidget *parent = nullptr);
static QChar charForChannel(int channel);
static LogChannel channelForChar(QChar c);
diff --git a/src/plugins/debugger/outputcollector.cpp b/src/plugins/debugger/outputcollector.cpp
index da93e631b9..e40fb3541c 100644
--- a/src/plugins/debugger/outputcollector.cpp
+++ b/src/plugins/debugger/outputcollector.cpp
@@ -55,15 +55,6 @@
namespace Debugger {
namespace Internal {
-OutputCollector::OutputCollector(QObject *parent)
- : QObject(parent)
-{
-#ifdef Q_OS_WIN
- m_server = 0;
- m_socket = 0;
-#endif
-}
-
OutputCollector::~OutputCollector()
{
shutdown();
@@ -120,8 +111,8 @@ void OutputCollector::shutdown()
{
#ifdef Q_OS_WIN
delete m_server; // Deletes socket as well (QObject parent)
- m_server = 0;
- m_socket = 0;
+ m_server = nullptr;
+ m_socket = nullptr;
#else
if (!m_serverPath.isEmpty()) {
::close(m_serverFd);
diff --git a/src/plugins/debugger/outputcollector.h b/src/plugins/debugger/outputcollector.h
index fbdb9f9ea1..b176414ce5 100644
--- a/src/plugins/debugger/outputcollector.h
+++ b/src/plugins/debugger/outputcollector.h
@@ -47,7 +47,7 @@ class OutputCollector : public QObject
Q_OBJECT
public:
- OutputCollector(QObject *parent = 0);
+ OutputCollector() {}
~OutputCollector() override;
bool listen();
void shutdown();
@@ -61,12 +61,12 @@ private:
void bytesAvailable();
#ifdef Q_OS_WIN
void newConnectionAvailable();
- QLocalServer *m_server;
- QLocalSocket *m_socket;
+ QLocalServer *m_server = nullptr;
+ QLocalSocket *m_socket = nullptr;
#else
QString m_serverPath;
int m_serverFd;
- QSocketNotifier *m_serverNotifier;
+ QSocketNotifier *m_serverNotifier = nullptr;
QString m_errorString;
#endif
};
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 96007d1bcb..968c0ef0a6 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -223,7 +223,7 @@ public:
bool contextEvaluate = false;
QTimer connectionTimer;
- QmlDebug::QDebugMessageClient *msgClient = 0;
+ QmlDebug::QDebugMessageClient *msgClient = nullptr;
QHash<int, QmlCallback> callbackForToken;
QMetaObject::Connection startupMessageFilterConnection;
@@ -938,7 +938,7 @@ static ConsoleItem *constructLogItemTree(const QVariant &result,
return 0;
QString text;
- ConsoleItem *item = 0;
+ ConsoleItem *item = nullptr;
if (result.type() == QVariant::Map) {
if (key.isEmpty())
text = "Object";
@@ -1110,7 +1110,7 @@ void QmlEngine::executeDebuggerCommand(const QString &command, DebuggerLanguages
void QmlEnginePrivate::updateScriptSource(const QString &fileName, int lineOffset, int columnOffset,
const QString &source)
{
- QTextDocument *document = 0;
+ QTextDocument *document = nullptr;
if (sourceDocuments.contains(fileName)) {
document = sourceDocuments.value(fileName);
} else {
diff --git a/src/plugins/debugger/registerpostmortemaction.h b/src/plugins/debugger/registerpostmortemaction.h
index bff1f6c78e..3555d984c8 100644
--- a/src/plugins/debugger/registerpostmortemaction.h
+++ b/src/plugins/debugger/registerpostmortemaction.h
@@ -33,8 +33,8 @@ namespace Internal {
class RegisterPostMortemAction : public Utils::SavedAction
{
public:
- RegisterPostMortemAction(QObject *parent = 0);
- void readSettings(const QSettings *settings = 0) override;
+ RegisterPostMortemAction(QObject *parent = nullptr);
+ void readSettings(const QSettings *settings = nullptr) override;
void writeSettings(QSettings *) override {}
private:
diff --git a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp
index c5ad414633..668c1d4c53 100644
--- a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp
+++ b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp
@@ -197,7 +197,7 @@ QString CdbSymbolPathListEditor::symbolPath(const QString &cacheDir,
return s;
}
-bool CdbSymbolPathListEditor::isSymbolServerPath(const QString &path, QString *cacheDir /* = 0 */)
+bool CdbSymbolPathListEditor::isSymbolServerPath(const QString &path, QString *cacheDir /* = nullptr */)
{
if (!path.startsWith(QLatin1String(symbolServerPrefixC)) || !path.endsWith(QLatin1String(symbolServerPostfixC)))
return false;
@@ -226,7 +226,7 @@ bool CdbSymbolPathListEditor::isSymbolCachePath(const QString &path, QString *ca
int CdbSymbolPathListEditor::indexOfSymbolPath(const QStringList &paths,
CdbSymbolPathListEditor::SymbolPathMode mode,
- QString *cacheDir /* = 0 */)
+ QString *cacheDir /* = nullptr */)
{
const int count = paths.size();
for (int i = 0; i < count; i++) {
diff --git a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.h b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.h
index 8a760d11b1..fbbb78de06 100644
--- a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.h
+++ b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.h
@@ -48,7 +48,7 @@ namespace Internal {
class CacheDirectoryDialog : public QDialog {
Q_OBJECT
public:
- explicit CacheDirectoryDialog(QWidget *parent = 0);
+ explicit CacheDirectoryDialog(QWidget *parent = nullptr);
void setPath(const QString &p);
QString path() const;
@@ -69,7 +69,7 @@ public:
SymbolCachePath
};
- explicit CdbSymbolPathListEditor(QWidget *parent = 0);
+ explicit CdbSymbolPathListEditor(QWidget *parent = nullptr);
static bool promptCacheDirectory(QWidget *parent, QString *cacheDirectory);
@@ -81,11 +81,11 @@ public:
// Format a symbol path specification
static QString symbolPath(const QString &cacheDir, SymbolPathMode mode);
// Check for a symbol server path and extract local cache directory
- static bool isSymbolServerPath(const QString &path, QString *cacheDir = 0);
+ static bool isSymbolServerPath(const QString &path, QString *cacheDir = nullptr);
// Check for a symbol cache path and extract local cache directory
- static bool isSymbolCachePath(const QString &path, QString *cacheDir = 0);
+ static bool isSymbolCachePath(const QString &path, QString *cacheDir = nullptr);
// Check for symbol server in list of paths.
- static int indexOfSymbolPath(const QStringList &paths, SymbolPathMode mode, QString *cacheDir = 0);
+ static int indexOfSymbolPath(const QStringList &paths, SymbolPathMode mode, QString *cacheDir = nullptr);
private:
void addSymbolPath(SymbolPathMode mode);
diff --git a/src/plugins/debugger/shared/peutils.cpp b/src/plugins/debugger/shared/peutils.cpp
index 29862ee22c..3d89fa77b4 100644
--- a/src/plugins/debugger/shared/peutils.cpp
+++ b/src/plugins/debugger/shared/peutils.cpp
@@ -223,7 +223,7 @@ bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *
{
HANDLE hFile = NULL;
HANDLE hFileMap = NULL;
- void *fileMemory = 0;
+ void *fileMemory = nullptr;
bool success = false;
rc->clear();
diff --git a/src/plugins/debugger/shared/symbolpathsdialog.h b/src/plugins/debugger/shared/symbolpathsdialog.h
index 304988e285..db4c596545 100644
--- a/src/plugins/debugger/shared/symbolpathsdialog.h
+++ b/src/plugins/debugger/shared/symbolpathsdialog.h
@@ -38,7 +38,7 @@ class SymbolPathsDialog : public QDialog
Q_OBJECT
public:
- explicit SymbolPathsDialog(QWidget *parent = 0);
+ explicit SymbolPathsDialog(QWidget *parent = nullptr);
~SymbolPathsDialog();
bool useSymbolCache() const;
diff --git a/src/plugins/debugger/sourceutils.cpp b/src/plugins/debugger/sourceutils.cpp
index 993041858f..1184749c4e 100644
--- a/src/plugins/debugger/sourceutils.cpp
+++ b/src/plugins/debugger/sourceutils.cpp
@@ -205,8 +205,8 @@ int getUninitializedVariablesI(const Snapshot &snapshot,
return 4;
// First figure out the function to do a safety name check
// and the innermost scope at cursor position
- const Function *function = 0;
- const Scope *innerMostScope = 0;
+ const Function *function = nullptr;
+ const Scope *innerMostScope = nullptr;
if (symbolAtLine->isFunction()) {
function = symbolAtLine->asFunction();
if (function->memberCount() == 1) // Skip over function block
diff --git a/src/plugins/debugger/sourceutils.h b/src/plugins/debugger/sourceutils.h
index 12ea4a338f..be19402844 100644
--- a/src/plugins/debugger/sourceutils.h
+++ b/src/plugins/debugger/sourceutils.h
@@ -41,8 +41,8 @@ class ContextData;
// Editor tooltip support
QString cppExpressionAt(TextEditor::TextEditorWidget *editorWidget, int pos,
- int *line, int *column, QString *function = 0,
- int *scopeFromLine = 0, int *scopeToLine = 0);
+ int *line, int *column, QString *function = nullptr,
+ int *scopeFromLine = nullptr, int *scopeToLine = nullptr);
QString fixCppExpression(const QString &exp);
QString cppFunctionAt(const QString &fileName, int line, int column = 0);
diff --git a/src/plugins/debugger/terminal.cpp b/src/plugins/debugger/terminal.cpp
index 78d60e695b..a1acd42769 100644
--- a/src/plugins/debugger/terminal.cpp
+++ b/src/plugins/debugger/terminal.cpp
@@ -64,7 +64,7 @@ static QString currentError()
}
Terminal::Terminal(QObject *parent)
- : QObject(parent), m_isUsable(false), m_masterFd(-1), m_masterReader(0)
+ : QObject(parent)
{
}
diff --git a/src/plugins/debugger/terminal.h b/src/plugins/debugger/terminal.h
index cd39daa5fc..1500193a15 100644
--- a/src/plugins/debugger/terminal.h
+++ b/src/plugins/debugger/terminal.h
@@ -44,7 +44,7 @@ class Terminal : public QObject
Q_OBJECT
public:
- Terminal(QObject *parent = 0);
+ Terminal(QObject *parent = nullptr);
void setup();
bool isUsable() const;
@@ -62,9 +62,9 @@ signals:
private:
void onSlaveReaderActivated(int fd);
- bool m_isUsable;
- int m_masterFd;
- QSocketNotifier *m_masterReader;
+ bool m_isUsable = false;
+ int m_masterFd = -1;
+ QSocketNotifier *m_masterReader = nullptr;
QByteArray m_slaveName;
};
diff --git a/src/plugins/debugger/unstartedappwatcherdialog.h b/src/plugins/debugger/unstartedappwatcherdialog.h
index 47d38c17d9..029266de17 100644
--- a/src/plugins/debugger/unstartedappwatcherdialog.h
+++ b/src/plugins/debugger/unstartedappwatcherdialog.h
@@ -50,7 +50,7 @@ class UnstartedAppWatcherDialog : public QDialog
Q_OBJECT
public:
- explicit UnstartedAppWatcherDialog(QWidget *parent = 0);
+ explicit UnstartedAppWatcherDialog(QWidget *parent = nullptr);
ProjectExplorer::Kit *currentKit() const;
ProjectExplorer::DeviceProcessItem currentProcess() const;
diff --git a/src/plugins/debugger/watchdelegatewidgets.h b/src/plugins/debugger/watchdelegatewidgets.h
index e9acb3a217..90da2f8cbe 100644
--- a/src/plugins/debugger/watchdelegatewidgets.h
+++ b/src/plugins/debugger/watchdelegatewidgets.h
@@ -43,13 +43,13 @@ class WatchLineEdit : public QLineEdit
Q_PROPERTY(QString text READ text WRITE setText USER false)
Q_PROPERTY(QVariant modelData READ modelData WRITE setModelData DESIGNABLE false USER true)
public:
- explicit WatchLineEdit(QWidget *parent = 0);
+ explicit WatchLineEdit(QWidget *parent = nullptr);
// Ready-made accessors for item views passing QVariants around
virtual QVariant modelData() const;
virtual void setModelData(const QVariant &);
- static WatchLineEdit *create(QVariant::Type t, QWidget *parent = 0);
+ static WatchLineEdit *create(QVariant::Type t, QWidget *parent = nullptr);
};
/* Watch delegate line edit for integer numbers based on quint64/qint64.
@@ -63,11 +63,10 @@ class IntegerWatchLineEdit : public WatchLineEdit
Q_PROPERTY(bool Signed READ isSigned WRITE setSigned DESIGNABLE true)
Q_PROPERTY(bool bigInt READ isBigInt WRITE setBigInt DESIGNABLE true)
public:
- explicit IntegerWatchLineEdit(QWidget *parent = 0);
+ explicit IntegerWatchLineEdit(QWidget *parent = nullptr);
- // Ready-made accessors for item views passing QVariants around
- virtual QVariant modelData() const;
- virtual void setModelData(const QVariant &);
+ QVariant modelData() const final;
+ void setModelData(const QVariant &) final;
int base() const;
void setBase(int b);
@@ -88,10 +87,10 @@ private:
class FloatWatchLineEdit : public WatchLineEdit
{
public:
- explicit FloatWatchLineEdit(QWidget *parent = 0);
+ explicit FloatWatchLineEdit(QWidget *parent = nullptr);
- virtual QVariant modelData() const;
- virtual void setModelData(const QVariant &);
+ QVariant modelData() const final;
+ void setModelData(const QVariant &) final;
};
/* Combo box for booleans */
@@ -100,7 +99,7 @@ class BooleanComboBox : public QComboBox
Q_OBJECT
Q_PROPERTY(QVariant modelData READ modelData WRITE setModelData DESIGNABLE false USER true)
public:
- explicit BooleanComboBox(QWidget *parent = 0);
+ explicit BooleanComboBox(QWidget *parent = nullptr);
virtual QVariant modelData() const;
virtual void setModelData(const QVariant &);
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 6400095a62..bfd299093a 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -336,7 +336,7 @@ public:
template <class T> T *prepareObject(const WatchItem *item)
{
const QString key = item->key();
- T *t = 0;
+ T *t = nullptr;
if (QWidget *w = findWidget(key)) {
t = qobject_cast<T *>(w);
if (!t)
@@ -2229,7 +2229,7 @@ void WatchModel::showEditValue(const WatchItem *item)
// QImage
int width = 0, height = 0, nbytes = 0, imformat = 0;
QByteArray ba;
- uchar *bits = 0;
+ uchar *bits = nullptr;
if (format == DisplayImageData) {
ba = QByteArray::fromHex(item->editvalue.toUtf8());
QTC_ASSERT(ba.size() > 16, return);