summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-22 11:04:19 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-22 11:04:19 (GMT)
commit5e72b9fb3aae520a690c73bba2eb61d6614a1510 (patch)
treee1421a2d73988cce6d258a879e5fc537da8c44ad
parenta351dc70bcd6e78dad2bf0cada0c9e431f3bdd7d (diff)
parent87911c6c97b11bd7d10a38698460174b6cadfbe8 (diff)
downloadQt-5e72b9fb3aae520a690c73bba2eb61d6614a1510.zip
Qt-5e72b9fb3aae520a690c73bba2eb61d6614a1510.tar.gz
Qt-5e72b9fb3aae520a690c73bba2eb61d6614a1510.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-animations
-rw-r--r--src/corelib/kernel/qobject.cpp7
-rw-r--r--src/corelib/thread/qmutexpool.cpp14
-rw-r--r--src/corelib/thread/qmutexpool_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp5
-rw-r--r--tools/qdoc3/test/classic.css3
5 files changed, 13 insertions, 20 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index cfd8493..1e9e284 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -92,8 +92,8 @@ static int *queuedConnectionTypes(const QList<QByteArray> &typeNames)
return types;
}
-QBasicAtomicPointer<QMutexPool> signalSlotMutexes = Q_BASIC_ATOMIC_INITIALIZER(0);
-QBasicAtomicInt objectCount = Q_BASIC_ATOMIC_INITIALIZER(0);
+static QBasicAtomicPointer<QMutexPool> signalSlotMutexes = Q_BASIC_ATOMIC_INITIALIZER(0);
+static QBasicAtomicInt objectCount = Q_BASIC_ATOMIC_INITIALIZER(0);
/** \internal
* mutex to be locked when accessing the connectionlists or the senders list
@@ -117,8 +117,7 @@ extern "C" Q_CORE_EXPORT void qt_addObject(QObject *)
extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *)
{
if(!objectCount.deref()) {
- QMutexPool *old = signalSlotMutexes;
- signalSlotMutexes.testAndSetAcquire(old, 0);
+ QMutexPool *old = signalSlotMutexes.fetchAndStoreAcquire(0);
delete old;
}
}
diff --git a/src/corelib/thread/qmutexpool.cpp b/src/corelib/thread/qmutexpool.cpp
index 96a9940..77a3cca 100644
--- a/src/corelib/thread/qmutexpool.cpp
+++ b/src/corelib/thread/qmutexpool.cpp
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
// qt_global_mutexpool is here for backwards compatability only,
// use QMutexpool::instance() in new clode.
Q_CORE_EXPORT QMutexPool *qt_global_mutexpool = 0;
-Q_GLOBAL_STATIC_WITH_ARGS(QMutexPool, globalMutexPool, (true))
+Q_GLOBAL_STATIC_WITH_ARGS(QMutexPool, globalMutexPool, (QMutex::Recursive))
/*!
\class QMutexPool
@@ -88,15 +88,15 @@ Q_GLOBAL_STATIC_WITH_ARGS(QMutexPool, globalMutexPool, (true))
*/
/*!
- Constructs a QMutexPool, reserving space for \a size QMutexes. If
- \a recursive is true, all QMutexes in the pool will be recursive
- mutexes; otherwise they will all be non-recursive (the default).
+ Constructs a QMutexPool, reserving space for \a size QMutexes. All
+ mutexes in the pool are created with \a recursionMode. By default,
+ all mutexes are non-recursive.
The QMutexes are created when needed, and deleted when the
QMutexPool is destructed.
*/
-QMutexPool::QMutexPool(bool recursive, int size)
- : mutexes(size), count(size), recurs(recursive)
+QMutexPool::QMutexPool(QMutex::RecursionMode recursionMode, int size)
+ : mutexes(size), count(size), recursionMode(recursionMode)
{
for (int index = 0; index < count; ++index) {
mutexes[index] = 0;
@@ -134,7 +134,7 @@ QMutex *QMutexPool::get(const void *address)
if (!mutexes[index]) {
// mutex not created, create one
- QMutex *newMutex = new QMutex(recurs ? QMutex::Recursive : QMutex::NonRecursive);
+ QMutex *newMutex = new QMutex(recursionMode);
if (!mutexes[index].testAndSetOrdered(0, newMutex))
delete newMutex;
}
diff --git a/src/corelib/thread/qmutexpool_p.h b/src/corelib/thread/qmutexpool_p.h
index 1009ebb..4c1e32c 100644
--- a/src/corelib/thread/qmutexpool_p.h
+++ b/src/corelib/thread/qmutexpool_p.h
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QMutexPool
{
public:
- explicit QMutexPool(bool recursive = false, int size = 128);
+ explicit QMutexPool(QMutex::RecursionMode recursionMode = QMutex::NonRecursive, int size = 128);
~QMutexPool();
QMutex *get(const void *address);
@@ -74,7 +74,7 @@ public:
private:
QVarLengthArray<QAtomicPointer<QMutex>, 128> mutexes;
int count;
- bool recurs;
+ QMutex::RecursionMode recursionMode;
};
extern Q_CORE_EXPORT QMutexPool *qt_global_mutexpool;
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 1fbda85..126ea5b 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4759,10 +4759,7 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
}
// Find pixmap in cache.
- if (!itemCache->allExposed)
- pixmapFound = QPixmapCache::find(pixmapKey, &pix);
- else
- pixmapFound = false;
+ pixmapFound = QPixmapCache::find(pixmapKey, &pix);
// Render using item coordinate cache mode.
if (cacheMode == QGraphicsItem::ItemCoordinateCache) {
diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css
index 8e9eb78..e700e0a 100644
--- a/tools/qdoc3/test/classic.css
+++ b/tools/qdoc3/test/classic.css
@@ -1,9 +1,6 @@
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
font-family: Arial, Geneva, Helvetica, sans-serif;
}
-BODY,TD {
- font-size: 90%;
-}
H1 {
text-align: center;
font-size: 160%;