diff options
author | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2022-03-25 09:51:58 +0100 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2022-04-22 01:47:50 +0200 |
commit | 838c7724e6393b21c5adeb0b7d85aa5d8457c59e (patch) | |
tree | 8587ef5e62e2e355e14d57ba1fc922ce7805c4e9 | |
parent | 69586864d3e4d8b537aa3d6c2f6c09de76e330f2 (diff) |
qmldom: Fix standalone compilation against Qt 6.3.0
Change-Id: I402eeeab1cd6f5e02d5f49eedbd01010de39d05a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | examples/qml/qmldom/qmldomloadeditwrite.cpp | 2 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsimporter.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/examples/qml/qmldom/qmldomloadeditwrite.cpp b/examples/qml/qmldom/qmldomloadeditwrite.cpp index 0b5b35b2c8..5655af9888 100644 --- a/examples/qml/qmldom/qmldomloadeditwrite.cpp +++ b/examples/qml/qmldom/qmldomloadeditwrite.cpp @@ -235,7 +235,7 @@ int main() for (DomItem import : imports.values()) { if (const Import *importPtr = import.as<Import>()) { if (importPtr->implicit) - qDebug() << importPtr->uri << importPtr->version.stringValue(); + qDebug() << importPtr->uri.toString() << importPtr->version.stringValue(); } } diff --git a/src/qmlcompiler/qqmljsimporter.cpp b/src/qmlcompiler/qqmljsimporter.cpp index 7720c194c4..0ac4f490fc 100644 --- a/src/qmlcompiler/qqmljsimporter.cpp +++ b/src/qmlcompiler/qqmljsimporter.cpp @@ -147,8 +147,11 @@ QQmlJSImporter::Import QQmlJSImporter::readQmldir(const QString &path) Import result; auto reader = createQmldirParserForFile(path + SlashQmldir); result.name = reader.typeNamespace(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) + // #if required for standalone DOM build against Qt6.3 result.isStaticModule = reader.isStaticModule(); result.isSystemModule = reader.isSystemModule(); +#endif result.imports.append(reader.imports()); result.dependencies.append(reader.dependencies()); @@ -278,9 +281,11 @@ void QQmlJSImporter::importDependencies(const QQmlJSImporter::Import &import, if (!m_useOptionalImports) { continue; } - +#if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)) + // #if required for standalone DOM build against Qt6.3 if (!(import.flags & QQmlDirParser::Import::OptionalDefault)) continue; +#endif } importHelper(import.module, types, isDependency ? QString() : prefix, |