diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-13 04:45:22 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-13 04:45:22 (GMT) |
commit | fbacd0fb2eb41470b090a3cbca7535f78689a382 (patch) | |
tree | 4f6ca32958fd9c5c95ae9ca2f599bf56067d2c45 /src/corelib | |
parent | 3e94b3a77affeef80544e48949e018ced4e0d96e (diff) | |
parent | 9f0884773a451a4feef80812e015266bd487dcdc (diff) | |
download | Qt-fbacd0fb2eb41470b090a3cbca7535f78689a382.zip Qt-fbacd0fb2eb41470b090a3cbca7535f78689a382.tar.gz Qt-fbacd0fb2eb41470b090a3cbca7535f78689a382.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (61 commits)
Revert Merge Request 551. This introduces regressions to Qt.
Fixed scroll area size calculation on Mac.
Fix a race where QThread::exit() is "lost" when called after start()
make a partial build of linguist in no-gui config
make the code less of a trap
fix build from top level
Partially revert MR 543 changes to Linguist.
Apply f176759fc41abc4cb901c2cbaa15264f2a9ac85b to stdout too.
Autotest: add some debugging, just in case there's something wrong
Autotest: fix the fix for the rounding error.
Fix compile error with QT_NO_LIBRARY in QtMultimedia
the _setmode() prototype is different on win ce
qdoc: Changed qdoc to output the new doc format.
Doc: update 'developing on mac'
fcntl.h doesn't seem to exist, either - contrary to an example on msdn
Autotest: fix paths on the test server after update.
Force the repaint during a window resize.
fix compile on wince
remove CONFIG += ordered again
Assistant: Check namespace and virtual folder syntax of help projects.
...
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qfeatures.h | 5 | ||||
-rw-r--r-- | src/corelib/global/qfeatures.txt | 9 | ||||
-rw-r--r-- | src/corelib/thread/qthread.cpp | 25 | ||||
-rw-r--r-- | src/corelib/thread/qthread_p.h | 10 | ||||
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 4 |
6 files changed, 58 insertions, 1 deletions
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h index acb3a00..74fa8ee 100644 --- a/src/corelib/global/qfeatures.h +++ b/src/corelib/global/qfeatures.h @@ -335,6 +335,11 @@ #define QT_NO_DATESTRING #endif +// QtDBus module +#if !defined(QT_NO_DBUS) && (defined(QT_NO_PROPERTIES)) +#define QT_NO_DBUS +#endif + // QDial #if !defined(QT_NO_DIAL) && (defined(QT_NO_SLIDER)) #define QT_NO_DIAL diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index 251391e..0053556 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -1360,6 +1360,15 @@ Requires: PROPERTIES Name: ActiveQt SeeAlso: ??? +# D-Bus + +Feature: DBUS +Description: Provides classes for D-Bus. +Section: D-Bus +Requires: PROPERTIES +Name: QtDBus module +SeeAlso: ??? + # Phonon Feature: PHONON_PLATFORMPLUGIN diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index cb84538..c35eb28 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -174,7 +174,7 @@ void QAdoptedThread::run() QThreadPrivate::QThreadPrivate(QThreadData *d) : QObjectPrivate(), running(false), finished(false), terminated(false), - stackSize(0), priority(QThread::InheritPriority), data(d) + stackSize(0), priority(QThread::InheritPriority), data(d), object(0) { #if defined (Q_OS_UNIX) thread_id = 0; @@ -377,6 +377,9 @@ QThread::QThread(QObject *parent) Q_D(QThread); // fprintf(stderr, "QThreadData %p created for thread %p\n", d->data, this); d->data->thread = this; + + d->object = new QThreadPrivateInternalObject; + d->object->moveToThread(this); } /*! \internal @@ -387,6 +390,8 @@ QThread::QThread(QThreadPrivate &dd, QObject *parent) Q_D(QThread); // fprintf(stderr, "QThreadData %p taken from private data for thread %p\n", d->data, this); d->data->thread = this; + + // do not create the internal object for adopted threads } /*! @@ -408,6 +413,9 @@ QThread::~QThread() d->data->thread = 0; } + + delete d->object; + d->object = 0; } /*! @@ -510,6 +518,21 @@ int QThread::exec() void QThread::exit(int returnCode) { Q_D(QThread); + if (d->object) { + QMetaObject::invokeMethod(d->object, "exit", Q_ARG(int, returnCode)); + } else { + QMutexLocker locker(&d->mutex); + d->data->quitNow = true; + for (int i = 0; i < d->data->eventLoops.size(); ++i) { + QEventLoop *eventLoop = d->data->eventLoops.at(i); + eventLoop->exit(returnCode); + } + } +} + +void QThreadPrivateInternalObject::exit(int returnCode) +{ + QThreadPrivate *d = static_cast<QThreadPrivate *>(QObjectPrivate::get(thread())); QMutexLocker locker(&d->mutex); d->data->quitNow = true; for (int i = 0; i < d->data->eventLoops.size(); ++i) { diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 6825718..54ffd80 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -112,6 +112,15 @@ public: }; #ifndef QT_NO_THREAD + +class QThreadPrivateInternalObject : public QObject +{ + Q_OBJECT + +public slots: + void exit(int); +}; + class QThreadPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QThread) @@ -156,6 +165,7 @@ public: bool terminationEnabled, terminatePending; # endif QThreadData *data; + QThreadPrivateInternalObject *object; static void createEventDispatcher(QThreadData *data); }; diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 5a50646..6b34b5f 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -136,6 +136,12 @@ static void create_current_thread_data_key() pthread_key_create(¤t_thread_data_key, destroy_current_thread_data); } +static void destroy_current_thread_data_key() +{ + pthread_key_delete(current_thread_data_key); +} +Q_DESTRUCTOR_FUNCTION(destroy_current_thread_data_key) + QThreadData *QThreadData::current() { pthread_once(¤t_thread_data_once, create_current_thread_data_key); diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 52d2cea..1ef513c 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -42,6 +42,10 @@ #include "qsimd_p.h" #include <QByteArray> +#if defined(Q_OS_WINCE) +#include <windows.h> +#endif + QT_BEGIN_NAMESPACE uint qDetectCPUFeatures() |