forked from qt-creator/qt-creator
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 af8bd12387
)
Change-Id: Ib4293437ab83da8ed10a696fba2c30f5c51c8124
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user