diff options
Diffstat (limited to 'tests/auto')
20 files changed, 31 insertions, 31 deletions
diff --git a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp index ec7ee15d34..4165e8d9b4 100644 --- a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp +++ b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp @@ -135,7 +135,7 @@ QList<QQmlDebugClient *> tst_QDebugMessageService::createClients() void tst_QDebugMessageService::retrieveDebugOutput() { - QCOMPARE(QQmlDebugTest::connectTo(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml", + QCOMPARE(QQmlDebugTest::connectTo(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml", QString(), testFile(QMLFILE), true), ConnectSuccess); QTRY_VERIFY(m_client->logBuffer.size() >= 2); diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp index 37118f4bd0..a22ae6e7a0 100644 --- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp +++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp @@ -103,7 +103,7 @@ void tst_QQmlDebuggingEnabler::qmlscene() QFETCH(QStringList, services); m_process = new QQmlDebugProcess( - QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this); + QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene", this); m_process->setMaximumBindErrors(1); m_process->start(QStringList() << QString::fromLatin1("-qmljsdebugger=connector:%1%2%3%4") diff --git a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp index 91470e0651..dd201d1cfd 100644 --- a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp +++ b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp @@ -178,7 +178,7 @@ QQmlDebugTest::ConnectResult tst_QQmlDebugJS::init(bool qmlscene, const QString bool blockMode, bool restrictServices) { const QString executable = qmlscene - ? QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene" + ? QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene" : debugJsServerPath("qqmldebugjs"); return QQmlDebugTest::connectTo( executable, restrictServices ? QStringLiteral("V8Debugger") : QString(), @@ -471,7 +471,7 @@ void tst_QQmlDebugJS::setBreakpointInJavaScript() if (seedCache) { // Make sure there is a qmlc file that the engine should _not_ laod. QProcess process; - process.start(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", + process.start(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene", { testFile(QUITINJS_QMLFILE) }); QTRY_COMPARE(process.state(), QProcess::NotRunning); } @@ -854,7 +854,7 @@ void tst_QQmlDebugJS::evaluateInContext() { m_connection = new QQmlDebugConnection(); m_process = new QQmlDebugProcess( - QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this); + QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene", this); m_client = new QV4DebugClient(m_connection); QScopedPointer<QQmlEngineDebugClient> engineClient(new QQmlEngineDebugClient(m_connection)); m_process->start(QStringList() << QLatin1String(BLOCKMODE) << testFile(ONCOMPLETED_QMLFILE)); diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp index 3557940386..7815987870 100644 --- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp +++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp @@ -106,7 +106,7 @@ void tst_QQmlDebugService::checkPortRange() { QScopedPointer<QQmlDebugConnection> connection1(new QQmlDebugConnection()); QScopedPointer<QQmlDebugProcess> process1( - new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + new QQmlDebugProcess(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene", this)); process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") @@ -123,7 +123,7 @@ void tst_QQmlDebugService::checkPortRange() // Second instance QScopedPointer<QQmlDebugConnection> connection2(new QQmlDebugConnection()); QScopedPointer<QQmlDebugProcess> process2( - new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + new QQmlDebugProcess(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene", this)); process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") diff --git a/tests/auto/qml/debugger/qqmldebugtranslationservice/tst_qqmldebugtranslationservice.cpp b/tests/auto/qml/debugger/qqmldebugtranslationservice/tst_qqmldebugtranslationservice.cpp index 01ee805dee..fcff640657 100644 --- a/tests/auto/qml/debugger/qqmldebugtranslationservice/tst_qqmldebugtranslationservice.cpp +++ b/tests/auto/qml/debugger/qqmldebugtranslationservice/tst_qqmldebugtranslationservice.cpp @@ -66,7 +66,7 @@ QList<QQmlDebugClient *> tst_QQmlDebugTranslationService::createClients() void tst_QQmlDebugTranslationService::pluginConnection() { - auto executable = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml"; + auto executable = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml"; auto services = "DebugTranslation"; auto extraArgs = testFile(QMLFILE); auto block = true; diff --git a/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp b/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp index c8915fb840..05abab737e 100644 --- a/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp +++ b/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp @@ -82,7 +82,7 @@ private slots: QQmlDebugTest::ConnectResult tst_QQmlEngineControl::connectTo(const QString &file, bool restrictServices) { - return QQmlDebugTest::connectTo(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", + return QQmlDebugTest::connectTo(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene", restrictServices ? QStringLiteral("EngineControl") : QString(), testFile(file), true); } diff --git a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp index 9830f1a9bd..34c6faf4ae 100644 --- a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp @@ -88,7 +88,7 @@ QQmlEngineDebugObjectReference tst_QQmlEngineDebugInspectorIntegration::findRoot QQmlDebugTest::ConnectResult tst_QQmlEngineDebugInspectorIntegration::init(bool restrictServices) { return QQmlDebugTest::connectTo( - QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml", + QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml", restrictServices ? QStringLiteral("QmlDebugger,QmlInspector") : QString(), testFile("qtquick2.qml"), true); } diff --git a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp index b5f45f1eeb..1c72242703 100644 --- a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp +++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp @@ -64,7 +64,7 @@ private slots: QQmlDebugTest::ConnectResult tst_QQmlInspector::startQmlProcess(const QString &qmlFile, bool restrictServices) { - return QQmlDebugTest::connectTo(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml", + return QQmlDebugTest::connectTo(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml", restrictServices ? QStringLiteral("QmlInspector") : QString(), testFile(qmlFile), true); } diff --git a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp index eb6ee09479..41b52a0a6b 100644 --- a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp +++ b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp @@ -74,7 +74,7 @@ private slots: QQmlDebugTest::ConnectResult tst_QQmlPreview::startQmlProcess(const QString &qmlFile) { - return QQmlDebugTest::connectTo(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml", + return QQmlDebugTest::connectTo(QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qml", QStringLiteral("QmlPreview"), testFile(qmlFile), true); } @@ -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::location(QLibraryInfo::Qml2ImportsPath)); + blacklist2.blacklist(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)); 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::location(QLibraryInfo::Qml2ImportsPath))); + QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath))); 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::location(QLibraryInfo::Qml2ImportsPath) + + QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath) + "/QtQuick/Window.2.0")); - QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath))); + QVERIFY(blacklist2.isBlacklisted(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath))); 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/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index e7d6664136..f248b1ae90 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -204,7 +204,7 @@ private: ConnectResult connectTo(bool block, const QString &file, bool recordFromStart = true, uint flushInterval = 0, bool restrictServices = true, const QString &executable - = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene"); + = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmlscene"); void checkProcessTerminated(); void checkTraceReceived(); void checkJsHeap(); diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp index 283aef9317..bc6451dac0 100644 --- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp +++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp @@ -106,7 +106,7 @@ static bool generateCache(const QString &qmlFileName, QByteArray *capturedStderr QProcess proc; if (capturedStderr == nullptr) proc.setProcessChannelMode(QProcess::ForwardedChannels); - proc.setProgram(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator() + QLatin1String("qmlcachegen")); + proc.setProgram(QLibraryInfo::path(QLibraryInfo::BinariesPath) + QDir::separator() + QLatin1String("qmlcachegen")); proc.setArguments(QStringList() << qmlFileName); proc.start(); if (!proc.waitForFinished()) diff --git a/tests/auto/qml/qmlformat/tst_qmlformat.cpp b/tests/auto/qml/qmlformat/tst_qmlformat.cpp index ad1d33336d..c1c248e413 100644 --- a/tests/auto/qml/qmlformat/tst_qmlformat.cpp +++ b/tests/auto/qml/qmlformat/tst_qmlformat.cpp @@ -66,7 +66,7 @@ private: void TestQmlformat::initTestCase() { QQmlDataTest::initTestCase(); - m_qmlformatPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmlformat"); + m_qmlformatPath = QLibraryInfo::path(QLibraryInfo::BinariesPath) + QLatin1String("/qmlformat"); #ifdef Q_OS_WIN m_qmlformatPath += QLatin1String(".exe"); #endif diff --git a/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp b/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp index f4df7e9ac6..6e06623fa6 100644 --- a/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp +++ b/tests/auto/qml/qmlimportscanner/tst_qmlimportscanner.cpp @@ -55,7 +55,7 @@ private: void TestQmlimportscanner::initTestCase() { QQmlDataTest::initTestCase(); - m_qmlimportscannerPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmlimportscanner"); + m_qmlimportscannerPath = QLibraryInfo::path(QLibraryInfo::BinariesPath) + QLatin1String("/qmlimportscanner"); #ifdef Q_OS_WIN m_qmlimportscannerPath += QLatin1String(".exe"); #endif @@ -121,7 +121,7 @@ void TestQmlimportscanner::runQmlimportscanner(const QString &mode, const QStrin const QString file(pathToScan); QStringList args { mode, file, - "-importPath", QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath), dataDirectory() + "-importPath", QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath), dataDirectory() }; QString errors; QProcess process; diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index 02740e7ecf..74f73d8baf 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -61,7 +61,7 @@ private: void TestQmllint::initTestCase() { QQmlDataTest::initTestCase(); - m_qmllintPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmllint"); + m_qmllintPath = QLibraryInfo::path(QLibraryInfo::BinariesPath) + QLatin1String("/qmllint"); #ifdef Q_OS_WIN m_qmllintPath += QLatin1String(".exe"); #endif @@ -247,7 +247,7 @@ void TestQmllint::cleanQmlCode() QString TestQmllint::runQmllint(const QString &fileToLint, bool shouldSucceed, const QStringList &extraArgs) { - auto qmlImportDir = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + auto qmlImportDir = QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath); QStringList args; args << testFile(fileToLint) << QStringLiteral("-I") << qmlImportDir diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp index 72356a4d84..295f2a31e3 100644 --- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp +++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp @@ -62,7 +62,7 @@ tst_qmlplugindump::tst_qmlplugindump() void tst_qmlplugindump::initTestCase() { QQmlDataTest::initTestCase(); - qmlplugindumpPath = QLibraryInfo::location(QLibraryInfo::BinariesPath); + qmlplugindumpPath = QLibraryInfo::path(QLibraryInfo::BinariesPath); #if defined(Q_OS_WIN) qmlplugindumpPath += QLatin1String("/qmlplugindump.exe"); diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 77d4783f56..c37d2b0990 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -9113,7 +9113,7 @@ void tst_qqmlecmascript::hugeStack() void tst_qqmlecmascript::gcCrashRegressionTest() { - const QString qmljs = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs"; + const QString qmljs = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmljs"; if (!QFile::exists(qmljs)) { QSKIP("Tets requires qmljs"); } diff --git a/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp b/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp index 16b8fe578d..c9fe00a837 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::location(QLibraryInfo::Qml2ImportsPath), QDirIterator::Subdirectories); it.hasNext(); ) { + for (QDirIterator it(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath), 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 03a046db8b..8229b79702 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::location(QLibraryInfo::Qml2ImportsPath) returns bogus path on Android, but its nevertheless unusable."); + QSKIP("QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath) returns bogus path on Android, but its nevertheless unusable."); #endif QStringList expectedImportPaths; QString appDirPath = QCoreApplication::applicationDirPath(); - QString qml2Imports = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + QString qml2Imports = QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath); #ifdef Q_OS_WIN // The drive letter has a different case as QQmlImport will // cause it to be converted after passing through QUrl diff --git a/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp b/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp index 5dd8e9dcc0..0e8cedb20b 100644 --- a/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp +++ b/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp @@ -62,7 +62,7 @@ void tst_QV4Assembler::perfMapFile() #if !defined(Q_OS_LINUX) || defined(Q_OS_ANDROID) QSKIP("perf map files are only generated on linux"); #else - const QString qmljs = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs"; + const QString qmljs = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmljs"; QProcess process; QTemporaryFile infile; diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index 4cec3719e4..dca5c1c3fd 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -167,8 +167,8 @@ void tst_examples::namingConvention(const QDir &d) void tst_examples::namingConvention() { QStringList examplesLocations; - examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qml"); - examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/quick"); + examplesLocations << QLibraryInfo::path(QLibraryInfo::ExamplesPath) + QLatin1String("/qml"); + examplesLocations << QLibraryInfo::path(QLibraryInfo::ExamplesPath) + QLatin1String("/quick"); foreach(const QString &examples, examplesLocations) { QDir d(examples); |