diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-06-03 18:47:06 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-06-10 12:58:25 (GMT) |
commit | 1a5e7171b9da383ca5f6be92b7cb6e502fd79fc4 (patch) | |
tree | 99484f1f745cea1bfa2bc4597788b2996faf89e8 /src/corelib/kernel/qobject.h | |
parent | a66525c2e4c760f8ceda344cd7252431ed263654 (diff) | |
download | Qt-1a5e7171b9da383ca5f6be92b7cb6e502fd79fc4.zip Qt-1a5e7171b9da383ca5f6be92b7cb6e502fd79fc4.tar.gz Qt-1a5e7171b9da383ca5f6be92b7cb6e502fd79fc4.tar.bz2 |
Avoid locking and search on the global hash if there is no QPointer
As less than 10% of the object have QPointers, we can avoid locking if
we know there is no QPointer. And keeping track of which object has a
QPointer is easy.
Reviewed-by: Brad
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r-- | src/corelib/kernel/qobject.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index dbec0a6..b1f41ad 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -106,7 +106,8 @@ public: uint receiveChildEvents : 1; uint inEventHandler : 1; uint inThreadChangeEvent : 1; - uint unused : 23; + uint hasGuards : 1; //true iff there is one or more QPointer attached to this object + uint unused : 22; int postedEvents; }; |