forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -37,7 +37,7 @@ class DEBUGGER_EXPORT DetailedErrorView : public QTreeView
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DetailedErrorView(QWidget *parent = 0);
|
||||
DetailedErrorView(QWidget *parent = nullptr);
|
||||
~DetailedErrorView();
|
||||
|
||||
void goNext();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) :
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -42,7 +42,7 @@ class ConsoleItemModel : public Utils::TreeModel<>
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
explicit ConsoleItemModel(QObject *parent = 0);
|
||||
explicit ConsoleItemModel(QObject *parent = nullptr);
|
||||
|
||||
void shiftEditableRow();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
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 = 0;
|
||||
QToolButton *m_reverseToolButton = nullptr;
|
||||
|
||||
QLabel *m_threadLabel = 0;
|
||||
QComboBox *m_threadBox = 0;
|
||||
QLabel *m_threadLabel = nullptr;
|
||||
QComboBox *m_threadBox = nullptr;
|
||||
|
||||
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;
|
||||
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 = 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;
|
||||
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;
|
||||
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)
|
||||
|
||||
@@ -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 &);
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ static QString currentError()
|
||||
}
|
||||
|
||||
Terminal::Terminal(QObject *parent)
|
||||
: QObject(parent), m_isUsable(false), m_masterFd(-1), m_masterReader(0)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 &);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user