Fix error of Wikipedia entering in an infinite recursion of page loading

Authored by pgomes on Feb 25 2020, 9:38 PM.

Description

Fix error of Wikipedia entering in an infinite recursion of page loading

Summary:
Wikipedia applet enters in the following loop when loading any article:

  1. WikipediaEngine loads article from Wikipedia and formats it
  2. communicate page is ready to QML with PageChanged signal
  3. QML script loads html via content.loadHtml; this triggers a naviagateRequest signal
  4. same QML script captures the signal, and evokes WikipediaEngine.setUrl (passing a data-scheme URL), restarting the loop

The patch does the following

  • fix the loop by only handling naviagateRequest signals that were caused by clicking in a link (LinkClickedNavigation). The one that was causing the issue (signaled by loadHtml) is TypedNavigation
  • click to reload button invokes WikipediaEngine.reloadWikipedia(); before it was only reloading the data-schemed URL that was being displayed
  • remove the deprecated "srredirects" parameter from the GET query

Reviewers: Amarok, amarok-devel

Subscribers: heikobecker, Amarok, amarok-devel

Differential Revision: https://phabricator.kde.org/D27371