From ce4dc86d58507997d6611f7b4895c9d1cbf7aad0 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Mon, 7 Jul 2014 19:46:50 +0200 Subject: [PATCH] qmljs: avoid adding the full path without required path full path imports of modules did not have a required path (not even /), so did show up with any import paths. Change-Id: I494edc50339f0c707499b13f6c16c2a264cbaa79 Reviewed-by: Marco Bubke --- src/libs/qmljs/qmljsdocument.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp index f3e0eb5fe53..efa966ba3c6 100644 --- a/src/libs/qmljs/qmljsdocument.cpp +++ b/src/libs/qmljs/qmljsdocument.cpp @@ -564,7 +564,7 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info) if (vNr.indexIn(myPath.last()) == 0) { myPath.last() = vNr.cap(1); } - for (int iPath = myPath.size(); iPath != 0; ) { + for (int iPath = myPath.size(); iPath != 1; ) { --iPath; if (safeName.indexIn(myPath.at(iPath)) != 0) break; @@ -595,7 +595,7 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info) minorVersion = LanguageUtils::ComponentVersion::NoVersion; } - for (int iPath = splitPath.size(); iPath != 0; ) { + for (int iPath = splitPath.size(); iPath != 1; ) { --iPath; if (safeName.indexIn(splitPath.at(iPath)) != 0) break;