D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit R181:2084224e4c30: Fix error of Wikipedia entering in an infinite recursion of page loading (authored by pgomes, committed by heikobecker). REPOSITORY R181 Amarok CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D27371?vs=76299&id=76427 REVISION DETAIL https://phabricator.kde.org/D27371 AFFECTED FILES src/context/applets/wikipedia/package/contents/ui/main.qml src/context/applets/wikipedia/plugin/WikipediaEngine.cpp src/context/applets/wikipedia/plugin/WikipediaEngine.h To: pgomes, #amarok, amarok-devel Cc: heikobecker, #amarok, amarok-devel
D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
pgomes updated this revision to Diff 76299. pgomes added a comment. Editted patch to remove line that was commented out REPOSITORY R181 Amarok CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D27371?vs=75611&id=76299 REVISION DETAIL https://phabricator.kde.org/D27371 AFFECTED FILES src/context/applets/wikipedia/package/contents/ui/main.qml src/context/applets/wikipedia/plugin/WikipediaEngine.cpp src/context/applets/wikipedia/plugin/WikipediaEngine.h To: pgomes, #amarok, amarok-devel Cc: heikobecker, #amarok, amarok-devel
D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
heikobecker added inline comments. INLINE COMMENTS > WikipediaEngine.cpp:496 > query.addQueryItem( QLatin1String("srprop"), QLatin1String("size") ); > -query.addQueryItem( QLatin1String("srredirects"), QString::number(1) ); > +//query.addQueryItem( QLatin1String("srredirects"), QString::number(1) ); > query.addQueryItem( QLatin1String("srlimit"), QString::number(20) ); Any reason we need to keep this as a comment? REPOSITORY R181 Amarok REVISION DETAIL https://phabricator.kde.org/D27371 To: pgomes, #amarok, amarok-devel Cc: heikobecker, #amarok, amarok-devel
D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
pgomes edited the summary of this revision. REPOSITORY R181 Amarok REVISION DETAIL https://phabricator.kde.org/D27371 To: pgomes, #amarok, amarok-devel Cc: #amarok, amarok-devel
D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
pgomes edited the summary of this revision. REPOSITORY R181 Amarok REVISION DETAIL https://phabricator.kde.org/D27371 To: pgomes, #amarok, amarok-devel Cc: #amarok, amarok-devel
D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
pgomes added a project: Amarok. Herald removed a project: Amarok. REPOSITORY R181 Amarok REVISION DETAIL https://phabricator.kde.org/D27371 To: pgomes, #amarok, amarok-devel Cc: #amarok, amarok-devel
D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
pgomes added a project: Amarok. Herald removed a project: Amarok. REPOSITORY R181 Amarok REVISION DETAIL https://phabricator.kde.org/D27371 To: pgomes, #amarok, amarok-devel Cc: #amarok, amarok-devel
D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
pgomes added a project: Amarok. Herald removed a project: Amarok. REPOSITORY R181 Amarok REVISION DETAIL https://phabricator.kde.org/D27371 To: pgomes, #amarok, amarok-devel Cc: #amarok, amarok-devel
D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
pgomes added reviewers: Amarok, amarok-devel. REPOSITORY R181 Amarok REVISION DETAIL https://phabricator.kde.org/D27371 To: pgomes, #amarok, amarok-devel Cc: #amarok, amarok-devel
D27371: Fix error of Wikipedia entering in an infinite recursion of page loading
pgomes created this revision. pgomes created this object with edit policy "Administrators". pgomes added a project: Amarok. Herald added subscribers: amarok-devel, Amarok. Herald removed a project: Amarok. pgomes requested review of this revision. REVISION 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 REPOSITORY R181 Amarok REVISION DETAIL https://phabricator.kde.org/D27371 AFFECTED FILES src/context/applets/wikipedia/package/contents/ui/main.qml src/context/applets/wikipedia/plugin/WikipediaEngine.cpp src/context/applets/wikipedia/plugin/WikipediaEngine.h To: pgomes Cc: #amarok, amarok-devel