diff --git a/debugger/breakpoint/breakpointmodel.cpp b/debugger/breakpoint/breakpointmodel.cpp --- a/debugger/breakpoint/breakpointmodel.cpp +++ b/debugger/breakpoint/breakpointmodel.cpp @@ -202,7 +202,7 @@ { /* FIXME: all this logic must be in item */ if (!index.isValid()) - return nullptr; + return Qt::NoItemFlags; if (index.column() == 0) return static_cast( diff --git a/debugger/util/treemodel.cpp b/debugger/util/treemodel.cpp --- a/debugger/util/treemodel.cpp +++ b/debugger/util/treemodel.cpp @@ -65,7 +65,7 @@ Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const { if (!index.isValid()) - return nullptr; + return Qt::NoItemFlags; return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } diff --git a/interfaces/idocumentcontroller.h b/interfaces/idocumentcontroller.h --- a/interfaces/idocumentcontroller.h +++ b/interfaces/idocumentcontroller.h @@ -113,7 +113,7 @@ */ KDevelop::IDocument* openDocument( const QUrl &url, const KTextEditor::Cursor& cursor, - DocumentActivationParams activationParams = nullptr, + DocumentActivationParams activationParams = {}, const QString& encoding = {}); /** @@ -131,7 +131,7 @@ */ virtual KDevelop::IDocument* openDocument( const QUrl &url, const KTextEditor::Range& range = KTextEditor::Range::invalid(), - DocumentActivationParams activationParams = nullptr, + DocumentActivationParams activationParams = {}, const QString& encoding = {}, IDocument* buddy = nullptr) = 0; @@ -148,7 +148,7 @@ */ virtual bool openDocument(IDocument* doc, const KTextEditor::Range& range = KTextEditor::Range::invalid(), - DocumentActivationParams activationParams = nullptr, + DocumentActivationParams activationParams = {}, IDocument* buddy = nullptr) = 0; /** diff --git a/project/projectmodel.cpp b/project/projectmodel.cpp --- a/project/projectmodel.cpp +++ b/project/projectmodel.cpp @@ -1064,8 +1064,8 @@ ProjectBaseItem* item = itemFromIndex( index ); if(item) return item->flags(); - else - return nullptr; + + return Qt::NoItemFlags; } bool ProjectModel::insertColumns(int, int, const QModelIndex&) diff --git a/shell/documentcontroller.h b/shell/documentcontroller.h --- a/shell/documentcontroller.h +++ b/shell/documentcontroller.h @@ -109,7 +109,7 @@ bool openDocument(IDocument* doc, const KTextEditor::Range& range = KTextEditor::Range::invalid(), - DocumentActivationParams activationParams = nullptr, + DocumentActivationParams activationParams = {}, IDocument* buddy = nullptr) override; KTextEditor::Document* globalTextEditorInstance() override; @@ -124,7 +124,7 @@ */ IDocument* openDocument( const QUrl &url, const KTextEditor::Range& range = KTextEditor::Range::invalid(), - DocumentActivationParams activationParams = nullptr, + DocumentActivationParams activationParams = {}, const QString& encoding = {}, IDocument* buddy = nullptr ) override; diff --git a/sublime/aggregatemodel.cpp b/sublime/aggregatemodel.cpp --- a/sublime/aggregatemodel.cpp +++ b/sublime/aggregatemodel.cpp @@ -81,7 +81,7 @@ Qt::ItemFlags AggregateModel::flags(const QModelIndex &index) const { if (!index.isValid()) - return nullptr; + return Qt::NoItemFlags; return Qt::ItemIsEnabled | Qt::ItemIsSelectable; }