forked from qt-creator/qt-creator
QmlJS: Fixing warnings
Correcting ImportKey::compare(). The compare function was not stable and QMap did not work properly. Done with: Fawzi Change-Id: I11790215cba6944bf9f04be0c3844b35ea54ea70 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -950,13 +950,13 @@ void ModelManager::importScan(QFutureInterface<void> &future,
|
||||
int totalWork(progressRange), workDone(0);
|
||||
future.setProgressRange(0, progressRange); // update max length while iterating?
|
||||
const bool libOnly = true; // FIXME remove when tested more
|
||||
const Snapshot snapshot = modelManager->snapshot();
|
||||
while (!pathsToScan.isEmpty() && !future.isCanceled()) {
|
||||
ScanItem toScan = pathsToScan.last();
|
||||
pathsToScan.pop_back();
|
||||
int pathBudget = (maxScanDepth + 2 - toScan.depth);
|
||||
if (!scannedPaths.contains(toScan.path)) {
|
||||
QStringList importedFiles;
|
||||
const Snapshot snapshot = modelManager->snapshot();
|
||||
if (!findNewQmlLibraryInPath(toScan.path, snapshot, modelManager, &importedFiles,
|
||||
&scannedPaths, &newLibraries, true)
|
||||
&& !libOnly && snapshot.documentsInDirectory(toScan.path).isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user