D9821: Use QSignalSpy::wait instead of QTest::wait where possible
Milian Wolff
noreply at phabricator.kde.org
Mon Jan 15 09:03:58 UTC 2018
mwolff added inline comments.
INLINE COMMENTS
> dfaure wrote in kdirwatch_unittest.cpp:256
> but then the whole while loop could be removed too, it served the same purpose as what QSignalSpy::wait does.
no, since wait waits for one signal, this loop waits for up to `expected` signals. We could try to leverage `QTRY_COMPARE_WITH_TIMEOUT` but in my quick test that actually also behaves differently. That one apparently sometimes waits *too long*, yielding _more_ signals than expected. I.e. in `touch1000Files` it gives 102 signals and `nestedEventLoop` gives two dirty signals for inotify... The FAM test also fails with this, so I don't think it's a good idea to do it.
Here's my attempt btw: https://paste.kde.org/pcxm8gcwz
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D9821
To: mwolff, dfaure
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180115/db02cb85/attachment.html>
More information about the Kde-frameworks-devel
mailing list