Salome HOME
Fix for Bug IPAL9053( 3.0.0: "Check Geometry" and "Load script" functionalities from...
[modules/gui.git] / src / SUIT / SUIT_Session.cxx
index d2c547c1dbe4ecf1714e9a230560ac5e60b4c5fd..08d85b0f404b1ef28191155d0c96bddf54d25a50 100755 (executable)
@@ -191,12 +191,14 @@ void SUIT_Session::onApplicationClosed( SUIT_Application* theApp )
 */
 void SUIT_Session::closeSession()
 {
-  for ( AppListIterator it( myAppList ); it.current(); ++it )
+  while ( !myAppList.isEmpty() )
   {
-    if ( !it.current()->isPossibleToClose() )
+    SUIT_Application* app = myAppList.getFirst();
+    if ( !app->isPossibleToClose() )
       return;
+
+    app->closeApplication();
   }
-  qApp->quit();
 }
 
 SUIT_ExceptionHandler* SUIT_Session::handler() const