diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-03-25 14:03:09 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-03-26 09:40:29 +0100 |
commit | ba3415e0bd602ef1aacd856061311d7f93f5a7de (patch) | |
tree | 07abe85b856e52e098f8e1a19a9ce84f249e8df7 /examples/assistant | |
parent | 21692d3b181be15c7e8859302f2274c9dd7150e3 (diff) | |
download | qttools-ba3415e0bd602ef1aacd856061311d7f93f5a7de.tar.gz |
Don't use deprecated QLibrary::location
Use QLibrary::path instead to silence compiler warnings.
Change-Id: Ib39ab1528f6060ae37dddfaf6b69e420c37bcd35
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'examples/assistant')
-rw-r--r-- | examples/assistant/remotecontrol/remotecontrol.cpp | 2 | ||||
-rw-r--r-- | examples/assistant/simpletextviewer/assistant.cpp | 4 | ||||
-rw-r--r-- | examples/assistant/simpletextviewer/mainwindow.cpp | 2 |
3 files changed, 4 insertions, 4 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); |