forked from qt-creator/qt-creator
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:
@@ -564,7 +564,7 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
|
|||||||
if (vNr.indexIn(myPath.last()) == 0) {
|
if (vNr.indexIn(myPath.last()) == 0) {
|
||||||
myPath.last() = vNr.cap(1);
|
myPath.last() = vNr.cap(1);
|
||||||
}
|
}
|
||||||
for (int iPath = myPath.size(); iPath != 0; ) {
|
for (int iPath = myPath.size(); iPath != 1; ) {
|
||||||
--iPath;
|
--iPath;
|
||||||
if (safeName.indexIn(myPath.at(iPath)) != 0)
|
if (safeName.indexIn(myPath.at(iPath)) != 0)
|
||||||
break;
|
break;
|
||||||
@@ -595,7 +595,7 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
|
|||||||
minorVersion = LanguageUtils::ComponentVersion::NoVersion;
|
minorVersion = LanguageUtils::ComponentVersion::NoVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int iPath = splitPath.size(); iPath != 0; ) {
|
for (int iPath = splitPath.size(); iPath != 1; ) {
|
||||||
--iPath;
|
--iPath;
|
||||||
if (safeName.indexIn(splitPath.at(iPath)) != 0)
|
if (safeName.indexIn(splitPath.at(iPath)) != 0)
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user