diff --git a/debuggers/common/dialogs/selectcoredialog.h b/debuggers/common/dialogs/selectcoredialog.h --- a/debuggers/common/dialogs/selectcoredialog.h +++ b/debuggers/common/dialogs/selectcoredialog.h @@ -32,7 +32,7 @@ class SelectCoreDialog : public QDialog { public: - SelectCoreDialog(QWidget *parent = 0); + SelectCoreDialog(QWidget *parent = nullptr); QUrl binary() const; QUrl core() const; diff --git a/debuggers/common/mi/mi.h b/debuggers/common/mi/mi.h --- a/debuggers/common/mi/mi.h +++ b/debuggers/common/mi/mi.h @@ -241,8 +241,8 @@ */ struct Result { - Result() : value(0) {} - ~Result() { delete value; value = 0; } + Result() : value(nullptr) {} + ~Result() { delete value; value = nullptr; } QString variable; Value *value; diff --git a/debuggers/common/mi/micommand.h b/debuggers/common/mi/micommand.h --- a/debuggers/common/mi/micommand.h +++ b/debuggers/common/mi/micommand.h @@ -82,7 +82,7 @@ public: typedef std::function Function; - FunctionCommandHandler(const Function& callback, CommandFlags flags = 0); + FunctionCommandHandler(const Function& callback, CommandFlags flags = nullptr); virtual void handle(const ResultRecord&) override; virtual bool handlesError() override; @@ -99,7 +99,7 @@ class MICommand { protected: - MICommand(CommandType type, const QString& arguments = QString(), CommandFlags flags = 0); + MICommand(CommandType type, const QString& arguments = QString(), CommandFlags flags = nullptr); friend class KDevMI::MIDebugSession; public: @@ -254,7 +254,7 @@ CliCommand(CommandType type, const QString& command, Handler* handler_this, void (Handler::* handler_method)(const QStringList&), - CommandFlags flags = 0); + CommandFlags flags = nullptr); }; /** Command that does nothing and can be just used to invoke @@ -269,7 +269,7 @@ template SentinelCommand(Handler* handler_this, void (Handler::* handler_method)(), - CommandFlags flags = 0) + CommandFlags flags = nullptr) : MICommand(NonMI, QString(), flags) { QPointer guarded_this(handler_this); @@ -280,7 +280,7 @@ }; } - SentinelCommand(const Function& handler, CommandFlags flags = 0) + SentinelCommand(const Function& handler, CommandFlags flags = nullptr) : MICommand(NonMI, QString(), flags) , handler(handler) { diff --git a/debuggers/common/mi/milexer.h b/debuggers/common/mi/milexer.h --- a/debuggers/common/mi/milexer.h +++ b/debuggers/common/mi/milexer.h @@ -44,7 +44,7 @@ TokenStream *tokenStream; inline FileSymbol() - : tokenStream(0) {} + : tokenStream(nullptr) {} inline ~FileSymbol(); }; @@ -142,7 +142,7 @@ inline FileSymbol::~FileSymbol() { delete tokenStream; - tokenStream = 0; + tokenStream = nullptr; } } // end of MI diff --git a/debuggers/common/mibreakpointcontroller.h b/debuggers/common/mibreakpointcontroller.h --- a/debuggers/common/mibreakpointcontroller.h +++ b/debuggers/common/mibreakpointcontroller.h @@ -101,7 +101,7 @@ void createFromDebugger(const MI::Value& miBkpt); void updateFromDebugger(int row, const MI::Value& miBkpt, - KDevelop::BreakpointModel::ColumnFlags lockedColumns = 0); + KDevelop::BreakpointModel::ColumnFlags lockedColumns = nullptr); int rowFromDebuggerId(int gdbId) const; diff --git a/debuggers/common/registers/registercontroller_arm.h b/debuggers/common/registers/registercontroller_arm.h --- a/debuggers/common/registers/registercontroller_arm.h +++ b/debuggers/common/registers/registercontroller_arm.h @@ -31,7 +31,7 @@ { public: - RegisterController_Arm(MIDebugSession* debugSession = 0, QObject* parent = 0); + RegisterController_Arm(MIDebugSession* debugSession = nullptr, QObject* parent = nullptr); virtual QVector namesOfRegisterGroups() const override; diff --git a/debuggers/common/registers/registercontroller_x86.h b/debuggers/common/registers/registercontroller_x86.h --- a/debuggers/common/registers/registercontroller_x86.h +++ b/debuggers/common/registers/registercontroller_x86.h @@ -36,7 +36,7 @@ virtual void updateRegisters(const GroupsName& group = GroupsName()) override; protected: - RegisterControllerGeneral_x86(MIDebugSession* debugSession = 0, QObject* parent = 0); + RegisterControllerGeneral_x86(MIDebugSession* debugSession = nullptr, QObject* parent = nullptr); virtual RegistersGroup registersFromGroup(const GroupsName& group) const override; @@ -71,7 +71,7 @@ { public: - RegisterController_x86(MIDebugSession* debugSession = 0, QObject* parent = 0); + RegisterController_x86(MIDebugSession* debugSession = nullptr, QObject* parent = nullptr); private: void initRegisterNames(); @@ -81,7 +81,7 @@ { public: - RegisterController_x86_64(MIDebugSession* debugSession = 0, QObject* parent = 0); + RegisterController_x86_64(MIDebugSession* debugSession = nullptr, QObject* parent = nullptr); private: void initRegisterNames(); diff --git a/debuggers/gdb/memviewdlg.h b/debuggers/gdb/memviewdlg.h --- a/debuggers/gdb/memviewdlg.h +++ b/debuggers/gdb/memviewdlg.h @@ -42,7 +42,7 @@ { Q_OBJECT public: - MemoryViewerWidget(CppDebuggerPlugin* plugin, QWidget* parent = 0); + MemoryViewerWidget(CppDebuggerPlugin* plugin, QWidget* parent = nullptr); public Q_SLOTS: /** Adds a new memory view. */ diff --git a/debuggers/lldb/lldbcommand.h b/debuggers/lldb/lldbcommand.h --- a/debuggers/lldb/lldbcommand.h +++ b/debuggers/lldb/lldbcommand.h @@ -36,7 +36,7 @@ { protected: LldbCommand(MI::CommandType type, const QString& arguments = QString(), - MI::CommandFlags flags = 0); + MI::CommandFlags flags = nullptr); friend class KDevMI::LLDB::DebugSession; public: ~LldbCommand(); diff --git a/documentation/qthelp/qthelpnetwork.h b/documentation/qthelp/qthelpnetwork.h --- a/documentation/qthelp/qthelpnetwork.h +++ b/documentation/qthelp/qthelpnetwork.h @@ -74,7 +74,7 @@ protected: virtual QNetworkReply *createRequest(Operation op, - const QNetworkRequest &request, QIODevice *outgoingData = 0) override; + const QNetworkRequest &request, QIODevice *outgoingData = nullptr) override; private: QHelpEngineCore *m_helpEngine; diff --git a/languages/clang/duchain/clangparsingenvironmentfile.h b/languages/clang/duchain/clangparsingenvironmentfile.h --- a/languages/clang/duchain/clangparsingenvironmentfile.h +++ b/languages/clang/duchain/clangparsingenvironmentfile.h @@ -39,7 +39,7 @@ ClangParsingEnvironmentFile(ClangParsingEnvironmentFileData& data); ~ClangParsingEnvironmentFile(); - virtual bool needsUpdate(const KDevelop::ParsingEnvironment* environment = 0) const override; + virtual bool needsUpdate(const KDevelop::ParsingEnvironment* environment = nullptr) const override; virtual int type() const override; virtual bool matchEnvironment(const KDevelop::ParsingEnvironment* environment) const override; diff --git a/languages/clang/duchain/cursorkindtraits.h b/languages/clang/duchain/cursorkindtraits.h --- a/languages/clang/duchain/cursorkindtraits.h +++ b/languages/clang/duchain/cursorkindtraits.h @@ -261,7 +261,7 @@ : TK == CXType_ObjCId ? "id" : TK == CXType_ObjCSel ? "SEL" : TK == CXType_NullPtr ? "nullptr_t" - : 0; + : nullptr; } } diff --git a/projectmanagers/cmake/cmakedoc.h b/projectmanagers/cmake/cmakedoc.h --- a/projectmanagers/cmake/cmakedoc.h +++ b/projectmanagers/cmake/cmakedoc.h @@ -33,7 +33,7 @@ virtual QString name() const override { return mName; } virtual KDevelop::IDocumentationProvider* provider() const override; - virtual QWidget* documentationWidget(KDevelop::DocumentationFindWidget* findWidget, QWidget* parent = 0) override; + virtual QWidget* documentationWidget(KDevelop::DocumentationFindWidget* findWidget, QWidget* parent = nullptr) override; static CMakeDocumentation* s_provider; diff --git a/projectmanagers/cmake/duchain/contextbuilder.h b/projectmanagers/cmake/duchain/contextbuilder.h --- a/projectmanagers/cmake/duchain/contextbuilder.h +++ b/projectmanagers/cmake/duchain/contextbuilder.h @@ -33,7 +33,7 @@ virtual KDevelop::RangeInRevision editorFindRange(CMakeContentIterator* fromNode, CMakeContentIterator* toNode) override; virtual KDevelop::QualifiedIdentifier identifierForNode(CMakeFunctionDesc* node) override; virtual void setContextOnNode(CMakeContentIterator* node, KDevelop::DUContext* context) override; - virtual KDevelop::TopDUContext* newTopContext(const KDevelop::RangeInRevision& range, KDevelop::ParsingEnvironmentFile* file = 0) override; + virtual KDevelop::TopDUContext* newTopContext(const KDevelop::RangeInRevision& range, KDevelop::ParsingEnvironmentFile* file = nullptr) override; }; #endif // CONTEXTBUILDER_H diff --git a/projectmanagers/custom-buildsystem/custombuildsystemplugin.h b/projectmanagers/custom-buildsystem/custombuildsystemplugin.h --- a/projectmanagers/custom-buildsystem/custombuildsystemplugin.h +++ b/projectmanagers/custom-buildsystem/custombuildsystemplugin.h @@ -42,7 +42,7 @@ Q_INTERFACES( KDevelop::IProjectFileManager ) Q_INTERFACES( KDevelop::IBuildSystemManager ) public: - explicit CustomBuildSystem( QObject *parent = 0, const QVariantList &args = QVariantList() ); + explicit CustomBuildSystem( QObject *parent = nullptr, const QVariantList &args = QVariantList() ); virtual ~CustomBuildSystem(); // ProjectBuilder API @@ -65,7 +65,7 @@ public: Features features() const override; virtual KDevelop::ProjectFolderItem* createFolderItem( KDevelop::IProject* project, - const KDevelop::Path& path, KDevelop::ProjectBaseItem* parent = 0 ) override; + const KDevelop::Path& path, KDevelop::ProjectBaseItem* parent = nullptr ) override; // BuildSystemManager API public: diff --git a/projectmanagers/qmake/parser/tests/testhelpers.h b/projectmanagers/qmake/parser/tests/testhelpers.h --- a/projectmanagers/qmake/parser/tests/testhelpers.h +++ b/projectmanagers/qmake/parser/tests/testhelpers.h @@ -67,7 +67,7 @@ #define ENDTESTFUNCIMPL } #define TESTASSIGNMENT( ast, var, opval, valcount ) \ - QVERIFY( ast != 0 );\ + QVERIFY( ast != nullptr );\ QVERIFY( ast->identifier->value == var );\ QVERIFY( ast->op->value == opval );\ QVERIFY( ast->values.count() == valcount ); @@ -100,7 +100,7 @@ } #define TESTSCOPEBODY( scope, teststmts, stmtcount ) \ - QVERIFY( scope->body != 0 ); \ + QVERIFY( scope->body != nullptr ); \ QVERIFY( scope->body->statements.count() == stmtcount ); \ matchScopeBodies(scope->body->statements, teststmts);