From: vsr Date: Fri, 25 Feb 2005 08:13:36 +0000 (+0000) Subject: Fix a bug with hang-up when no native products are selected X-Git-Tag: SALOME_V_2_2_1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ba3338fe7b16f9fda96a27e9d8d286e150142206;p=tools%2Finstall.git Fix a bug with hang-up when no native products are selected --- diff --git a/bin/SALOME_InstallWizard b/bin/SALOME_InstallWizard index 6c1bbe0..ea655de 100755 Binary files a/bin/SALOME_InstallWizard and b/bin/SALOME_InstallWizard differ diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index 156682a..87fe009 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -1052,30 +1052,32 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle ) QString tmpFolder = QDir::cleanDirPath( tempFolder->text().stripWhiteSpace() ) + TEMPDIRNAME; QString tgtFolder = QDir::cleanDirPath( targetFolder->text().stripWhiteSpace() ); myThread->clearCommands(); - for ( unsigned i = 0; i < natives.count(); i++ ) { - item = findItem( natives[ i ] ); - if ( item ) { - QString dependOn = productsMap[ item ].getDependancies().join(" "); - QString script = "cd ./config_files/;" + item->text(2) + " try_native " + - QFileInfo( tmpFolder ).absFilePath() + " " + QDir::currentDirPath() + "/Products " + QFileInfo( tgtFolder ).absFilePath() + " " + - QUOTE(dependOn) + " " + item->text(0); + if ( natives.count() > 0 ) { + for ( unsigned i = 0; i < natives.count(); i++ ) { + item = findItem( natives[ i ] ); + if ( item ) { + QString dependOn = productsMap[ item ].getDependancies().join(" "); + QString script = "cd ./config_files/;" + item->text(2) + " try_native " + + QFileInfo( tmpFolder ).absFilePath() + " " + QDir::currentDirPath() + "/Products " + QFileInfo( tgtFolder ).absFilePath() + " " + + QUOTE(dependOn) + " " + item->text(0); - myThread->addCommand( item, script ); - } - else { - QMessageBox::warning( this, - tr( "Warning" ), - tr( "%The product %1 %2 required for installation.\n" - "Please, add this product in config.xml file.").arg(item->text(0)).arg(item->text(1)), - QMessageBox::Ok, - QMessageBox::NoButton, - QMessageBox::NoButton ); - return false; + myThread->addCommand( item, script ); + } + else { + QMessageBox::warning( this, + tr( "Warning" ), + tr( "%The product %1 %2 required for installation.\n" + "Please, add this product in config.xml file.").arg(item->text(0)).arg(item->text(1)), + QMessageBox::Ok, + QMessageBox::NoButton, + QMessageBox::NoButton ); + return false; + } } + WarnDialog::showWarnDlg( this, true ); + myThread->start(); + return true; // return in order to avoid default postValidateEvent() action } - WarnDialog::showWarnDlg( this, true ); - myThread->start(); - return true; // return in order to avoid default postValidateEvent() action } return InstallWizard::acceptData( pageTitle ); }