aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-01-17 15:50:46 +0100
committerhjk <hjk@qt.io>2020-01-20 10:09:23 +0000
commit7e19d1af7c356dae703e110f9d24b75429ef8fb5 (patch)
treeb51b30d023ab285d8b4185806220596a9b1bd5df /src/plugins
parenta3447f6eb23870f3051868a0363301e982deb64e (diff)
Use even less nullptr for default flags
Change-Id: I5ec30de3e41dfc1c7bf6d5f5e36991eadcbbfb72 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/bineditor/bineditorplugin.cpp2
-rw-r--r--src/plugins/bineditor/bineditorwidget.h6
-rw-r--r--src/plugins/clangrefactoring/clangqueryprojectsfindfilter.h2
-rw-r--r--src/plugins/clangrefactoring/clangrefactoringplugin.cpp2
-rw-r--r--src/plugins/coreplugin/dialogs/externaltoolconfig.cpp2
-rw-r--r--src/plugins/coreplugin/find/findplugin.h2
-rw-r--r--src/plugins/cpptools/cppcodestylesettingspage.cpp2
-rw-r--r--src/plugins/cpptools/symbolsearcher_test.cpp4
-rw-r--r--src/plugins/help/helpwidget.cpp2
9 files changed, 11 insertions, 13 deletions
diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp
index b6bc79d23a..81de2b5690 100644
--- a/src/plugins/bineditor/bineditorplugin.cpp
+++ b/src/plugins/bineditor/bineditorplugin.cpp
@@ -148,7 +148,7 @@ public:
} else {
result = NotFound;
m_contPos = -1;
- m_widget->highlightSearchResults(QByteArray(), nullptr);
+ m_widget->highlightSearchResults(QByteArray(), {});
}
}
return result;
diff --git a/src/plugins/bineditor/bineditorwidget.h b/src/plugins/bineditor/bineditorwidget.h
index c44dbb4c8c..50c369caf0 100644
--- a/src/plugins/bineditor/bineditorwidget.h
+++ b/src/plugins/bineditor/bineditorwidget.h
@@ -97,8 +97,7 @@ public:
void setReadOnly(bool);
bool isReadOnly() const;
- int find(const QByteArray &pattern, qint64 from = 0,
- QTextDocument::FindFlags findFlags = nullptr);
+ int find(const QByteArray &pattern, qint64 from = 0, QTextDocument::FindFlags findFlags = {});
void selectAll();
void clear();
@@ -124,8 +123,7 @@ public:
QList<Markup> markup() const { return m_markup; }
void setFontSettings(const TextEditor::FontSettings &fs);
- void highlightSearchResults(const QByteArray &pattern,
- QTextDocument::FindFlags findFlags = nullptr);
+ void highlightSearchResults(const QByteArray &pattern, QTextDocument::FindFlags findFlags = {});
void copy(bool raw = false);
void setMarkup(const QList<Markup> &markup);
void setNewWindowRequestAllowed(bool c);
diff --git a/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.h b/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.h
index 2d36caed2e..bc5c95579c 100644
--- a/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.h
+++ b/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.h
@@ -62,7 +62,7 @@ public:
bool isEnabled() const override;
void requestSourceRangesAndDiagnostics(const QString &queryText, const QString &exampleContent);
SearchHandle *find(const QString &queryText);
- void findAll(const QString &queryText, Core::FindFlags findFlags = nullptr) override;
+ void findAll(const QString &queryText, Core::FindFlags findFlags = {}) override;
bool showSearchTermInput() const override;
Core::FindFlags supportedFindFlags() const override;
diff --git a/src/plugins/clangrefactoring/clangrefactoringplugin.cpp b/src/plugins/clangrefactoring/clangrefactoringplugin.cpp
index 4f7d34d800..0e58930363 100644
--- a/src/plugins/clangrefactoring/clangrefactoringplugin.cpp
+++ b/src/plugins/clangrefactoring/clangrefactoringplugin.cpp
@@ -88,7 +88,7 @@ public:
ClangPchManager::ProgressManager progressManager{
[] (QFutureInterface<void> &promise) {
auto title = QCoreApplication::translate("ClangRefactoringProgressManager", "C++ Indexing");
- Core::ProgressManager::addTask(promise.future(), title, "clang indexing", nullptr);}};
+ Core::ProgressManager::addTask(promise.future(), title, "clang indexing", {});}};
RefactoringClient refactoringClient{progressManager};
QtCreatorEditorManager editorManager{filePathCache};
ClangBackEnd::RefactoringConnectionClient connectionClient{&refactoringClient};
diff --git a/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp b/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp
index b78f0b5dba..661856a4d8 100644
--- a/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp
+++ b/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp
@@ -223,7 +223,7 @@ Qt::ItemFlags ExternalToolModel::flags(const QModelIndex &index) const
return TOOLSMENU_ITEM_FLAGS;
return CATEGORY_ITEM_FLAGS;
}
- return nullptr;
+ return {};
}
bool ExternalToolModel::setData(const QModelIndex &modelIndex, const QVariant &value, int role)
diff --git a/src/plugins/coreplugin/find/findplugin.h b/src/plugins/coreplugin/find/findplugin.h
index f79ed666e7..a997d833a9 100644
--- a/src/plugins/coreplugin/find/findplugin.h
+++ b/src/plugins/coreplugin/find/findplugin.h
@@ -54,7 +54,7 @@ public:
static FindFlags findFlags();
static bool hasFindFlag(FindFlag flag);
- static void updateFindCompletion(const QString &text, FindFlags flags = nullptr);
+ static void updateFindCompletion(const QString &text, FindFlags flags = {});
static void updateReplaceCompletion(const QString &text);
static QAbstractListModel *findCompletionModel();
static QStringListModel *replaceCompletionModel();
diff --git a/src/plugins/cpptools/cppcodestylesettingspage.cpp b/src/plugins/cpptools/cppcodestylesettingspage.cpp
index 1616411f51..160b2e1cbf 100644
--- a/src/plugins/cpptools/cppcodestylesettingspage.cpp
+++ b/src/plugins/cpptools/cppcodestylesettingspage.cpp
@@ -75,7 +75,7 @@ static void applyRefactorings(QTextDocument *textDocument, TextEditorWidget *edi
// Run the formatter
Overview overview;
overview.showReturnTypes = true;
- overview.starBindFlags = Overview::StarBindFlags(nullptr);
+ overview.starBindFlags = {};
if (settings.bindStarToIdentifier)
overview.starBindFlags |= Overview::BindToIdentifier;
diff --git a/src/plugins/cpptools/symbolsearcher_test.cpp b/src/plugins/cpptools/symbolsearcher_test.cpp
index 624973cbf4..b1793beedd 100644
--- a/src/plugins/cpptools/symbolsearcher_test.cpp
+++ b/src/plugins/cpptools/symbolsearcher_test.cpp
@@ -258,7 +258,7 @@ void CppToolsPlugin::test_builtinsymbolsearcher_data()
// Check Enums
searchParameters = SymbolSearcher::Parameters();
searchParameters.text = _("enum");
- searchParameters.flags = nullptr;
+ searchParameters.flags = {};
searchParameters.types = SymbolSearcher::Enums;
searchParameters.scope = SymbolSearcher::SearchGlobal;
QTest::newRow("BuiltinSymbolSearcher::Enums")
@@ -273,7 +273,7 @@ void CppToolsPlugin::test_builtinsymbolsearcher_data()
// Check Declarations
searchParameters = SymbolSearcher::Parameters();
searchParameters.text = _("myvar");
- searchParameters.flags = nullptr;
+ searchParameters.flags = {};
searchParameters.types = SymbolSearcher::Declarations;
searchParameters.scope = SymbolSearcher::SearchGlobal;
QTest::newRow("BuiltinSymbolSearcher::Declarations")
diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp
index 9df84970bb..e8d85caa18 100644
--- a/src/plugins/help/helpwidget.cpp
+++ b/src/plugins/help/helpwidget.cpp
@@ -975,7 +975,7 @@ void HelpWidget::highlightSearchTerms()
auto viewer = qobject_cast<HelpViewer *>(sender());
QTC_ASSERT(viewer, return);
foreach (const QString& term, m_searchTerms)
- viewer->findText(term, nullptr, false, true);
+ viewer->findText(term, {}, false, true);
m_searchTerms.clear();
}