From 552cb9ae1f34482d1ec56532a703e0d820856286 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Sun, 5 Jul 2020 15:21:01 +0200 Subject: [PATCH] Fix the reference to docs.kde.org from marble-qt - use the canonical URL (with variables, without namespace); - let the website handle the fallback to the English language if no translated documentation is found. The existing logic did not work anyway. --- src/apps/marble-qt/QtMainWindow.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/apps/marble-qt/QtMainWindow.cpp b/src/apps/marble-qt/QtMainWindow.cpp index e3b8fe7e7..b13674364 100644 --- a/src/apps/marble-qt/QtMainWindow.cpp +++ b/src/apps/marble-qt/QtMainWindow.cpp @@ -899,12 +899,9 @@ void MainWindow::handbook() { const QString code = MarbleLocale::languageCode(); - QUrl handbookLocation(QLatin1String("https://docs.kde.org/stable/") + code + QLatin1String("/kdeedu/marble/index.html")); - - // TODO: this logic seems broken. Should that check "code.isEmpty()" instead? - // and how do we know there is a doc for the code? - if ( handbookLocation.isEmpty() ) - handbookLocation = QUrl("https://docs.kde.org/stable/en/kdeedu/marble/index.html"); + // docs.kde.org falls back to the English manual if no translated + // documentation is available for the requested language. + QUrl handbookLocation(QLatin1String("https://docs.kde.org/?application=marble&branch=stable5&language=") + code); if( !QDesktopServices::openUrl( handbookLocation ) ) qDebug() << "URL not opened"; -- GitLab