summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-16 03:50:31 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-16 03:50:31 (GMT)
commitac0fc4e9b0ed314e7d49e8dc0e9ded0922aab8e9 (patch)
tree58eb9feaa85fb02c3c15980f58964b112ca9d02d /src/corelib
parent140a96d0b860b045c18d53c1ac96e77b3893d31c (diff)
parent551d704cdafae46cdccc6217bb7f36da7e84be2d (diff)
downloadQt-ac0fc4e9b0ed314e7d49e8dc0e9ded0922aab8e9.zip
Qt-ac0fc4e9b0ed314e7d49e8dc0e9ded0922aab8e9.tar.gz
Qt-ac0fc4e9b0ed314e7d49e8dc0e9ded0922aab8e9.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: (34 commits) Fix duplicate project entry in visual studio solution file. Doc qdoc: Added the index and fixed images in the extra files list. Speed up qsTr() by caching the translation context Crash while printing from the portedcanvas example on Mac Cocoa. qdoc: Fixed .qdocconf files for assistant. Disable debug-only framework builds on Mac. Compile (with -no-pch) Add missing QT_NO_BEARERMANAGEMENT ifdefs. Introduce a qconfig feature for Bearer Management Fix MOBILITY-404 Remove holes in bearer management data structures. Don't link bearer plugins against QtGui unnecessarily. Added missing newline after warning message when using -L with qml Doc: updating scripts Fixed a crash on embedded due to uninitialized pointer. Fix a race where QThread::exit() is "lost" when called after start() qdoc: Removed all <table> attributes in favor of using css. Autotest failure: dialogModality test fails on cocoa (macgui) Force the bic test to compile in 32-bit mode on Mac ...
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qfeatures.h5
-rw-r--r--src/corelib/global/qfeatures.txt8
-rw-r--r--src/corelib/thread/qthread.cpp31
-rw-r--r--src/corelib/thread/qthread_p.h9
-rw-r--r--src/corelib/thread/qthread_unix.cpp2
-rw-r--r--src/corelib/thread/qthread_win.cpp2
6 files changed, 19 insertions, 38 deletions
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index 74fa8ee..c66047a 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -505,6 +505,11 @@
#define QT_NO_XMLSTREAMWRITER
#endif
+// Bearer Management
+#if !defined(QT_NO_BEARERMANAGEMENT) && (defined(QT_NO_LIBRARY))
+#define QT_NO_BEARERMANAGEMENT
+#endif
+
// Context menu
#if !defined(QT_NO_CONTEXTMENU) && (defined(QT_NO_MENU))
#define QT_NO_CONTEXTMENU
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 0053556..ed173b1 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -1098,6 +1098,14 @@ Requires: TEMPORARYFILE
Name: QNetworkDiskCache
SeeAlso: ???
+Feature: BEARERMANAGEMENT
+Description: Provides bearer management support
+Section: Networking
+Requires: LIBRARY
+Name: Bearer Management
+SeeAlso: ???
+
+
# Utilities
Feature: COMPLETER
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index c35eb28..cdcb65c 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), object(0)
+ stackSize(0), priority(QThread::InheritPriority), data(d)
{
#if defined (Q_OS_UNIX)
thread_id = 0;
@@ -377,9 +377,6 @@ 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
@@ -390,8 +387,6 @@ 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
}
/*!
@@ -413,9 +408,6 @@ QThread::~QThread()
d->data->thread = 0;
}
-
- delete d->object;
- d->object = 0;
}
/*!
@@ -488,11 +480,11 @@ uint QThread::stackSize() const
int QThread::exec()
{
Q_D(QThread);
- QMutexLocker locker(&d->mutex);
- d->data->quitNow = false;
QEventLoop eventLoop;
- locker.unlock();
int returnCode = eventLoop.exec();
+
+ QMutexLocker locker(&d->mutex);
+ d->data->quitNow = false;
return returnCode;
}
@@ -518,21 +510,6 @@ 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 54ffd80..44eb8f8 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -113,14 +113,6 @@ public:
#ifndef QT_NO_THREAD
-class QThreadPrivateInternalObject : public QObject
-{
- Q_OBJECT
-
-public slots:
- void exit(int);
-};
-
class QThreadPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QThread)
@@ -165,7 +157,6 @@ 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 6b34b5f..bd31d9c 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -253,7 +253,6 @@ void *QThreadPrivate::start(void *arg)
pthread_setspecific(current_thread_data_key, data);
data->ref();
- data->quitNow = false;
// ### TODO: allow the user to create a custom event dispatcher
createEventDispatcher(data);
@@ -495,6 +494,7 @@ void QThread::start(Priority priority)
d->running = true;
d->finished = false;
d->terminated = false;
+ d->data->quitNow = false;
pthread_attr_t attr;
pthread_attr_init(&attr);
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 37d5b87..9826dcb 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -298,7 +298,6 @@ unsigned int __stdcall QThreadPrivate::start(void *arg)
QThread::setTerminationEnabled(false);
- data->quitNow = false;
// ### TODO: allow the user to create a custom event dispatcher
createEventDispatcher(data);
@@ -405,6 +404,7 @@ void QThread::start(Priority priority)
d->running = true;
d->finished = false;
d->terminated = false;
+ d->data->quitNow = false;
/*
NOTE: we create the thread in the suspended state, set the