diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2016-01-29 10:42:55 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-01-29 11:22:56 +0000 |
commit | 9dc6f8b47deabdd6e0787ab62694e9fbdd85ef3e (patch) | |
tree | db0c5729aefff16f04472249f6b9c6186bda7a4d /src/libs/utils/runextensions.cpp | |
parent | 1edd6193ba1bdf39c70e071bc267960b6387863e (diff) |
runAsync: Fix issue with deleting thread
deleteLater schedules the event in the current thread, so we
may not use it directly on a thread from within the thread itself...
Instead connect the threads finished signal to its deleteLater slot.
To avoid problems if runAsync is not run from the main thread,
move the thread to the main thread before starting it.
Task-number: QTCREATORBUG-15688
Change-Id: Iea003d00c58d1f921fb0b4ddf9cf67dcb1379833
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/runextensions.cpp')
-rw-r--r-- | src/libs/utils/runextensions.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/libs/utils/runextensions.cpp b/src/libs/utils/runextensions.cpp index 4fff2612a60..69cb3882e85 100644 --- a/src/libs/utils/runextensions.cpp +++ b/src/libs/utils/runextensions.cpp @@ -39,7 +39,6 @@ void RunnableThread::run() m_runnable->run(); if (m_runnable->autoDelete()) delete m_runnable; - deleteLater(); } } // Internal |