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 );
}