]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
QGuardedPtr used for field myStudy. This prevet using of the deleted study object. OCC_ENK_config_imp
authorstv <stv@opencascade.com>
Wed, 25 Jan 2006 11:44:22 +0000 (11:44 +0000)
committerstv <stv@opencascade.com>
Wed, 25 Jan 2006 11:44:22 +0000 (11:44 +0000)
src/SUIT/SUIT_Operation.h

index 6d44d9502a725417640b55d9f56c12fc154fa313..4f1b617b98575ddb0e62199f5a4b621974b86d76 100755 (executable)
 #ifndef SUIT_OPERATION_H
 #define SUIT_OPERATION_H
 
-#include <qobject.h>
-
 #include "SUIT.h"
 
+#include <qobject.h>
+#include <qguardedptr.h>
+
 class SUIT_Study;
 class SUIT_Application;
 
@@ -54,6 +55,10 @@ class SUIT_Application;
  *  - virtual void      resumeOperation();
  *  - virtual void      suspendOperation();
 */
+#ifdef WIN32
+#pragma warning( disable:4251 )
+#endif
+
 class SUIT_EXPORT SUIT_Operation : public QObject
 {
   Q_OBJECT
@@ -152,14 +157,21 @@ protected:
 
   void              start( SUIT_Operation*, const bool = false );
 
+private:
+  typedef QGuardedPtr<SUIT_Study> StudyPtr;
+
 private:
   SUIT_Application* myApp;        //!< application for this operation
   int               myFlags;      //!< operation flags
-  SUIT_Study*       myStudy;      //!< study for this operation
+  StudyPtr          myStudy;      //!< study for this operation
   OperationState    myState;      //!< Operation state
   ExecStatus        myExecStatus; //!< Execution status
 
   friend class SUIT_Study;
 };
 
+#ifdef WIN32
+#pragma warning( default:4251 )
+#endif
+
 #endif