int result = -1;
+ InquireServersGUI splash;
+ bool isSplash = false;
+
+ //SRN: Show a splash ASAP
+ if ( isFound( "SPLASH", argc, argv ) ) {
+ isSplash = true;
+ // create temporary resource manager just to load splash icon
+ SUIT_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) );
+ resMgr.setCurrentFormat( "xml" );
+ resMgr.loadLanguage( "LightApp", "en" );
+
+ // create splash object: widget ( splash with progress bar ) and "pinging" thread
+ splash.setPixmap( resMgr.loadPixmap( "LightApp", QObject::tr( "ABOUT_SPLASH" ) ) );
+ SUIT_Tools::centerWidget( &splash, _qappl.desktop() );
+
+ _qappl.setMainWidget( &splash );
+ QObject::connect( &_qappl, SIGNAL( lastWindowClosed() ), &_qappl, SLOT( quit() ) );
+ splash.show(); // display splash with running progress bar
+ }
+
CORBA::ORB_var orb;
PortableServer::POA_var poa;
_ServerLaunch.wait( &_GUIMutex ); // to be reseased by Launch server thread when ready:
// show splash screen if "SPLASH" parameter was passed ( default )
- if ( isFound( "SPLASH", argc, argv ) )
+ if ( isSplash )
{
- // create temporary resource manager just to load splash icon
- SUIT_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) );
- resMgr.setCurrentFormat( "xml" );
- resMgr.loadLanguage( "LightApp", "en" );
-
- // create splash object: widget ( splash with progress bar ) and "pinging" thread
- InquireServersGUI splash;
- splash.setPixmap( resMgr.loadPixmap( "LightApp", QObject::tr( "ABOUT_SPLASH" ) ) );
- SUIT_Tools::centerWidget( &splash, _qappl.desktop() );
-
- _qappl.setMainWidget( &splash );
- QObject::connect( &_qappl, SIGNAL( lastWindowClosed() ), &_qappl, SLOT( quit() ) );
- splash.show(); // display splash with running progress bar
- _qappl.exec(); // wait untill splash closes ( progress runs till end or Cancel is pressed )
-
+ _qappl.exec(); // wait untill splash closes ( progress runs till end or Cancel is pressed )
result = splash.getExitStatus(); // 1 is error
}
else