# VSR: this is the original packages list
# SUBDIRS += TOOLSGUI Session SalomeApp SALOME_SWIG SALOME_PY SALOME_PYQT
# VSR: already migrated to Qt4 packages
- SUBDIRS += TOOLSGUI SalomeApp
+ SUBDIRS += TOOLSGUI Session SalomeApp
endif
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"
#include "SALOME_NamingService.hxx"
-#include "SALOMETraceCollector.hxx"
-#include <iostream>
-#ifndef WIN32
-#include <unistd.h>
-#endif
-
-#include <qdir.h>
-#include <qfile.h>
-#include <qapplication.h>
-#include <qwaitcondition.h>
-#include <qregexp.h>
+#include <QDir>
+#include <QFile>
+#include <QApplication>
+#include <QMutex>
+#include <QWaitCondition>
+#include <QRegExp>
#include "Utils_SALOME_Exception.hxx"
#include "Utils_CorbaException.hxx"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Session)
#include CORBA_SERVER_HEADER(SALOMEDS)
#include <utilities.h>
-#include "Session_Session_i.hxx"
#include "Session_ServerLauncher.hxx"
#include "Session_ServerCheck.hxx"
#include "SUIT_Session.h"
#include "SUIT_Application.h"
#include "SUIT_Desktop.h"
-#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
#include "SUIT_ExceptionHandler.h"
path += QString( "bin/salome/VERSION" );
QFile vf( path );
- if ( !vf.open( IO_ReadOnly ) )
+ if ( !vf.open( QIODevice::ReadOnly ) )
return QString::null;
- QString line;
- vf.readLine( line, 1024 );
+ QString line( vf.readLine( 1024 ) );
+
vf.close();
if ( line.isEmpty() )
line.remove( line.length() - 1, 1 );
QString ver;
- int idx = line.findRev( ":" );
+ int idx = line.lastIndexOf( ":" );
if ( idx != -1 )
- ver = line.mid( idx + 1 ).stripWhiteSpace();
+ ver = line.mid( idx + 1 ).trimmed();
return ver;
}
resMgr.loadLanguage( "LightApp", "en" );
resMgr.loadLanguage( "SalomeApp", "en" );
- myExtAppName = QObject::tr( "APP_NAME" ).stripWhiteSpace();
- if ( myExtAppName == "APP_NAME" || myExtAppName.lower() == "salome" )
+ myExtAppName = QObject::tr( "APP_NAME" ).trimmed();
+ if ( myExtAppName == "APP_NAME" || myExtAppName.toLower() == "salome" )
myExtAppName = "SalomeApp";
myExtAppVersion = QObject::tr( "APP_VERSION" );
if ( myExtAppVersion == "APP_VERSION" ) {
QString fname = QFileInfo( _fname ).fileName();
if( exp.exactMatch( fname ) ) {
- QStringList vers = QStringList::split( ".", exp.cap( 1 ) );
+ QStringList vers = exp.cap( 1 ).split( ".", QString::SkipEmptyParts );
int major=0, minor=0;
major = vers[0].toInt();
minor = vers[1].toInt();
- if( vers_exp.search( vers[2] )==-1 )
+ if( vers_exp.indexIn( vers[2] )==-1 )
return -1;
int release = 0, dev1 = 0, dev2 = 0;
release = vers_exp.cap( 1 ).toInt();
- dev1 = vers_exp.cap( 2 )[ 0 ].latin1();
+ dev1 = vers_exp.cap( 2 )[ 0 ].toLatin1();
dev2 = vers_exp.cap( 3 ).toInt();
int dev = dev1*100+dev2, id = major;
splash = QtxSplash::splash( px );
// ...set splash text colors
if ( !splashTextColors.isEmpty() ) {
- QStringList colors = QStringList::split( "|", splashTextColors );
+ QStringList colors = splashTextColors.split( "|", QString::SkipEmptyParts );
QColor c1, c2;
if ( colors.count() > 0 ) c1 = QColor( colors[0] );
if ( colors.count() > 1 ) c2 = QColor( colors[1] );
}
// ...set splash progress colors
if ( !splashProgressColors.isEmpty() ) {
- QStringList colors = QStringList::split( "|", splashProgressColors );
+ QStringList colors = splashProgressColors.split( "|", QString::SkipEmptyParts );
QColor c1, c2;
- int gradType = QtxSplash::Vertical;
+ QtxSplash::GradientType gradType = QtxSplash::Vertical;
if ( colors.count() > 0 ) c1 = QColor( colors[0] );
if ( colors.count() > 1 ) c2 = QColor( colors[1] );
- if ( colors.count() > 2 ) gradType = colors[2].toInt();
+ if ( colors.count() > 2 ) gradType = QtxSplash::GradientType( colors[2].toInt() );
splash->setProgressColors( c1, c2, gradType );
}
// ...set splash text font
#include "SALOMEDS_Tool.hxx"
-#include "utilities.h"
-
#include <iostream>
using namespace std;
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"
#include "SALOME_NamingService.hxx"
-#include "utilities.h"
#include "OpUtil.hxx"
+#include "utilities.h"
+
+#include <QApplication>
+#include <QMutex>
+#include <QWaitCondition>
// Default settings
const int __DEFAULT__ATTEMPTS__ = 300; // number of checks attemtps
ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
NS.init_orb( orb );
QString containerName = QString( "/Containers/%1/FactoryServer" ).arg( GetHostname().c_str() );
- CORBA::Object_var obj = NS.Resolve( containerName.latin1() );
+ CORBA::Object_var obj = NS.Resolve( containerName.toLatin1() );
Engines::Container_var FScontainer = Engines::Container::_narrow( obj );
if ( !CORBA::is_nil( FScontainer ) ) {
- MESSAGE( containerName.latin1() << " is found" );
+ MESSAGE( containerName.toLatin1().constData() << " is found" );
FScontainer->ping();
MESSAGE( "FactoryServer container was activated" );
bOk = true;
ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
NS.init_orb( orb );
QString containerName = QString( "/Containers/%1/FactoryServerPy" ).arg( GetHostname().c_str() );
- CORBA::Object_var obj = NS.Resolve( containerName.latin1() );
+ CORBA::Object_var obj = NS.Resolve( containerName.toLatin1() );
Engines::Container_var FSPcontainer = Engines::Container::_narrow( obj );
if ( !CORBA::is_nil( FSPcontainer ) ) {
- MESSAGE( containerName.latin1() << " is found" );
+ MESSAGE( containerName.toLatin1().constData() << " is found" );
FSPcontainer->ping();
MESSAGE("FactoryServerPy container was activated");
bOk = true;
ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
NS.init_orb( orb );
QString containerName = QString( "/Containers/%1/SuperVisionContainer" ).arg( GetHostname().c_str() );
- CORBA::Object_var obj = NS.Resolve( containerName.latin1() );
+ CORBA::Object_var obj = NS.Resolve( containerName.toLatin1() );
Engines::Container_var SVcontainer = Engines::Container::_narrow( obj );
if ( !CORBA::is_nil( SVcontainer ) ) {
- MESSAGE( containerName.latin1() << " is found" );
+ MESSAGE( containerName.toLatin1().constData() << " is found" );
SVcontainer->ping();
MESSAGE("SuperVisionContainer container was activated");
bOk = true;
#include <SALOME_Session.hxx>
-#include <qthread.h>
-#include <qapplication.h>
+#include <QThread>
class QMutex;
class QWaitCondition;
// $Header$
#include "Session_ServerLauncher.hxx"
+#include "Session_ServerThread.hxx"
#include "Utils_SALOME_Exception.hxx"
#include "utilities.h"
+
+#include <QMutex>
+#include <QWaitCondition>
+
using namespace std;
/*!
default constructor not for use
#include <SALOME_Session.hxx>
-#include "Session_ServerThread.hxx"
-
#include <CORBA.h>
#include <list>
#include <vector>
#include <string>
-#include <qthread.h>
-#include <qwaitcondition.h>
+#include <QThread>
using namespace std;
_servType(servType),_firstArg(firstArg),_lastArg(lastArg)
{}
+class Session_ServerThread;
+
+class QMutex;
+class QWaitCondition;
+
class SESSION_EXPORT Session_ServerLauncher: public QThread
{
public:
#include "Session_ServerThread.hxx"
+#include "SALOME_NamingService.hxx"
#include "SALOME_Container_i.hxx"
#include "SALOME_ContainerManager.hxx"
-#include <SALOMEDSClient.hxx>
#include <SALOMEDSClient_ClientFactory.hxx>
#include "SALOME_ModuleCatalog_impl.hxx"
#include "RegistryService.hxx"
#include <cstdlib>
#include <ctime>
+#include <QMutex>
+#include <QWaitCondition>
+
using namespace std;
const int Session_ServerThread::NB_SRV_TYP = 7;
#include <CORBA.h>
#include <string>
-#include "SALOME_NamingService.hxx"
-#include <qthread.h>
-
using namespace std;
void WaitForServerReadiness(string serverName);
+class SALOME_NamingService;
class SESSION_EXPORT Session_ServerThread
{
SALOME_NamingService * _NS;
};
+class QMutex;
+class QWaitCondition;
class SESSION_EXPORT Session_SessionThread : public Session_ServerThread
{
#include "Session_Session_i.hxx"
#include "SALOME_NamingService.hxx"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SUIT_Session.h"
-#include "SUIT_Application.h"
+//#include "SUIT_Application.h"
#include "SUIT_Desktop.h"
+#include "SUIT_Study.h"
-#include <qapplication.h>
+//#include <QApplication>
+#include <QMutex>
+#include <QWaitCondition>
// Open CASCADE Includes
#include <OSD_SharedLibrary.hxx>
-#include <OSD_LoadMode.hxx>
#include <OSD_Function.hxx>
using namespace std;
Send a SALOME::StatSession structure (see idl) to the client
(number of running studies and presence of GUI)
*/
-class QtLock
+/*class QtLock
{
public:
QtLock() { if ( qApp ) qApp->lock(); }
~QtLock() { if ( qApp ) qApp->unlock(); }
-};
+};*/
SALOME::StatSession SALOME_Session_i::GetStatSession()
_runningStudies = 0;
{
- QtLock lock;
+ //QtLock lock;
_isGUI = SUIT_Session::session();
if ( _isGUI && SUIT_Session::session()->activeApplication() )
_runningStudies = SUIT_Session::session()->activeApplication()->getNbStudies();
#include <SALOME_Session.hxx>
-#include <qthread.h>
-
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Component)
#include CORBA_SERVER_HEADER(SALOME_Session)
class SALOME_NamingService;
+class QMutex;
+class QWaitCondition;
+
class SESSION_EXPORT SALOME_Session_i: public virtual POA_SALOME::Session,
public virtual PortableServer::ServantBase
{
SUBDIRS += Event
SUBDIRS += LightApp
SUBDIRS += ResExporter
-SUBDIRS += RegistryDisplay
SUBDIRS += TOOLSGUI
+SUBDIRS += Session
SUBDIRS += SalomeApp