Salome HOME
[bos#35161][EDF](2023-T1) Automatic backup - initial commit
[modules/gui.git] / src / LightApp / LightApp_Application.cxx
index f14da6ff25ccff976d5d3159a9e5b720601da95f..7be6a4c19d412294c21b3f8def6d0e53e3c21317 100644 (file)
 
 #include <Standard_Version.hxx>
 
+//---------------------------------------------------------
+#define USE_DEBUG
+//#define MB_IGNORE_QT
+//#define MB_FULL_DUMP
+#define MBCLASSNAME "LightApp_Application"
+#include "MBDebug.h"
+// <-- insert includes for addtional debug headers here!
+//---------------------------------------------------------
+
 #define ToolBarMarker    0
 #define DockWidgetMarker 1
 
@@ -373,6 +382,7 @@ LightApp_Application::LightApp_Application()
   myPrefs( 0 ),
   myScreenHelper(new LightApp_FullScreenHelper())
 {
+  DBG_FUN();
   Q_INIT_RESOURCE( LightApp );
 
   STD_TabDesktop* desk = new STD_TabDesktop();
@@ -485,6 +495,7 @@ LightApp_Application::LightApp_Application()
  */
 LightApp_Application::~LightApp_Application()
 {
+  DBG_FUN();
   savePreferences();
   delete mySelMgr;
   delete myScreenHelper;
@@ -494,6 +505,7 @@ LightApp_Application::~LightApp_Application()
 /*!Start application.*/
 void LightApp_Application::start()
 {
+  DBG_FUN();
   CAM_Application::start();
 
   updateWindows();
@@ -511,6 +523,7 @@ void LightApp_Application::start()
 /*!Closeapplication.*/
 void LightApp_Application::closeApplication()
 {
+  DBG_FUN();
 #ifndef DISABLE_QTXWEBBROWSER
   QProcess::startDetached( "HelpBrowser",
                            QStringList() << QString( "--remove=%1" ).arg( QApplication::instance()->applicationPid() ) );
@@ -2219,6 +2232,7 @@ void LightApp_Application::onStudyCreated( SUIT_Study* theStudy )
 */
 void LightApp_Application::onStudyOpened( SUIT_Study* theStudy )
 {
+  DBG_FUN();
   SUIT_DataObject* aRoot = 0;
   if ( theStudy && theStudy->root() )
   {
@@ -2250,9 +2264,12 @@ void LightApp_Application::onStudyOpened( SUIT_Study* theStudy )
 /*!Protected SLOT. On study saved.*/
 void LightApp_Application::onStudySaved( SUIT_Study* s )
 {
+  DBG_FUN();
   QtxMRUAction* mru = ::qobject_cast<QtxMRUAction*>( action( MRUId ) );
-  if ( mru && s )
+  if ( mru && s ) {
+    MSGEL("...adding [" << s->studyName().toStdString() << "] to MRU");
     mru->insert( s->studyName() );
+  }
 
   emit studySaved();
 }
@@ -2260,6 +2277,7 @@ void LightApp_Application::onStudySaved( SUIT_Study* s )
 /*!Protected SLOT. On study closed.*/
 void LightApp_Application::onStudyClosed( SUIT_Study* /*s*/ )
 {
+  DBG_FUN();
   /*
   disconnect( this, SIGNAL( viewManagerRemoved( SUIT_ViewManager* ) ),
               this, SLOT( onViewManagerRemoved( SUIT_ViewManager* ) ) );
@@ -2288,6 +2306,7 @@ void LightApp_Application::onDesktopActivated()
 
 void LightApp_Application::studyOpened( SUIT_Study* s )
 {
+  DBG_FUN();
   CAM_Application::studyOpened( s );
 
   updateWindows();
@@ -2296,6 +2315,7 @@ void LightApp_Application::studyOpened( SUIT_Study* s )
 
 void LightApp_Application::studySaved( SUIT_Study* s )
 {
+  DBG_FUN();
   CAM_Application::studyOpened( s );
   SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
   if ( aResMgr && activeStudy() ) {
@@ -4971,6 +4991,8 @@ void LightApp_Application::onWCDestroyed( QObject* ob )
 
 void LightApp_Application::onMRUActivated( const QString& name )
 {
+  DBG_FUN();
+  ARG(name);
   SUIT_Session* s = SUIT_Session::session();
   if ( s && s->activeApplication() == this )
     onOpenDoc( name );