diff options
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_unix.cpp')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_unix.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 155f7b7aa2..f8102195cc 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE -#if defined(Q_OS_INTEGRITY) || defined(Q_OS_VXWORKS) +#if defined(Q_OS_VXWORKS) static void initThreadPipeFD(int fd) { int ret = fcntl(fd, F_SETFD, FD_CLOEXEC); @@ -87,22 +87,11 @@ static void initThreadPipeFD(int fd) QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate() { - extern Qt::HANDLE qt_application_thread_id; - mainThread = (QThread::currentThreadId() == qt_application_thread_id); bool pipefail = false; // initialize the common parts of the event loop -#if defined(Q_OS_NACL) || defined (Q_OS_BLACKBERRY) +#if defined(Q_OS_NACL) // do nothing. -#elif defined(Q_OS_INTEGRITY) - // INTEGRITY doesn't like a "select" on pipes, so use socketpair instead - if (socketpair(AF_INET, SOCK_STREAM, 0, thread_pipe) == -1) { - perror("QEventDispatcherUNIXPrivate(): Unable to create socket pair"); - pipefail = true; - } else { - initThreadPipeFD(thread_pipe[0]); - initThreadPipeFD(thread_pipe[1]); - } #elif defined(Q_OS_VXWORKS) char name[20]; qsnprintf(name, sizeof(name), "/pipe/qt_%08x", int(taskIdSelf())); @@ -135,7 +124,7 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate() } #endif - if (pipefail) + if (Q_UNLIKELY(pipefail)) qFatal("QEventDispatcherUNIXPrivate(): Can not continue without a thread pipe"); sn_highest = -1; @@ -143,7 +132,7 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate() QEventDispatcherUNIXPrivate::~QEventDispatcherUNIXPrivate() { -#if defined(Q_OS_NACL) || defined (Q_OS_BLACKBERRY) +#if defined(Q_OS_NACL) // do nothing. #elif defined(Q_OS_VXWORKS) close(thread_pipe[0]); |