diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2023-06-28 17:03:58 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2023-07-04 12:23:05 +0000 |
commit | de5efffeff8a2adebc77fd2b6888047abf8530a5 (patch) | |
tree | ccf7599cc4c9f132e0a547f824f5d70717b417db /src/plugins/texteditor/findincurrentfile.h | |
parent | 6e16512eba2c39baa714fa253843b2171ba24f47 (diff) |
BaseFileFind: Replace files() with fileContainerProvider()
The fileContainerProvider() is called only once per
SearchResult instance, and the result (the provider)
is stored inside FileFindParameters.
In this way the extra data, like the name filters or
the search directory, are set just once. Whenever the
search is started (or started again), the stored provider
recreates the FileContainer according to the data that
has been captured by the lambda when the provider was created.
This patch eliminates the need for retrieving the custom
data from QVariant. It also eliminates the set of arbitrary
arguments for the removed files() method.
Remove the BaseFileFind * argument from the
SearchEngine::executeSearch() method.
Change-Id: I7211f503f82db12b5a99c9d342466daaaae0839f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/texteditor/findincurrentfile.h')
-rw-r--r-- | src/plugins/texteditor/findincurrentfile.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/texteditor/findincurrentfile.h b/src/plugins/texteditor/findincurrentfile.h index c5f07eb8b9..5eb75de05b 100644 --- a/src/plugins/texteditor/findincurrentfile.h +++ b/src/plugins/texteditor/findincurrentfile.h @@ -29,14 +29,12 @@ public: void readSettings(QSettings *settings) override; protected: - Utils::FileContainer files(const QStringList &nameFilters, - const QStringList &exclusionFilters, - const QVariant &additionalParameters) const override; QVariant additionalParameters() const override; QString label() const override; QString toolTip() const override; private: + FileContainerProvider fileContainerProvider() const override; void handleFileChange(Core::IEditor *editor); QPointer<Core::IDocument> m_currentDocument; |