From: stv Date: Fri, 13 Jul 2007 12:25:05 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: For_HDF~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3f5cacf864de98a13eade4a987a9788f4116fba7;p=modules%2Fgui.git *** empty log message *** --- diff --git a/src/SUIT/SUIT_Desktop.cxx b/src/SUIT/SUIT_Desktop.cxx index e16680033..65fda8314 100755 --- a/src/SUIT/SUIT_Desktop.cxx +++ b/src/SUIT/SUIT_Desktop.cxx @@ -24,8 +24,9 @@ #include #include -#include +#include #include +#include /*!\class SUIT_Desktop * Provide desktop management:\n @@ -42,7 +43,7 @@ public: QObject* object() const { return myObj; } private: - QObject* myObj; + QPointer myObj; }; /*! @@ -101,7 +102,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 +112,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; + SUIT_ViewWindow* wid = ::qobject_cast( re->object() ); + if ( wid ) { - QWidget* wid = (QWidget*)re->child(); bool invis = wid->testAttribute( Qt::WA_WState_ExplicitShowHide ) && wid->testAttribute( Qt::WA_WState_Hidden );