Unify reloading methods in reKonq

Review Request #102481 - Created Aug. 29, 2011 and submitted

Information
David Narváez
rekonq
master
Reviewers
rekonq
There are currently two families of methods handling reloads: one that uses QWebView's reload method and one that does more sophisticated handling of the about: scheme. This, apart from being an issue on its own, produces a bug where reloading a tab from the Reload Tab and Reload All Tabs tab context menu items cannot reload failed web pages while reloading it from the Reload button in the toolbar can.

The proposed patch modifies all 3 reloading methods (including one slot) by adding a webReload(WebTab *) slot that will ultimately handle all reloads, and modifying the workflow of the other 3 methods in the following way:

- webReload() -> webReload(WebTab *)
- reloadTab(int) -> webReload(WebTab *)
- reloadAllTabs() -> reloadTab(int) -> webReload(WebTab *)
To reproduced the bug mentioned above:

1. Disconnect from the internet (I disable networking in my laptop), open rekonq, open 3 tabs and access any web page in those three tabs until you have all three tabs displaying error pages (Host Not Found).
2. Reconnect, and right click any tab, then do Reload Tab and Reload All Tabs, nothing should happen
3. Go to any tab and click the Reload button from the toolbar, you should be able to reload the web page

After applying the patch, you should be able to reload any tab from the tab context menu or from the toolbar, and also reloading all failed tabs from the Reload All Tabs item in the tab context menu.
Andrea Diamantini
David Narváez
Review request changed

Change Summary:

Hi Andrea, I updated my sources with your patch and had a compilation problem with the webTab variable in line 232. I updated the patch with a fix for that, how is it looking?

Diff:

Revision 2 (+12 -12)

Show changes

Andrea Diamantini
oops... it obviously need fixes in src/mainview.cpp +232. Sorry :(
  1. Right, the latest version includes that fix. Are we good with this patch? I can commit if we all agree.
Andrea Diamantini
Seems perfect! Please, go ahead :)
Commit Hook
This review has been submitted with commit 4e02e4f951ee5b7b17a53b52abe5b7b77a807766 by David E. Narváez to branch master.
Loading...