From: stv Date: Tue, 5 Jun 2007 12:50:49 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: For_HDF~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=780cf3898132b29acaf15f9fa1593da2e812e7a6;p=modules%2Fgui.git *** empty log message *** --- 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 );