diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-11-30 13:49:46 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-11-30 15:10:22 +0000 |
commit | dac71f3d6f6bc4f159f6107c792bc70cfe7c308e (patch) | |
tree | b9526bfdd34458a64e86b27bd482a0f58ab6a3e0 | |
parent | cc46992fbb94f1775ac22aa23b42d76f810a5913 (diff) |
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 334bc8b28e..a7cafa1a93 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -1231,10 +1231,12 @@ QString QQmlImportsPrivate::resolvedUri(const QString &dir_arg, QQmlImportDataba stableRelativePath.replace(Backslash, Slash); // remove optional versioning in dot notation from uri - int lastSlash = stableRelativePath.lastIndexOf(Slash); - if (lastSlash >= 0) { - int versionDot = stableRelativePath.indexOf(Dot, lastSlash); - if (versionDot >= 0) + int versionDot = stableRelativePath.lastIndexOf(Dot); + if (versionDot >= 0) { + int nextSlash = stableRelativePath.indexOf(Slash, versionDot); + if (nextSlash >= 0) + stableRelativePath.remove(versionDot, nextSlash - versionDot); + else stableRelativePath = stableRelativePath.left(versionDot); } |