Use single-argument constructor of WebEngineViewer::WebEnginePage

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



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

R201 Akregator
Automatic diff as part of commit; lint not applicable.
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.

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

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.Mar 25 2019, 9:10 AM

No need to declare destructor as virtual

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