forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -264,8 +264,7 @@ void GitGrep::writeSettings(QSettings *settings) const
|
||||
settings->setValue(GitGrepRef, m_treeLineEdit->text());
|
||||
}
|
||||
|
||||
QFuture<SearchResultItems> GitGrep::executeSearch(const FileFindParameters ¶meters,
|
||||
BaseFileFind *)
|
||||
QFuture<SearchResultItems> GitGrep::executeSearch(const FileFindParameters ¶meters)
|
||||
{
|
||||
return Utils::asyncRun(runGitGrep, parameters);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user