Don't use QMutexPool in QEventDispatcher

Use a QBasicMutex, there is no extra cost of having a mutex for this.

Change-Id: Ib5b01338649002c0c21f018b2c931a8cc68027f6
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
Olivier Goffart 2012-03-02 15:39:50 +01:00 committed by Qt by Nokia
parent 1e6514a714
commit 8bf6d6a6ca

View File

@ -42,7 +42,6 @@
#include "qeventdispatcher_glib_p.h"
#include "qeventdispatcher_unix_p.h"
#include <private/qmutexpool_p.h>
#include <private/qthread_p.h>
#include "qcoreapplication.h"
@ -295,8 +294,8 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
: mainContext(context)
{
if (qgetenv("QT_NO_THREADED_GLIB").isEmpty()) {
static int dummyValue = 0; // only used for its address
QMutexLocker locker(QMutexPool::instance()->get(&dummyValue));
static QBasicMutex mutex;
QMutexLocker locker(&mutex);
if (!g_thread_supported())
g_thread_init(NULL);
}