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:
Thomas Hartmann
2013-11-26 09:55:34 +01:00
parent 574d702893
commit caff343769
3 changed files with 38 additions and 3 deletions

View File

@@ -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())