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 <marco.bubke@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-07-07 19:46:50 +02:00
parent e5504be861
commit ce4dc86d58

View File

@@ -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;