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

Authored by pgomes on Thu, Feb 13, 2:40 PM.

Details

Reviewers
amarok-devel
Group Reviewers
Amarok
Summary

Wikipedia article would enter in the following loop when loading any article:

  1. WikipediaEngine loads article from Wikipedia and format 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 reloadWikipedia(); before it was only reloading the data-schemed URL that was being displayed
  • remove the deprecated "srredirects" parameter from the GET query

Diff Detail

Repository
R181 Amarok
Lint
Lint Skipped
Unit
Unit Tests Skipped
pgomes created this revision.Thu, Feb 13, 2:40 PM
pgomes created this object with edit policy "Administrators".
Restricted Application removed a project: Amarok. · View Herald TranscriptThu, Feb 13, 2:40 PM
Restricted Application added subscribers: amarok-devel, Amarok. · View Herald Transcript
pgomes requested review of this revision.Thu, Feb 13, 2:40 PM
Restricted Application removed a project: Amarok. · View Herald TranscriptFri, Feb 14, 10:05 AM
Restricted Application removed a project: Amarok. · View Herald TranscriptFri, Feb 14, 10:06 AM
Restricted Application removed a project: Amarok. · View Herald TranscriptFri, Feb 14, 10:06 AM