aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmldom/merging/tst_dommerging.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qmldom/merging/tst_dommerging.h')
-rw-r--r--tests/auto/qmldom/merging/tst_dommerging.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/auto/qmldom/merging/tst_dommerging.h b/tests/auto/qmldom/merging/tst_dommerging.h
index 01d20014bf..59937b279e 100644
--- a/tests/auto/qmldom/merging/tst_dommerging.h
+++ b/tests/auto/qmldom/merging/tst_dommerging.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef TST_DOMMERGING_H
#define TST_DOMMERGING_H
@@ -38,16 +38,13 @@ private slots:
auto envPtr = std::shared_ptr<QQmlJS::Dom::DomEnvironment>(new QQmlJS::Dom::DomEnvironment(
qmltypeDirs,
DomEnvironment::Option::SingleThreaded | DomEnvironment::Option::NoDependencies));
- QQmlJS::Dom::DomItem env(envPtr);
- QVERIFY(env);
QString testFile1 = baseDir + QLatin1String("/test1.qml");
- env.loadFile(
- testFile1, QString(),
- [this](Path, const DomItem &, const DomItem &newIt) { this->tFile = newIt; },
- LoadOption::DefaultLoad);
- env.loadFile(baseDir, QString(), {}, LoadOption::DefaultLoad);
- envPtr->loadPendingDependencies(env);
+ envPtr->loadFile(
+ FileToLoad::fromFileSystem(envPtr, testFile1),
+ [this](Path, const DomItem &, const DomItem &newIt) { this->tFile = newIt; });
+ envPtr->loadFile(FileToLoad::fromFileSystem(envPtr, baseDir), {});
+ envPtr->loadPendingDependencies();
QVERIFY(tFile);
tFile = tFile.field(Fields::currentItem);