diff options
Diffstat (limited to 'src/kernel/qobject.cpp')
-rw-r--r-- | src/kernel/qobject.cpp | 15 |
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() ) { |