diff --git a/src/plugins/cppeditor/cppindexingsupport.cpp b/src/plugins/cppeditor/cppindexingsupport.cpp index 048adbb0334..d5455942e8f 100644 --- a/src/plugins/cppeditor/cppindexingsupport.cpp +++ b/src/plugins/cppeditor/cppindexingsupport.cpp @@ -334,10 +334,4 @@ QFuture CppIndexingSupport::refreshSourceFiles(const QSet &source return result; } -SymbolSearcher *CppIndexingSupport::createSymbolSearcher( - const SymbolSearcher::Parameters ¶meters, const QSet &fileNames) -{ - return new SymbolSearcher(parameters, fileNames); -} - } // namespace CppEditor diff --git a/src/plugins/cppeditor/cppindexingsupport.h b/src/plugins/cppeditor/cppindexingsupport.h index abf9311787d..584632a4f00 100644 --- a/src/plugins/cppeditor/cppindexingsupport.h +++ b/src/plugins/cppeditor/cppindexingsupport.h @@ -62,8 +62,6 @@ public: QFuture refreshSourceFiles(const QSet &sourceFiles, CppModelManager::ProgressNotificationMode mode); - SymbolSearcher *createSymbolSearcher(const SymbolSearcher::Parameters ¶meters, - const QSet &fileNames); private: Utils::FutureSynchronizer m_synchronizer; }; diff --git a/src/plugins/cppeditor/symbolsearcher_test.cpp b/src/plugins/cppeditor/symbolsearcher_test.cpp index d55d7777a09..9f700d99726 100644 --- a/src/plugins/cppeditor/symbolsearcher_test.cpp +++ b/src/plugins/cppeditor/symbolsearcher_test.cpp @@ -75,9 +75,8 @@ public: QVERIFY(succeededSoFar()); QVERIFY(parseFiles(testFile)); - CppIndexingSupport *indexingSupport = m_modelManager->indexingSupport(); const QScopedPointer symbolSearcher( - indexingSupport->createSymbolSearcher(searchParameters, QSet{testFile})); + new SymbolSearcher(searchParameters, QSet{testFile})); QFuture search = Utils::runAsync(&SymbolSearcher::runSearch, symbolSearcher.data()); search.waitForFinished(); diff --git a/src/plugins/cppeditor/symbolsfindfilter.cpp b/src/plugins/cppeditor/symbolsfindfilter.cpp index 4beaa83d64c..7114beb5ab7 100644 --- a/src/plugins/cppeditor/symbolsfindfilter.cpp +++ b/src/plugins/cppeditor/symbolsfindfilter.cpp @@ -116,7 +116,7 @@ void SymbolsFindFilter::startSearch(SearchResult *search) connect(watcher, &QFutureWatcherBase::finished, this, [this, watcher] { finish(watcher); }); connect(watcher, &QFutureWatcherBase::resultsReadyAt, this, [this, watcher] (int begin, int end) { addResults(watcher, begin, end); }); - SymbolSearcher *symbolSearcher = m_manager->indexingSupport()->createSymbolSearcher(parameters, projectFileNames); + SymbolSearcher *symbolSearcher = new SymbolSearcher(parameters, projectFileNames); connect(watcher, &QFutureWatcherBase::finished, symbolSearcher, &QObject::deleteLater); watcher->setFuture(Utils::runAsync(m_manager->sharedThreadPool(),