Salome HOME
Merge branch 'V9_9_BR'
[samples/atomsolv.git] / src / ATOMSOLVGUI / ATOMSOLVGUI.cxx
index a3c48bf50987a557bfdafbb1086742c36d9156f1..f8a9b993049829609a956ddf0bd368cd50735181 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -36,6 +36,9 @@
 #include <SalomeApp_Application.h>
 #include <SalomeApp_Study.h>
 
+#include "SALOME_NamingService_Abstract.hxx"
+#include "SALOME_KernelServices.hxx"
+
 #include <LightApp_DataOwner.h>
 #include <LightApp_SelectionMgr.h>
 #include <LightApp_Preferences.h>
@@ -72,6 +75,7 @@ void ATOMSOLVGUI::InitATOMSOLVGen( SalomeApp_Application* app )
   if ( !app )
     myEngine = ATOMSOLV_ORB::ATOMSOLV_Gen::_nil();
   else {
+    SALOME_NamingService_Abstract *ns = SalomeApp_Application::namingService();
     Engines::EngineComponent_var comp = app->lcc()->FindOrLoad_Component( "FactoryServer", "ATOMSOLV" );
     ATOMSOLV_ORB::ATOMSOLV_Gen_ptr atomGen = ATOMSOLV_ORB::ATOMSOLV_Gen::_narrow(comp);
     ASSERT( !CORBA::is_nil( atomGen ) );
@@ -256,7 +260,7 @@ void ATOMSOLVGUI::OnRetrieveData()
   ATOMSOLV_ORB::ATOMSOLV_Gen_var engine = GetATOMSOLVGen();
   SalomeApp_Application* app = getApp();
   if ( !CORBA::is_nil( engine ) && app ) {
-    Engines::EngineComponent_var comp = app->lcc()->FindOrLoad_Component( "FactoryServerPy","ATOMGEN" );
+    Engines::EngineComponent_var comp = app->lcc()->FindOrLoad_Component( "FactoryServer","ATOMGEN" );
     ATOMGEN_ORB::ATOMGEN_Gen_var atomGen = ATOMGEN_ORB::ATOMGEN_Gen::_narrow( comp );
     SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
     if ( !CORBA::is_nil( atomGen ) && appStudy ) {