From 7571f0b8f4a581ec572a93c37079342b1cde5435 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Sep 2024 12:48:47 +0200 Subject: [PATCH] Qml tests: Adapt to QLibraryInfo::location deprecation using LibraryLocation = LibraryPath; QT_DEPRECATED_VERSION_X_6_0("Use path()") static QString location(LibraryLocation location) { return path(location); } Change-Id: I8ee8f6de3ec16b5cda3814fde7e9ef9eb33b4334 Reviewed-by: Christian Stenger --- tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp | 2 +- tests/auto/qml/codemodel/ecmascript7/tst_ecmascript7.cpp | 2 +- tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp b/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp index e550383724f..935ceae400b 100644 --- a/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp +++ b/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp @@ -92,7 +92,7 @@ void tst_Dependencies::initTestCase() { m_path = QLatin1String(TESTSRCDIR "/samples"); - m_basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); + m_basePaths.append(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)); if (!ModelManagerInterface::instance()) new ModelManagerInterface; diff --git a/tests/auto/qml/codemodel/ecmascript7/tst_ecmascript7.cpp b/tests/auto/qml/codemodel/ecmascript7/tst_ecmascript7.cpp index ac0611aa85c..7b667ee4d3a 100644 --- a/tests/auto/qml/codemodel/ecmascript7/tst_ecmascript7.cpp +++ b/tests/auto/qml/codemodel/ecmascript7/tst_ecmascript7.cpp @@ -122,7 +122,7 @@ void tst_Ecmascript::initTestCase() m_files << f; } - m_basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); + m_basePaths.append(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)); if (!ModelManagerInterface::instance()) new ModelManagerInterface; diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp index d37b639cd0c..f722673343f 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp @@ -249,7 +249,7 @@ void tst_TestCore::initTestCase() initializeMetaTypeSystem(IDE_DATA_PATH); QStringList basePaths; - basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); + basePaths.append(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)); QmlJS::PathsAndLanguages lPaths; lPaths.maybeInsert(Utils::FilePath::fromString(basePaths.first()), QmlJS::Dialect::Qml);