CppModelManager: Remove method overload used only in tests

Use (and therefore test) the method actually used in production code.

Change-Id: I4317517ef8a1779df4d46af3905790012ee98645
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Bernhard Beschow
2018-12-11 17:33:18 +01:00
parent 5916be8756
commit 9ee785a4ef
4 changed files with 11 additions and 13 deletions

View File

@@ -190,7 +190,8 @@ void CppToolsPlugin::test_modelmanager_paths_are_clean()
{testDataDir.frameworksDir(false), HeaderPathType::Framework}};
pi.appendProjectPart(part);
mm->updateProjectInfo(pi);
QFutureInterface<void> dummy;
mm->updateProjectInfo(dummy, pi);
ProjectExplorer::HeaderPaths headerPaths = mm->headerPaths();
QCOMPARE(headerPaths.size(), 2);
@@ -222,7 +223,8 @@ void CppToolsPlugin::test_modelmanager_framework_headers()
part->files << ProjectFile(source, ProjectFile::CXXSource);
pi.appendProjectPart(part);
mm->updateProjectInfo(pi).waitForFinished();
QFutureInterface<void> dummy;
mm->updateProjectInfo(dummy, pi).waitForFinished();
QCoreApplication::processEvents();
QVERIFY(mm->snapshot().contains(source));
@@ -321,7 +323,8 @@ void CppToolsPlugin::test_modelmanager_refresh_several_times()
part->files.append(ProjectFile(testHeader2, ProjectFile::CXXHeader));
part->files.append(ProjectFile(testCpp, ProjectFile::CXXSource));
pi.appendProjectPart(part);
mm->updateProjectInfo(pi);
QFutureInterface<void> dummy;
mm->updateProjectInfo(dummy, pi);
CPlusPlus::Snapshot snapshot;
QSet<QString> refreshedFiles;
@@ -384,7 +387,8 @@ void CppToolsPlugin::test_modelmanager_refresh_test_for_changes()
// Reindexing triggers a reparsing thread
helper.resetRefreshedSourceFiles();
QFuture<void> firstFuture = mm->updateProjectInfo(pi);
QFutureInterface<void> dummy;
QFuture<void> firstFuture = mm->updateProjectInfo(dummy, pi);
QVERIFY(firstFuture.isStarted() || firstFuture.isRunning());
firstFuture.waitForFinished();
const QSet<QString> refreshedFiles = helper.waitForRefreshedSourceFiles();
@@ -392,7 +396,7 @@ void CppToolsPlugin::test_modelmanager_refresh_test_for_changes()
QVERIFY(refreshedFiles.contains(testCpp));
// No reindexing since nothing has changed
QFuture<void> subsequentFuture = mm->updateProjectInfo(pi);
QFuture<void> subsequentFuture = mm->updateProjectInfo(dummy, pi);
QVERIFY(subsequentFuture.isCanceled() && subsequentFuture.isFinished());
}