Commit 552cb9ae authored by Luigi Toscano's avatar Luigi Toscano

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.
parent 38d64ac3
...@@ -899,12 +899,9 @@ void MainWindow::handbook() ...@@ -899,12 +899,9 @@ void MainWindow::handbook()
{ {
const QString code = MarbleLocale::languageCode(); const QString code = MarbleLocale::languageCode();
QUrl handbookLocation(QLatin1String("https://docs.kde.org/stable/") + code + QLatin1String("/kdeedu/marble/index.html")); // docs.kde.org falls back to the English manual if no translated
// documentation is available for the requested language.
// TODO: this logic seems broken. Should that check "code.isEmpty()" instead? QUrl handbookLocation(QLatin1String("https://docs.kde.org/?application=marble&branch=stable5&language=") + code);
// 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");
if( !QDesktopServices::openUrl( handbookLocation ) ) if( !QDesktopServices::openUrl( handbookLocation ) )
qDebug() << "URL not opened"; qDebug() << "URL not opened";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment