Review Request 117080: cleanup KDirModelTest
Alexander Richardson
arichardson.kde at googlemail.com
Wed Mar 26 16:33:04 UTC 2014
> On March 26, 2014, 1: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
>
> Mark Gaiser wrote:
> 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);
No, this gives a compiler error since &KDirLister::completed is ambiguous, there is KDirLister::completed() and KDirLister::completed(const QUrl&)
- Alexander
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117080/#review54177
-----------------------------------------------------------
On March 26, 2014, 1: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, 1: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/6b417f62/attachment.html>
More information about the Kde-frameworks-devel
mailing list