diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-11-29 10:59:48 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-02 15:59:58 +0100 |
commit | ad8edac53c65368f7ff269332bd66bd85e2633b4 (patch) | |
tree | 7999854d2784adea00319acaad69a0a38a1baa2f /src/corelib/thread/qthread_win.cpp | |
parent | 613183ff8c101fe544814259197d897b3540bc85 (diff) |
Remove QInternal callbacks and internal functions
After commit 79f675a1e0f628bbc25345ebc1eb1f5809166c6b, the connect and
disconnect callback API effectively becomes useless. Now that these
callbacks cannot/do not, it makes little sense to keep the backdoors
added for Qt Jambi support.
Remove them for now. Should the Qt Jambi team want/need to port to Qt 5,
we can re-add them, possibly designing a better API for doing so as
well.
Change-Id: I6209a1d647d683c979d5294b632b8c12c0f9f91c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r-- | src/corelib/thread/qthread_win.cpp | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index 5b74bad7ef..0c834cfff2 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -101,29 +101,19 @@ QThreadData *QThreadData::current() qt_create_tls(); QThreadData *threadData = reinterpret_cast<QThreadData *>(TlsGetValue(qt_current_thread_data_tls_index)); if (!threadData) { - QThread *adopted = 0; - if (QInternal::activateCallbacks(QInternal::AdoptCurrentThread, (void **) &adopted)) { - Q_ASSERT(adopted); - threadData = QThreadData::get2(adopted); - TlsSetValue(qt_current_thread_data_tls_index, threadData); - adopted->d_func()->running = true; - adopted->d_func()->finished = false; - static_cast<QAdoptedThread *>(adopted)->init(); - } else { - threadData = new QThreadData; - // This needs to be called prior to new AdoptedThread() to - // avoid recursion. - TlsSetValue(qt_current_thread_data_tls_index, threadData); - QT_TRY { - threadData->thread = new QAdoptedThread(threadData); - } QT_CATCH(...) { - TlsSetValue(qt_current_thread_data_tls_index, 0); - threadData->deref(); - threadData = 0; - QT_RETHROW; - } + threadData = new QThreadData; + // This needs to be called prior to new AdoptedThread() to + // avoid recursion. + TlsSetValue(qt_current_thread_data_tls_index, threadData); + QT_TRY { + threadData->thread = new QAdoptedThread(threadData); + } QT_CATCH(...) { + TlsSetValue(qt_current_thread_data_tls_index, 0); threadData->deref(); + threadData = 0; + QT_RETHROW; } + threadData->deref(); threadData->isAdopted = true; threadData->threadId = (Qt::HANDLE)GetCurrentThreadId(); |