From 0e52ec0b37ba2823f00445c4d440a7f760f9f2f4 Mon Sep 17 00:00:00 2001 From: stv Date: Fri, 13 Jul 2007 12:26:26 +0000 Subject: [PATCH] no message --- src/SUIT/SUIT_Desktop.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 ); -- 2.39.2