Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
4.7.2
-
None
-
Maemo, Scratchbox, i486 target
Description
Installing a QTranslator from within a worker thread by QCoreApplication::instance()->installTranslator(translator); fails with the following error:
"ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread bfea5990. Receiver '' (of type 'QCoreApplication') was created in thread 9ffb448", file kernel/qcoreapplication.cpp, line 415"
The problem root cause is likely using sendEvent which assumes the same thread (whereas postEvent would not?) - a possible fix might be as easy as QCoreApplication sending this particular signal through message queue instead of direct connection.
This translator is installed deep within a middleware component of which processing we want to move into another thread due to performance reasons. Another potential fix would be changing the middleware component, which would would potentially cause changes in several layers.
Attached a sample project code for easy repetition of the error.
Attachments
Issue Links
- is duplicated by
-
QTBUG-57095 Crash in QCoreApplication::translate() function
- Closed