-// Copyright (C) 2009-2012 EDF R&D
+// Copyright (C) 2009-2022 EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <SUIT_Study.h>
#include <SalomeApp_Application.h>
#include <SALOME_LifeCycleCORBA.hxx>
+#include <SALOME_KernelServices.hxx>
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(cppcompos)
setMenuShown( true );
setToolShown( true );
- SALOME_NamingService *aNamingService = SalomeApp_Application::namingService();
- CORBA::Object_var aSMObject = aNamingService->Resolve("/myStudyManager");
- SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(aSMObject);
- SALOMEDS::Study_var aDSStudy = aStudyManager->GetStudyByID(theStudy->id());
+ SALOMEDS::Study_var aDSStudy = KERNEL::getStudyServant();
SALOMEDS::SComponent_var aFather = aDSStudy->FindComponent("cppcompos");
if (aFather->_is_nil())
aStudyBuilder->DefineComponentInstance(aFather, engine);
}
CORBA::Boolean valid;
- engine->DumpPython(aDSStudy,1,0,valid);
+ engine->DumpPython(1,0,valid);
return bOk;
}
void cppcomposGUI::OnGetBanner()
{
// Dialog to get the Name
- bool ok = FALSE;
+ bool ok = false;
QString myName = QInputDialog::getText( getApp()->desktop(), "label", "name", QLineEdit::Normal, QString::null, &ok );
if ( ok && !myName.isEmpty())