diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-09-16 13:53:21 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@sosco.com> | 2009-09-16 13:53:21 (GMT) |
commit | 90fce5ee772b6cedb3f896adcc3d986ed7a1af57 (patch) | |
tree | b2c315064e99cf7246e9c20e0521dd8e5140d14b /src/corelib | |
parent | 504dd08854a8f6519a0529014df2233938b82728 (diff) | |
parent | b2e96b5ebe337ec52682503b239145f187751c25 (diff) | |
download | Qt-90fce5ee772b6cedb3f896adcc3d986ed7a1af57.zip Qt-90fce5ee772b6cedb3f896adcc3d986ed7a1af57.tar.gz Qt-90fce5ee772b6cedb3f896adcc3d986ed7a1af57.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 4 | ||||
-rw-r--r-- | src/corelib/io/qfile.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 18 | ||||
-rw-r--r-- | src/corelib/kernel/qobject_p.h | 18 | ||||
-rw-r--r-- | src/corelib/tools/qmargins.cpp | 3 |
5 files changed, 22 insertions, 23 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 314dfb2..fafbec5 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2804,6 +2804,6 @@ \note: in 4.6, cursor navigation is only implemented for Symbian OS. On other platforms, it behaves as NavigationModeNone. - \sa QApplication::setNavigationMode - \sa QApplication::navigationMode + \sa QApplication::setNavigationMode() + \sa QApplication::navigationMode() */ diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index c52a665..134c4b8 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -1370,7 +1370,7 @@ QFile::flush() } /*! - Flushes the file and then closes it. + Calls QFile::flush() and closes the file. Errors from flush are ignored. \sa QIODevice::close() */ diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index b4e3959..a8120cf 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -129,7 +129,7 @@ QObjectData::~QObjectData() {} QDeclarativeData::~QDeclarativeData() {} QObjectPrivate::QObjectPrivate(int version) - : threadData(0), connectionLists(0), senders(0), currentSender(0), currentChildBeingDeleted(0), declarativeData(0), objectGuards(0) + : threadData(0), connectionLists(0), senders(0), currentSender(0), currentChildBeingDeleted(0) { if (version != QObjectPrivateVersion) qFatal("Cannot mix incompatible Qt libraries"); @@ -496,18 +496,14 @@ void QMetaObject::changeGuard(QObject **ptr, QObject *o) void QObjectPrivate::clearGuards(QObject *object) { QObjectPrivate *priv = QObjectPrivate::get(object); - QGuard<QObject> *guard = priv->objectGuards; + QGuard<QObject> *guard = priv->extraData ? priv->extraData->objectGuards : 0; while (guard) { - guard->o = 0; + QGuard<QObject> *g = guard; guard = guard->next; - } - while (priv->objectGuards) { - guard = priv->objectGuards; - guard->prev = 0; - if (guard->next) guard->next->prev = &priv->objectGuards; - priv->objectGuards = guard->next; - guard->next = 0; - guard->objectDestroyed(object); + g->o = 0; + g->prev = 0; + g->next = 0; + g->objectDestroyed(object); } if (!priv->hasGuards) diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index e7d824b..f087407 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -99,11 +99,13 @@ class Q_CORE_EXPORT QObjectPrivate : public QObjectData public: struct ExtraData { + ExtraData() : objectGuards(0) {} #ifndef QT_NO_USERDATA QVector<QObjectUserData *> userData; #endif QList<QByteArray> propertyNames; QList<QVariant> propertyValues; + QGuard<QObject> *objectGuards; //linked list handle of QGuards }; struct Connection @@ -192,12 +194,13 @@ public: #endif QList<QPointer<QObject> > eventFilters; - QObject *currentChildBeingDeleted; + union { + QObject *currentChildBeingDeleted; + QDeclarativeData *declarativeData; //extra data used by the DeclarativeUI project. + }; // these objects are all used to indicate that a QObject was deleted // plus QPointer, which keeps a separate list - QDeclarativeData *declarativeData; - QGuard<QObject> *objectGuards; QAtomicPointer<QtSharedPointer::ExternalRefCountData> sharedRefcount; int *deleteWatch; }; @@ -211,9 +214,12 @@ inline void q_guard_addGuard(QGuard<QObject> *g) return; } - g->next = p->objectGuards; - p->objectGuards = g; - g->prev = &p->objectGuards; + if (!p->extraData) + p->extraData = new QObjectPrivate::ExtraData; + + g->next = p->extraData->objectGuards; + p->extraData->objectGuards = g; + g->prev = &p->extraData->objectGuards; if (g->next) g->next->prev = &g->next; } diff --git a/src/corelib/tools/qmargins.cpp b/src/corelib/tools/qmargins.cpp index 72fbd61..b5e5ebd 100644 --- a/src/corelib/tools/qmargins.cpp +++ b/src/corelib/tools/qmargins.cpp @@ -58,9 +58,6 @@ QT_BEGIN_NAMESPACE The isNull() function returns true only if all margins are set to zero. QMargin objects can be streamed as well as compared. - - \sa qDrawBorderPixmap() - */ |