Review Request: Automatic AdBlock filter list updates in Konqueror

Thomas Fischer fischer at unix-ag.uni-kl.de
Sat Jan 23 21:01:37 GMT 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2265/
-----------------------------------------------------------

(Updated 2010-01-23 21:01:37.217615)


Review request for kdelibs.


Changes
-------

Changes in patch adblock-20091227.patch, uploaded 2010-01-23:

> Just a thought: wouldn't it be simpler to use one (nested) KConfigGroup
> per value of i? Then the keys would stay constant. No big deal though.
Keeping current implementation for now...

> KConfig supports bools, you can remove the ?"true":"false" bit.
Fixed.

> To remove a local file, use QFile::remove().
Fixed.

> Please use KIO::get instead of NetAccess::download. Which means moving
> the rest of the code to a slot, but I guess that's not a big problem here.
Actually, that is a problem, as does not use any slots so far, does not inherit from QObject etc. Would require more extensive changes. Is changing to KIO::get really worth the effort?

> Nice (but obviously not for 4.4 due to the feature freeze, it will have to be for 4.5)
Of course. :-)

> NULL is the default value for toInt(), no need to write it explicitely.
Fixed.

> use !line.isEmpty() rather than comparing with the null string.
Fixed.

> since line is not empty here, it might be simpler and faster to just have a local 
> const QChar firstChar = line.at(0);
> and compare that with all these chars.
Fixed.


Summary
-------

This is the patch from bug report 143495 slightly rewritten to fit KDE trunk (though not compiled as I am lacking Qt 4.6). The original patch was written for 4.2.4, later updated for 4.3.1. Please refer to the bug report in bugs.kde.org for a small history of this patch set.
I wrote a blog entry explaining the background of this patch, too: http://blog.t-fischer.net/2009/08/05/automatic-adblock-filter-list-updates-in-konqueror/


Diffs (updated)
-----

  /trunk/KDE/kdebase/apps/konqueror/settings/konqhtml/filteropts.cpp 1066357 
  /trunk/KDE/kdelibs/khtml/khtml_settings.cpp 1066280 
  /trunk/KDE/kdebase/apps/konqueror/settings/konqhtml/filteropts.h 1066357 

Diff: http://reviewboard.kde.org/r/2265/diff


Testing
-------


Thanks,

Thomas





More information about the kde-core-devel mailing list