Keep current scroll position when reloading page
ClosedPublic

Authored by tbaumgart on Mar 18 2018, 11:17 AM.

Details

Summary

I don't have an environment supporting QWebEngine so I need some help
here. Patches and testers welcome.

BUG: 391981
FIXED-IN: 5.0.2

Test Plan

Compile and run with QWebKit and QWebEngine

Diff Detail

Repository
R261 KMyMoney
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tbaumgart requested review of this revision.Mar 18 2018, 11:17 AM
tbaumgart created this revision.

I don't have an environment supporting QWebEngine so I need some help
here. Patches and testers welcome.

QWebEngine >= 5.9 crashes (AFAIK in setHtml) for me very frequently, so I cannot be of any help here.

You can lower QWebEngine requirement to 5.6 as 5.8 is required only for printing capabilities (need to be commented out manually).

kmymoney/views/khomeview_p.h
514

Can't this and setScrollPos be integrated in loadView? It would be shorter and wouldn't need managing m_scrollBarPos.

525

"!= 0" is redundant here.

tbaumgart updated this revision to Diff 35984.Jun 11 2018, 5:56 AM
  • Simplified solution as per review
tbaumgart marked 2 inline comments as done.Jun 11 2018, 5:57 AM
wojnilowicz accepted this revision.Jun 11 2018, 12:50 PM

I didn't test it but it looks good to me.

This revision is now accepted and ready to land.Jun 11 2018, 12:50 PM
This revision was automatically updated to reflect the committed changes.