summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-03-25 14:03:09 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-03-26 09:40:29 +0100
commitba3415e0bd602ef1aacd856061311d7f93f5a7de (patch)
tree07abe85b856e52e098f8e1a19a9ce84f249e8df7
parent21692d3b181be15c7e8859302f2274c9dd7150e3 (diff)
Don't use deprecated QLibrary::location
Use QLibrary::path instead to silence compiler warnings. Change-Id: Ib39ab1528f6060ae37dddfaf6b69e420c37bcd35 Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--examples/assistant/remotecontrol/remotecontrol.cpp2
-rw-r--r--examples/assistant/simpletextviewer/assistant.cpp4
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.cpp2
-rw-r--r--examples/help/contextsensitivehelp/helpbrowser.cpp2
-rw-r--r--tests/auto/windeployqt/tst_windeployqt.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/examples/assistant/remotecontrol/remotecontrol.cpp b/examples/assistant/remotecontrol/remotecontrol.cpp
index 916a08efd..7f9a39b62 100644
--- a/examples/assistant/remotecontrol/remotecontrol.cpp
+++ b/examples/assistant/remotecontrol/remotecontrol.cpp
@@ -98,7 +98,7 @@ void RemoteControl::on_launchButton_clicked()
if (process->state() == QProcess::Running)
return;
- QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
+ QString app = QLibraryInfo::path(QLibraryInfo::BinariesPath) + QDir::separator();
#if !defined(Q_OS_MAC)
app += QLatin1String("assistant");
#else
diff --git a/examples/assistant/simpletextviewer/assistant.cpp b/examples/assistant/simpletextviewer/assistant.cpp
index d222bda6e..a07b4cf49 100644
--- a/examples/assistant/simpletextviewer/assistant.cpp
+++ b/examples/assistant/simpletextviewer/assistant.cpp
@@ -89,7 +89,7 @@ QString documentationDirectory()
#ifdef SRCDIR
paths.append(QLatin1String(SRCDIR));
#endif
- paths.append(QLibraryInfo::location(QLibraryInfo::ExamplesPath));
+ paths.append(QLibraryInfo::path(QLibraryInfo::ExamplesPath));
paths.append(QCoreApplication::applicationDirPath());
paths.append(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation));
for (const auto &dir : qAsConst(paths)) {
@@ -112,7 +112,7 @@ bool Assistant::startAssistant()
}
if (m_process->state() != QProcess::Running) {
- QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
+ QString app = QLibraryInfo::path(QLibraryInfo::BinariesPath) + QDir::separator();
#ifndef Q_OS_DARWIN
app += QLatin1String("assistant");
#else
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
index f70162c21..37ae6c041 100644
--- a/examples/assistant/simpletextviewer/mainwindow.cpp
+++ b/examples/assistant/simpletextviewer/mainwindow.cpp
@@ -66,7 +66,7 @@ MainWindow::MainWindow()
assistant = new Assistant;
// ![0]
textViewer = new TextEdit;
- textViewer->setContents(QLibraryInfo::location(QLibraryInfo::ExamplesPath)
+ textViewer->setContents(QLibraryInfo::path(QLibraryInfo::ExamplesPath)
+ QLatin1String("/assistant/simpletextviewer/documentation/intro.html"));
setCentralWidget(textViewer);
diff --git a/examples/help/contextsensitivehelp/helpbrowser.cpp b/examples/help/contextsensitivehelp/helpbrowser.cpp
index f0cc4a1d7..4ff4b5c98 100644
--- a/examples/help/contextsensitivehelp/helpbrowser.cpp
+++ b/examples/help/contextsensitivehelp/helpbrowser.cpp
@@ -58,7 +58,7 @@
HelpBrowser::HelpBrowser(QWidget *parent)
: QTextBrowser(parent)
{
- QString collectionFile = QLibraryInfo::location(QLibraryInfo::ExamplesPath)
+ QString collectionFile = QLibraryInfo::path(QLibraryInfo::ExamplesPath)
+ QLatin1String("/help/contextsensitivehelp/docs/wateringmachine.qhc");
m_helpEngine = new QHelpEngineCore(collectionFile, this);
diff --git a/tests/auto/windeployqt/tst_windeployqt.cpp b/tests/auto/windeployqt/tst_windeployqt.cpp
index 04aece287..38403c90f 100644
--- a/tests/auto/windeployqt/tst_windeployqt.cpp
+++ b/tests/auto/windeployqt/tst_windeployqt.cpp
@@ -146,7 +146,7 @@ void tst_windeployqt::deploy()
qPrintable(errorMessage));
// Create environment with Qt and all "lib" paths removed.
- const QString qtBinDir = QDir::toNativeSeparators(QLibraryInfo::location(QLibraryInfo::BinariesPath));
+ const QString qtBinDir = QDir::toNativeSeparators(QLibraryInfo::path(QLibraryInfo::BinariesPath));
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
const QString pathKey = QLatin1String("PATH");
const QChar pathSeparator(QLatin1Char(';')); // ### fixme: Qt 5.6: QDir::listSeparator()