Review Request 118603: Remove data race on boolean by removing qRegisterMetaType call altogether.

David Faure faure at kde.org
Sat Jun 7 15:12:07 UTC 2014


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

Review request for KDE Frameworks, Kevin Ottens, Michael Pyne, and Stephen Kelly.


Repository: kcoreaddons


Description
-------

Remove data race on boolean by removing qRegisterMetaType call altogether.

Apparently the Q_DECLARE_METATYPE macro is enough to get rid of this runtime warning:
QWARN: KJobTest::testProgressTracking() QSignalSpy::initArgs: Don't know how to handle 'KJob::Unit', use qRegisterMetaType to register it.


Diffs
-----

  src/lib/jobs/kjob.h fb7de853fc306ea938d19aba2729ff7713f9b7bb 
  src/lib/jobs/kjob.cpp 33d894ad7233921dee77ab9d403016421a04978d 
  src/lib/jobs/kjob_p.h c11a4d8ea8f4380ec8bc4da1cd88e1053042c691 

Diff: https://git.reviewboard.kde.org/r/118603/diff/


Testing
-------

This showed up in the first place when starting to write a threaded unittest for kiocore. The first race was on KJobPrivate::_k_kjobUnitEnumRegistered.

I tested that qRegisterMetaType isn't actually necessary anymore in Qt5, using kjobtest, as shown in commit log.


Thanks,

David Faure

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140607/1a613743/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list