- int result = -1;
- QFile xmlfile(xmlFileName);
- if ( xmlfile.exists() ) {
- SALOME_InstallWizard wizard(xmlFileName, targetDirPath, tmpDirPath, force_src);
- a.setMainWidget( &wizard );
- wizard.show();
- result = a.exec();
- }
- else {
- QMessageBox::critical( 0,
- QObject::tr( "Error" ),
- QObject::tr( "Can't open config file:\n%1\n\nQuitting...").arg( xmlFileName ),
- QMessageBox::Ok,
- QMessageBox::NoButton,
- QMessageBox::NoButton );
+ if ( has_xml ) {
+ QFile xmlfile(xmlFileName);
+ if ( !xmlfile.exists() ) {
+ QMessageBox::critical( 0,
+ QObject::tr( "Error" ),
+ QObject::tr( "Can't open config file:\n%1\n\nQuitting...").arg( xmlFileName ),
+ QMessageBox::Ok,
+ QMessageBox::NoButton,
+ QMessageBox::NoButton );
+ return -1;
+ }