Review Request 117080: cleanup KDirModelTest

Mark Gaiser markg85 at gmail.com
Wed Mar 26 13:47:07 UTC 2014



> On March 26, 2014, 12:39 p.m., Mark Gaiser wrote:
> > autotests/kdirmodeltest.cpp, lines 55-56
> > <https://git.reviewboard.kde.org/r/117080/diff/1/?file=257310#file257310line55>
> >
> >     Do you really have to make defines for those signals? Sure, it looks fancy in the connect lines, but i personally prefer just &KDirLister::completed and &KDirLister::canceled.
> >     
> >     Perhaps others think differently?
> 
> Alexander Richardson wrote:
>     Don't like #define much personally either, but that static_cast is quite ugly if we have it everywhere

Ehh.. I don't see why you need to cast?
Sorry for my ignorance :)
I know there was something with those signals, but i can't quite remember what it was.

This should just work, right?:
disconnect(dirLister, &KDirLister::completed, this, &KDirModelTest::slotListingCompleted);


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117080/#review54177
-----------------------------------------------------------


On March 26, 2014, 12:13 p.m., Alexander Richardson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117080/
> -----------------------------------------------------------
> 
> (Updated March 26, 2014, 12:13 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> Use Qt5 new signal slot syntax for KDirModelTest
> 
> This allows removing #define connect(...) QVERIFY(QObject::connect(...)),
> since now the connections are checked at compile time.
> Also removed all disconnect calls at the end of a test, now this is done
> in cleanup() which is automatically called after each test case
> 
> Always use QTestEventLoop (as is the case now already)
> 
> This merely removes the #define and #ifdefs for it
> 
> 
> Diffs
> -----
> 
>   autotests/kdirmodeltest.h b8b41ec52a61a083c6c76e9184a556835551443e 
>   autotests/kdirmodeltest.cpp 5d59eba45495de30db5e70da2e80bb3d5cba424c 
> 
> Diff: https://git.reviewboard.kde.org/r/117080/diff/
> 
> 
> Testing
> -------
> 
> Test still passes (except for testFontUrlWithHost, but that has always timed out for me)
> 
> 
> Thanks,
> 
> Alexander Richardson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140326/00aa25ca/attachment.html>


More information about the Kde-frameworks-devel mailing list