From: vsr Date: Wed, 27 Dec 2006 14:32:43 +0000 (+0000) Subject: PAL14048: Show message box in the end of the installation if there were any warnings... X-Git-Tag: V_3_2_4~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=51649b6cfa955daf125ce0d1b4967f453f096710;p=tools%2Finstall.git PAL14048: Show message box in the end of the installation if there were any warnings or/and errors. --- diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index bafdec9..55e4de7 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -468,7 +468,8 @@ SALOME_InstallWizard::SALOME_InstallWizard(const QString& aXmlFileName, helpWindow( NULL ), moreMode( false ), previousPage( 0 ), - exitConfirmed( false ) + exitConfirmed( false ), + hasErrors( false ) { myIWName = tr( "Installation Wizard" ); tmpCreated = QString::null; @@ -1699,6 +1700,16 @@ void SALOME_InstallWizard::launchScript() if ( isMinimized() ) showNormal(); raise(); + if ( hasErrors ) { + QMessageBox::warning( this, + tr( "Warning" ), + tr( "There were some errors and/or warnings during the installation.\n" + "Please check the installation log." ), + QMessageBox::Ok, + QMessageBox::NoButton, + QMessageBox::NoButton ); + } + hasErrors = false; } // ================================================================ /*! @@ -2018,6 +2029,7 @@ void SALOME_InstallWizard::onStart() while( shellProcess->isRunning() ); return; } + hasErrors = false; progressView->clear(); installInfo->clear(); installInfo->setFinished( false ); @@ -2356,11 +2368,13 @@ void SALOME_InstallWizard::readFromStderr( ) while ( shellProcess->canReadLineStderr() ) { installInfo->append( OUTLINE_TEXT( QString( shellProcess->readLineStderr() ) ) ); installInfo->scrollToBottom(); + hasErrors = true; } QString str( shellProcess->readStderr() ); if ( !str.isEmpty() ) { installInfo->append( OUTLINE_TEXT( str ) ); installInfo->scrollToBottom(); + hasErrors = true; } // VSR: 10/11/05 - disable answer mode ==> // passedParams->setEnabled( true ); diff --git a/src/SALOME_InstallWizard.hxx b/src/SALOME_InstallWizard.hxx index 5044556..74c8afd 100644 --- a/src/SALOME_InstallWizard.hxx +++ b/src/SALOME_InstallWizard.hxx @@ -348,6 +348,7 @@ class SALOME_InstallWizard: public InstallWizard ButtonList buttons; // operation buttons ProcessThread* myThread; // validation thread + bool hasErrors; // flag: if there were any errors or warnings during the installation }; #endif