Review Request: Automatic AdBlock filter list updates in Konqueror

David Faure faure at kde.org
Sun Jan 24 21:41:30 GMT 2010


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



/trunk/KDE/kdelibs/khtml/khtml_settings.cpp
<http://reviewboard.kde.org/r/2265/#comment3247>

    No, use KStandardDirs::locateLocal("data", "khtml/" + localFile) instead.
    



/trunk/KDE/kdelibs/khtml/khtml_settings.cpp
<http://reviewboard.kde.org/r/2265/#comment3246>

    Alternative: job->setProperty("khtmlsettings_adBlock_filename", localFile). 
    Storing the information inside the job -> no QMap needed.



/trunk/KDE/kdelibs/khtml/khtml_settings.cpp
<http://reviewboard.kde.org/r/2265/#comment3242>

    You could use KIO::storedGet() instead of KIO::get(), then you wouldn't need the data slot at all.



/trunk/KDE/kdelibs/khtml/khtml_settings.cpp
<http://reviewboard.kde.org/r/2265/#comment3243>

    In kde4, adding .prettyUrl() in kDebug statements isn't necessary; kDebug takes care of it (rather the operator QDebug for KUrl).



/trunk/KDE/kdelibs/khtml/khtml_settings.cpp
<http://reviewboard.kde.org/r/2265/#comment3244>

    This open() and this write() should be checked; the file could be non-writable (permission problems), and the write could fail (disk full).



/trunk/KDE/kdelibs/khtml/khtml_settings.cpp
<http://reviewboard.kde.org/r/2265/#comment3245>

    using QByteArray by value rather than by pointer would avoid this and is generally preferred, but anyway, with storedGet() you'll be able to get rid of m_adblockFilterLists altogether.


- David


On 2010-01-24 21:25:29, Thomas Fischer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2265/
> -----------------------------------------------------------
> 
> (Updated 2010-01-24 21:25:29)
> 
> 
> Review request for kdelibs.
> 
> 
> 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
> -----
> 
>   /trunk/KDE/kdebase/apps/konqueror/settings/konqhtml/filteropts.h 1079192 
>   /trunk/KDE/kdebase/apps/konqueror/settings/konqhtml/filteropts.cpp 1079192 
>   /trunk/KDE/kdelibs/khtml/khtml_settings.h 1079192 
>   /trunk/KDE/kdelibs/khtml/khtml_settings.cpp 1079192 
> 
> Diff: http://reviewboard.kde.org/r/2265/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Thomas
> 
>





More information about the kde-core-devel mailing list