Akregator feed detector plugin: Port away from KDELibs4Support
ClosedPublic

Authored by marten on Apr 30 2018, 4:28 PM.

Details

Summary

This change ports the classes KUrl -> QUrl, kDebug -> qDebug, with their corresponding include files. The plugin now builds without KDElibs4Support.

Test Plan

Built konqueror with these changes. Checked correct detection of feeds on a variety of websites, and the correct resolution of the feed URL passed to Akregator.

Diff Detail

Repository
R226 Konqueror
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
marten requested review of this revision.Apr 30 2018, 4:28 PM
marten created this revision.

Just drop qDebug at all. It's better to categorized debug messages but here it's not needed.

marten updated this revision to Diff 33479.May 2 2018, 10:35 AM

Some of the debugging is useful so I have left it in, but converted it to qCDebug and tidied up the messages.

apol added a subscriber: apol.May 2 2018, 1:28 PM

LGTM overall +1

plugins/akregator/CMakeLists.txt
7

Can this commented code be removed?

marten added inline comments.May 2 2018, 3:27 PM
plugins/akregator/CMakeLists.txt
7

Without affecting the current state of things certainly, but it refers to a popupmenu plugin which, according to the message above, was removed at KF5 porting time with the hope of it being reimplemented later. So, unless it is absolutely impossible to implement post KDE4 and there are no plans to port it, maybe the commented out code should be retained as a reminder.

dfaure accepted this revision as: dfaure.May 11 2018, 6:31 PM
dfaure added a subscriber: dfaure.

Found stuff on the way, but the commit itself is fine.

plugins/akregator/CMakeLists.txt
15

Installing a categories file as well (like e.g. kbookmarks/kbookmarks.categories, or many others) would make that logging category available in kdebugsettings.

plugins/akregator/pluginbase.cpp
33–34

(pre-existing) this includes all of QtCore as well... better use more specific includes

80–81

(pre-existing) prepend modifies the string, so "s2 = " is redundant

82–83

(pre-existing) technically a fragment could remain too, here....

94

(pre-existing) the two .url() calls should be removed. This is especially important in case a password ends up in the URL (we don't want it printed out in the debug output).

plugins/akregator/pluginbase.h
46

(pre-existing) could be static

This revision is now accepted and ready to land.May 11 2018, 6:31 PM
marten marked 5 inline comments as done.May 12 2018, 4:40 PM
marten added inline comments.
plugins/akregator/CMakeLists.txt
15

Will include in commit.

plugins/akregator/pluginbase.cpp
33–34

Will include in commit.

80–81

Will include in commit.

82–83

Will include in commit: can use baseurl.adjusted(QUrl::RemovePath|QUrl::RemoveQuery|QUrl::RemoveFragment)

94

Will include in commit.

plugins/akregator/pluginbase.h
46

Will implement in a separate commit, along with renaming some classes and source files to more descriptive names and making PluginBase a namespace - it doesn't need to be a class and therefore no need for multiple inheritance.

This revision was automatically updated to reflect the committed changes.
marten marked 5 inline comments as done.