From: vsr Date: Thu, 24 Feb 2005 16:21:48 +0000 (+0000) Subject: Fix a bug with hangup of application X-Git-Tag: SALOME_V_2_2_1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=912c594d67fcbb6d5f7df61f615428037af601db;p=tools%2Finstall.git Fix a bug with hangup of application --- diff --git a/bin/SALOME_InstallWizard b/bin/SALOME_InstallWizard index 02035a7..6454943 100755 Binary files a/bin/SALOME_InstallWizard and b/bin/SALOME_InstallWizard differ diff --git a/src/InstallWizard.cpp b/src/InstallWizard.cpp index b65c80e..e1beb40 100644 --- a/src/InstallWizard.cpp +++ b/src/InstallWizard.cpp @@ -371,11 +371,11 @@ void InstallWizard::next() i--; if ( d->pages.at( i ) ) { if ( d->current ) { - nextButton()->setEnabled( false ); - backButton()->setEnabled( false ); + setNextEnabled( false ); + setBackEnabled( false ); if ( !acceptData( d->current->t ) ) { - nextButton()->setEnabled( true ); - backButton()->setEnabled( true ); + setNextEnabled( true ); + setBackEnabled( true ); return; } } @@ -937,8 +937,8 @@ void InstallWizard::processValidateEvent( const int /* val */, void* /* data */ if ( d->pages.at( i ) ) { showPage( d->pages.at( i )->w ); } - nextButton()->setEnabled( true ); - backButton()->setEnabled( true ); + setNextEnabled( true ); + setBackEnabled( true ); } /*! diff --git a/src/InstallWizard.h b/src/InstallWizard.h index 34a766a..ddd49ad 100644 --- a/src/InstallWizard.h +++ b/src/InstallWizard.h @@ -120,11 +120,10 @@ protected: virtual void layOutTitleRow( QHBoxLayout *, const QString & ); virtual bool acceptData( const QString& ); void layOut(); - -private: void setBackEnabled( bool ); void setNextEnabled( bool ); +private: void setHelpEnabled( bool ); void setNextPage( QWidget * ); diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index 98778c8..156682a 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -1282,14 +1282,14 @@ void SALOME_InstallWizard::launchScript() } } // button - nextButton()->setEnabled( true ); + setNextEnabled( true ); nextButton()->setText( tr( "&Next >" ) ); QWhatsThis::add( nextButton(), tr( "Moves to the next step of the installation procedure" ) ); QToolTip::add ( nextButton(), tr( "Moves to the next step of the installation procedure" ) ); nextButton()->disconnect(); connect( nextButton(), SIGNAL( clicked() ), this, SLOT( next() ) ); // button - backButton()->setEnabled( true ); + setBackEnabled( true ); // script parameters passedParams->clear(); passedParams->setEnabled( false ); @@ -1511,7 +1511,7 @@ void SALOME_InstallWizard::pageChanged( const QString & mytitle) // reconnect Next button - to use it as Start button nextButton()->disconnect(); connect( nextButton(), SIGNAL( clicked() ), this, SLOT( onStart() ) ); - nextButton()->setEnabled( true ); + setNextEnabled( true ); // reconnect Cancel button to terminate process cancelButton()->disconnect(); connect( cancelButton(), SIGNAL( clicked() ), this, SLOT( tryTerminate() ) ); @@ -1608,9 +1608,9 @@ void SALOME_InstallWizard::onStart() if ( !toInstall.isEmpty() ) { clean(false); // VSR 07/02/05 - bug fix: first we should clear temporary directory // disable button - nextButton()->setEnabled( false ); + setNextEnabled( false ); // disable button - backButton()->setEnabled ( false ); + setBackEnabled( false ); // enable script parameters line edit // VSR commented: 18/09/03: passedParams->setEnabled( true ); // VSR commented: 18/09/03: passedParams->setFocus(); @@ -1669,14 +1669,14 @@ void SALOME_InstallWizard::productInstalled( ) passedParams->setEnabled( false ); QFont f = parametersLab->font(); f.setBold( false ); parametersLab->setFont( f ); // enable button - nextButton()->setEnabled( true ); + setNextEnabled( true ); nextButton()->setText( tr( "&Next >" ) ); QWhatsThis::add( nextButton(), tr( "Moves to the next step of the installation procedure" ) ); QToolTip::add ( nextButton(), tr( "Moves to the next step of the installation procedure" ) ); nextButton()->disconnect(); connect( nextButton(), SIGNAL( clicked() ), this, SLOT( next() ) ); // enable button - backButton()->setEnabled( true ); + setBackEnabled( true ); } } // ================================================================ @@ -1930,8 +1930,11 @@ void SALOME_InstallWizard::processValidateEvent( const int val, void* data ) QMessageBox::NoButton ) == QMessageBox::No ) { myThread->clearCommands(); myWC.wakeAll(); + setNextEnabled( true ); + setBackEnabled( true ); return; } + WarnDialog::showWarnDlg( this, true ); } else { WarnDialog::showWarnDlg( 0, false ); @@ -1941,9 +1944,11 @@ void SALOME_InstallWizard::processValidateEvent( const int val, void* data ) QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton ); - productsView->setNone( item ); myThread->clearCommands(); myWC.wakeAll(); + setNextEnabled( true ); + setBackEnabled( true ); + productsView->setNone( item ); return; } }