forked from qt-creator/qt-creator
qmldocumentparser: adapt to changes in Dom for Qt 6.6
Add an if-guard so that it compiles for both 6.5 and 6.6. Change-Id: I0d539c8b6b193218786dce33ac2a7f386209b622 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -294,9 +294,16 @@ Storage::Synchronization::Type QmlDocumentParser::parse(const QString &sourceCon
|
|||||||
QString filePath{m_pathCache.sourcePath(sourceId)};
|
QString filePath{m_pathCache.sourcePath(sourceId)};
|
||||||
|
|
||||||
environment.loadFile(
|
environment.loadFile(
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 6, 0)
|
||||||
|
filePath,
|
||||||
|
filePath,
|
||||||
|
sourceContent,
|
||||||
|
QDateTime{},
|
||||||
|
#else
|
||||||
QQmlJS::Dom::FileToLoad::fromMemory(environment.ownerAs<QQmlJS::Dom::DomEnvironment>(),
|
QQmlJS::Dom::FileToLoad::fromMemory(environment.ownerAs<QQmlJS::Dom::DomEnvironment>(),
|
||||||
filePath,
|
filePath,
|
||||||
sourceContent),
|
sourceContent),
|
||||||
|
#endif
|
||||||
[&](QmlDom::Path, const QmlDom::DomItem &, const QmlDom::DomItem &newItems) {
|
[&](QmlDom::Path, const QmlDom::DomItem &, const QmlDom::DomItem &newItems) {
|
||||||
items = newItems;
|
items = newItems;
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user