aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-02-05 18:12:42 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-02-09 21:46:43 +0100
commitb17ccb8af9f9149d100e391af9e1c25e97a962d0 (patch)
tree2ed22a5c36b4e938a801500b7bd8e2773b9fe503 /tests/auto
parentdab0d62b655ce9a476993de2558a573a5066288c (diff)
Use QLibraryInfo::QmlImportsPath rather than Qml2ImportsPath
The "2" is meaningless and there is a better name available now. Task-number: QTBUG-85064 Change-Id: I65d26b06712ed7dcf2825f16dffaa6060dd86985 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp8
-rw-r--r--tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp2
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp4
-rw-r--r--tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp2
-rw-r--r--tests/auto/qml/qqmlimport/tst_qqmlimport.cpp4
5 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
index 41b52a0a6b..04f9b1fe0c 100644
--- a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
+++ b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
@@ -245,18 +245,18 @@ void tst_QQmlPreview::blacklist()
blacklist2.blacklist(":/qt-project.org");
blacklist2.blacklist(":/QtQuick/Controls/Styles");
blacklist2.blacklist(":/ExtrasImports/QtQuick/Controls/Styles");
- blacklist2.blacklist(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath));
+ blacklist2.blacklist(QLibraryInfo::path(QLibraryInfo::QmlImportsPath));
blacklist2.blacklist("/home/ulf/.local/share/QtProject/Qml Runtime/configuration.qml");
blacklist2.blacklist("/usr/share");
blacklist2.blacklist("/usr/share/QtProject/Qml Runtime/configuration.qml");
- QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)));
+ QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::path(QLibraryInfo::QmlImportsPath)));
blacklist2.blacklist("/usr/local/share/QtProject/Qml Runtime/configuration.qml");
blacklist2.blacklist("qml");
blacklist2.blacklist(""); // This should not remove all other paths.
- QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath) +
+ QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::path(QLibraryInfo::QmlImportsPath) +
"/QtQuick/Window.2.0"));
- QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)));
+ QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::path(QLibraryInfo::QmlImportsPath)));
QVERIFY(blacklist2.isBlacklisted("/usr/share/QtProject/Qml Runtime/configuration.qml"));
QVERIFY(blacklist2.isBlacklisted("/usr/share/stuff"));
QVERIFY(blacklist2.isBlacklisted(""));
diff --git a/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp b/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp
index cfcec61f82..ca11d00915 100644
--- a/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp
+++ b/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp
@@ -121,7 +121,7 @@ void TestQmlimportscanner::runQmlimportscanner(const QString &mode, const QStrin
const QString file(pathToScan);
QStringList args {
mode, file,
- "-importPath", QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath), dataDirectory()
+ "-importPath", QLibraryInfo::path(QLibraryInfo::QmlImportsPath), dataDirectory()
};
QString errors;
QProcess process;
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index dc84e1c535..1486a9e1d3 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -155,7 +155,7 @@ void TestQmllint::qmltypes_data()
{
QTest::addColumn<QString>("file");
- const QString importsPath = QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath);
+ const QString importsPath = QLibraryInfo::path(QLibraryInfo::QmlImportsPath);
QDirIterator it(importsPath, { "*.qmltypes" },
QDir::Files, QDirIterator::Subdirectories);
while (it.hasNext())
@@ -359,7 +359,7 @@ QString TestQmllint::runQmllint(const QString &fileToLint,
std::function<void(QProcess &)> handleResult,
const QStringList &extraArgs)
{
- auto qmlImportDir = QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath);
+ auto qmlImportDir = QLibraryInfo::path(QLibraryInfo::QmlImportsPath);
QStringList args;
args << (QFileInfo(fileToLint).isAbsolute() ? fileToLint : testFile(fileToLint))
diff --git a/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp b/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp
index c9fe00a837..e3c8151884 100644
--- a/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp
+++ b/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp
@@ -76,7 +76,7 @@ private Q_SLOTS:
void tst_qqmlextensionplugin::iidCheck_data()
{
QList<QString> files;
- for (QDirIterator it(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath), QDirIterator::Subdirectories); it.hasNext(); ) {
+ for (QDirIterator it(QLibraryInfo::path(QLibraryInfo::QmlImportsPath), QDirIterator::Subdirectories); it.hasNext(); ) {
QString file = it.next();
#if defined(Q_OS_DARWIN)
if (file.contains(QLatin1String(".dSYM/")))
diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
index 8229b79702..92565cc591 100644
--- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
+++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
@@ -166,11 +166,11 @@ void tst_QQmlImport::uiFormatLoading()
void tst_QQmlImport::importPathOrder()
{
#ifdef Q_OS_ANDROID
- QSKIP("QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath) returns bogus path on Android, but its nevertheless unusable.");
+ QSKIP("QLibraryInfo::path(QLibraryInfo::QmlImportsPath) returns bogus path on Android, but its nevertheless unusable.");
#endif
QStringList expectedImportPaths;
QString appDirPath = QCoreApplication::applicationDirPath();
- QString qml2Imports = QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath);
+ QString qml2Imports = QLibraryInfo::path(QLibraryInfo::QmlImportsPath);
#ifdef Q_OS_WIN
// The drive letter has a different case as QQmlImport will
// cause it to be converted after passing through QUrl