Commit 247d9d73 authored by Rijul Gulati's avatar Rijul Gulati Committed by Nate Graham
Browse files

Fix clicking Help button gives 404 page in browser

Issue: With khelpcenter unavailable, clicking Help button in knetattach opens URL: https://docs.kde.org/stable5/en/kde-workspace/knetattach//knetattach resulting in 404 (Not found) page.

Fix: change help string from `help:/knetattach` to `help:/`.

How it works: at https://invent.kde.org/frameworks/kguiaddons/-/blob/master/src/util/urlhandler.cpp#L48 - the appname is added by default to docpath. With `help:/knetattach` the docpath becomes `knetattach&path=/knetattach` which results in URL: https://docs.kde.org/stable5/en/kde-workspace/knetattach//knetattach.

Removing `/knetattach` from `help:/knetattach` makes final URL as: https://docs.kde.org/stable5/en/kde-workspace/knetattach// (Notice the additional `/` at the end coming from `help:/`). This works for both browser URL as well as khelpcenter.

BUG: 425321
parent 6f7c69b9
......@@ -82,7 +82,7 @@ void KNetAttach::slotPageChanged( int )
void KNetAttach::slotHelpClicked()
{
QDesktopServices::openUrl(QUrl(QStringLiteral("help:/knetattach")));
QDesktopServices::openUrl(QUrl(QStringLiteral("help:/")));
}
void KNetAttach::setInformationText( const QString &type )
......
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