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 <christian.stenger@qt.io>
This commit is contained in:
hjk
2024-09-03 12:48:47 +02:00
parent 2492864cb6
commit 7571f0b8f4
3 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);