Salome HOME
PAL14048: Show message box in the end of the installation if there were any warnings...
authorvsr <vsr@opencascade.com>
Wed, 27 Dec 2006 14:32:43 +0000 (14:32 +0000)
committervsr <vsr@opencascade.com>
Wed, 27 Dec 2006 14:32:43 +0000 (14:32 +0000)
src/SALOME_InstallWizard.cxx
src/SALOME_InstallWizard.hxx

index bafdec9b1ff6aa30df25c9fddebc25ca5cb89017..55e4de7ea06f2411c09c5c84516d37249c740176 100644 (file)
@@ -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 );
index 5044556e653ed53a3ecd973915b15b2a8a96e7a3..74c8afd6be936ccc1c0b805b14d5270ef226c943 100644 (file)
@@ -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