Use single-argument constructor of WebEngineViewer::WebEnginePage
ClosedPublic

Authored by marten on Mar 18 2019, 2:25 PM.

Details

Summary

The two-argument constructor for that, where a QWebEngineProfile is provided, was deprecated by D19559. This changes ArticleViewerWebEngine to use the single-argument constructor, which creates a private profile and handles the management of it.

Test Plan

Built Akregator with this change, observed correct viewing and opening of articles in tabs and inline.

Diff Detail

Repository
R201 Akregator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
marten created this revision.Mar 18 2019, 2:25 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptMar 18 2019, 2:25 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
marten requested review of this revision.Mar 18 2019, 2:25 PM
mlaurent requested changes to this revision.Mar 20 2019, 6:51 AM
mlaurent added a subscriber: mlaurent.
mlaurent added inline comments.
src/articleviewer-ng/webengine/articleviewerwebenginepage.h
31

Why virtual ? we have override for it no ?

This revision now requires changes to proceed.Mar 20 2019, 6:51 AM
marten added inline comments.Mar 20 2019, 12:51 PM
src/articleviewer-ng/webengine/articleviewerwebenginepage.h
31

Not sure if there is an explicit KDE or PIM coding standard for this, but I'd always believed that it was good programming practice for any class with virtual functions or anything derived from one (i.e. any class derived from QObject) to have a virtual destructor. Yes, the destructor is automatically virtual anyway (because QObject's is), but it changes nothing and makes the intention clear if the derived class destructor is marked as explicitly virtual. However, if the preferred standard now is to use override and not virtual, then I'm happy to adopt that.

As we use override we don't need it.
I removed all virtual keyword when when it was not necessary in kde*

marten updated this revision to Diff 54756.Mon, Mar 25, 9:10 AM

No need to declare destructor as virtual

marten marked 2 inline comments as done.Mon, Mar 25, 9:10 AM
mlaurent accepted this revision.Tue, Mar 26, 5:59 AM
This revision is now accepted and ready to land.Tue, Mar 26, 5:59 AM
This revision was automatically updated to reflect the committed changes.