aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-07-13 16:34:49 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-08-29 07:34:26 +0000
commit8ef4964168ccca6153cd9dbfc631043d8293e370 (patch)
tree5fa48897c7824db395d2c31812b99543fef3ed60
parentfaccb8fd7195af5bcbbf5d9d226919bffe4b1865 (diff)
QmlProfiler: Don't scan the whole file system in rewriter test
QLibraryInfo::location() returns one string. Iterating over that gives us the individual characters, beginning with '/'. Running that through FileName::fromString(), gives us "/", and feeding this to ModelManagerInterface::importScan() is not funny. This has to be backported as the sheer volume of files to be scanned makes the tests time out. (cherry-picked from commit af8bd1238724e3d578b9a16e4ffa88a6a046dca6) Change-Id: Ib4293437ab83da8ed10a696fba2c30f5c51c8124 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp
index 830f1a1e61..e70b11f21e 100644
--- a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp
+++ b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp
@@ -213,8 +213,9 @@ void QmlProfilerDetailsRewriterTest::seedRewriter()
QFutureInterface<void> result;
QmlJS::PathsAndLanguages lPaths;
- for (auto p : QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath))
- lPaths.maybeInsert(Utils::FileName::fromString(p), QmlJS::Dialect::Qml);
+ lPaths.maybeInsert(
+ Utils::FileName::fromString(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)),
+ QmlJS::Dialect::Qml);
QmlJS::ModelManagerInterface::importScan(result, QmlJS::ModelManagerInterface::workingCopy(),
lPaths, m_modelManager, false);