[Kde-pim] libkleo moveToThread issues

Marc Mutz marc.mutz at kdab.com
Thu Jan 3 18:30:10 GMT 2013


On Saturday December 29 2012, Kevin Krammer wrote:
> Hi,
>
> I am trying to tackle some of the deprecation warning in KDEPIM.
>
> One of those is about usage of a Kleo::VerifyDetachedJob::start().
> There is a non-deprecated overload taking signature and signed data as
> shared pointers to QIODevices instead of QByteArray.
>
> I tried porting the unit test first, but while it builds fine it now
> throughs tons of warnings about moveToThread failing:
>
> QWARN  : VerifyTest::testParallelVerifyAndKeyListJobs()
> QObject::moveToThread: Current thread (0x21011a0) is not the object's
> thread (0x215b068). Cannot move to target thread (0x7f0f50000a68)

The code seems to be correct (not checking the latest, since I don't have a 
checkout). In ThreadedJobMixin::run(), we move the QIODevices, being 
QObjects, over to the new thread, and in static verify_detached(), executed 
in said thread, the ToThreadMover RAII class dtor moves them back to the 
originating thread, passed as an argument. Both of these are push operations, 
so should be fine.

Can you find out which of the two sides is causing the message?

My guess would be that the QIODevices are created in another thread than the 
one that calls VerifyDetachedJob::start().

> See https://git.reviewboard.kde.org/r/108004/ for the respective changes.
>
> Any idea?
> Is anything wrong with the ported code?
> Is the non-deprecated variant of start() not supported, buggy or just very
> noisy?
>
> Cheers,
> Kevin



-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list