Commit cbc5f22b authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlJS: Allow version in parent module

Task-number: QTCREATORBUG-16145
Change-Id: I5ddbbab1c808f422ebcec1502f9b50a9bf0babb6
Reviewed-by: default avatarMarco Benelli <>
Reviewed-by: Eike Ziller's avatarEike Ziller <>
Reviewed-by: default avatarAlessandro Portale <>
parent 482bbec1
......@@ -410,6 +410,24 @@ Import LinkPrivate::importNonFile(Document::Ptr doc, const ImportInfo &importInf
//The version number can be located higher in the path: qml/QtQuick.Controls.2/Material
if (!importFound) {
foreach (const QString &importPath, importPaths) {
QStringList splittedList = packagePath.split(QLatin1String("/"));
const QString last = splittedList.last();
QString libraryPath = QString::fromLatin1("%1/%2.%3/%4").arg(importPath,
if (importLibrary(doc, libraryPath, &import, importPath)) {
importFound = true;
// if there are cpp-based types for this package, use them too
if (valueOwner->cppQmlTypes().hasModule(packageName)) {
importFound = true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment