summaryrefslogtreecommitdiffstats
path: root/src/kernel/qobject.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-04-22 21:25:32 -0500
committerTimothy Pearson <[email protected]>2013-04-22 21:25:32 -0500
commit83d39cad274f592a43a3262926d215493caea0bc (patch)
tree05fefa97bd40200c6b7a1a184cd4df2610cc1091 /src/kernel/qobject.cpp
parent7abfc2a181531c769d50bcb1c0bff1fc08c66de2 (diff)
downloadqt3-83d39cad274f592a43a3262926d215493caea0bc.tar.gz
qt3-83d39cad274f592a43a3262926d215493caea0bc.zip
Fix a number of threading problems and crashes
This partially resolves Bug 1467
Diffstat (limited to 'src/kernel/qobject.cpp')
-rw-r--r--src/kernel/qobject.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp
index 13486f4..20973c5 100644
--- a/src/kernel/qobject.cpp
+++ b/src/kernel/qobject.cpp
@@ -610,11 +610,13 @@ QObject::~QObject()
blockSig = 0; // unblock signals to keep QGuardedPtr happy
emit destroyed( this );
emit destroyed();
- if ( objname )
+ if ( objname ) {
delete [] (char*)objname;
+ }
objname = 0;
- if ( pendTimer ) // might be pending timers
+ if ( pendTimer ) { // might be pending timers
qKillTimer( this );
+ }
QApplication::removePostedEvents( this );
if ( isTree ) {
remove_tree( this ); // remove from global root list
@@ -924,12 +926,17 @@ void destroyDeepCopiedQUObjectArray(QUObject* uArray)
bool QObject::event( QEvent *e )
{
#if defined(QT_CHECK_NULL)
- if ( e == 0 )
+ if ( e == 0 ) {
qWarning( "QObject::event: Null events are not permitted" );
+ }
#endif
+ if ( wasDeleted ) {
+ return TRUE;
+ }
if ( eventFilters ) { // try filters
- if ( activate_filters(e) ) // stopped by a filter
+ if ( activate_filters(e) ) { // stopped by a filter
return TRUE;
+ }
}
switch ( e->type() ) {