diff options
author | Tim Jenssen <tim.jenssen@digia.com> | 2014-08-29 13:09:53 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@digia.com> | 2014-08-29 13:15:49 +0200 |
commit | 576914516aaa2df3342caf6d68b90c15ef2781ac (patch) | |
tree | df5107c45e4c27103bda3b22c8b07c570b916998 /src/qml/qml/qqmlimport.cpp | |
parent | 461e3ddfe673ffbc6f9e4dcc0e0f851a3dc000e3 (diff) |
introduce *.ui.qml file types as new forms file type
Change-Id: I1f07b6c1ab8afac7ee7ad05e988fe313ba904705
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 141cd4acbf..df4006d3c2 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -665,6 +665,13 @@ bool QQmlImportNamespace::Import::resolveType(QQmlTypeLoader *typeLoader, exists = QQmlFile::bundleFileExists(qmlUrl, typeLoader->engine()); } else { exists = !typeLoader->absoluteFilePath(QQmlFile::urlToLocalFileOrQrc(qmlUrl)).isEmpty(); + if (!exists) { + QString formUrl = url + QString::fromRawData(type.constData(), type.length()) + QStringLiteral(".ui.qml"); + if (!typeLoader->absoluteFilePath(QQmlFile::urlToLocalFileOrQrc(formUrl)).isEmpty()) { + exists = true; + qmlUrl = formUrl; + } + } if (!exists) exists = QQmlMetaType::findCachedCompilationUnit(QUrl(qmlUrl)); } |