From 780cf3898132b29acaf15f9fa1593da2e812e7a6 Mon Sep 17 00:00:00 2001 From: stv Date: Tue, 5 Jun 2007 12:50:49 +0000 Subject: [PATCH] *** empty log message *** --- src/SUIT/SUIT_Desktop.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SUIT/SUIT_Desktop.cxx b/src/SUIT/SUIT_Desktop.cxx index e16680033..8c52c17fd 100755 --- a/src/SUIT/SUIT_Desktop.cxx +++ b/src/SUIT/SUIT_Desktop.cxx @@ -42,7 +42,7 @@ public: QObject* object() const { return myObj; } private: - QObject* myObj; + QPointer myObj; }; /*! @@ -101,7 +101,7 @@ void SUIT_Desktop::closeEvent( QCloseEvent* e ) void SUIT_Desktop::childEvent( QChildEvent* e ) { if ( e->type() == QEvent::ChildAdded && e->child()->isWidgetType() ) - QApplication::postEvent( this, new QChildEvent( QEvent::Type( Reparent ), e->child() ) ); + QApplication::postEvent( this, new ReparentEvent( QEvent::Type( Reparent ), e->child() ) ); else QtxMainWindow::childEvent( e ); } @@ -111,10 +111,10 @@ void SUIT_Desktop::customEvent( QEvent* e ) if ( (int)e->type() != Reparent ) return; - QChildEvent* re = (QChildEvent*)e; - if ( re->child()->inherits( "SUIT_ViewWindow" ) ) + ReparentEvent* re = (ReparentEvent*)e; + if ( re->object() && re->object()->inherits( "SUIT_ViewWindow" ) ) { - QWidget* wid = (QWidget*)re->child(); + QWidget* wid = (QWidget*)re->object(); bool invis = wid->testAttribute( Qt::WA_WState_ExplicitShowHide ) && wid->testAttribute( Qt::WA_WState_Hidden ); -- 2.39.2