summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qnamespace.qdoc4
-rw-r--r--src/corelib/io/qfile.cpp2
-rw-r--r--src/corelib/kernel/qobject.cpp18
-rw-r--r--src/corelib/kernel/qobject_p.h18
-rw-r--r--src/corelib/tools/qmargins.cpp3
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()
-
*/