aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/cpptoolstestcase.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-09-04 14:59:50 +0200
committerErik Verbruggen <erik.verbruggen@digia.com>2014-09-04 15:59:40 +0200
commitcc70b603d30b1a9dae9cf0bc30c570c5f7b0b994 (patch)
tree765b83e68eea0712aa16128bbf11c82424b868ee /src/plugins/cpptools/cpptoolstestcase.cpp
parent50e951dcb4a421d94e387fb91d527a9ba4bbce00 (diff)
C++: Change QStringList to QSet<QString> to prevent conversions.
This eliminates a bunch of list->set->list conversions. Especially the ProjectInfo::appendProjectPart takes lots of time converting for every part added. Change-Id: Ib3c8cd4b0ad6c012ccbeed12ebedd46b9b6cca95 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolstestcase.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolstestcase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cpptoolstestcase.cpp b/src/plugins/cpptools/cpptoolstestcase.cpp
index 554a993596f..c91451d179b 100644
--- a/src/plugins/cpptools/cpptoolstestcase.cpp
+++ b/src/plugins/cpptools/cpptoolstestcase.cpp
@@ -45,7 +45,7 @@ static bool closeEditorsWithoutGarbageCollectorInvocation(const QList<Core::IEdi
return closeEditorsSucceeded;
}
-static bool snapshotContains(const CPlusPlus::Snapshot &snapshot, const QStringList &filePaths)
+static bool snapshotContains(const CPlusPlus::Snapshot &snapshot, const QSet<QString> &filePaths)
{
foreach (const QString &filePath, filePaths) {
if (!snapshot.contains(filePath)) {
@@ -125,7 +125,7 @@ bool TestCase::garbageCollectGlobalSnapshot()
return globalSnapshot().isEmpty();
}
-bool TestCase::parseFiles(const QStringList &filePaths)
+bool TestCase::parseFiles(const QSet<QString> &filePaths)
{
CppModelManagerInterface::instance()->updateSourceFiles(filePaths).waitForFinished();
QCoreApplication::processEvents();
@@ -143,7 +143,7 @@ bool TestCase::parseFiles(const QStringList &filePaths)
bool TestCase::parseFiles(const QString &filePath)
{
- return parseFiles(QStringList(filePath));
+ return parseFiles(QSet<QString>() << filePath);
}
void TestCase::closeEditorAtEndOfTestCase(Core::IEditor *editor)