From 51649b6cfa955daf125ce0d1b4967f453f096710 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 27 Dec 2006 14:32:43 +0000 Subject: [PATCH] PAL14048: Show message box in the end of the installation if there were any warnings or/and errors. --- src/SALOME_InstallWizard.cxx | 16 +++++++++++++++- src/SALOME_InstallWizard.hxx | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) 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 -- 2.39.2