From: vsr Date: Tue, 22 Feb 2005 14:33:46 +0000 (+0000) Subject: Fix a bug: Hanging up on RedHat 9 - QMutex is used to ensure that validation events... X-Git-Tag: SALOME_V_2_2_1~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=63c6c5f5bee28a505c08bab431c92e285e203a62;p=tools%2Finstall.git Fix a bug: Hanging up on RedHat 9 - QMutex is used to ensure that validation events are processed in time --- diff --git a/bin/SALOME_InstallWizard b/bin/SALOME_InstallWizard index 626e8b6..02035a7 100755 Binary files a/bin/SALOME_InstallWizard and b/bin/SALOME_InstallWizard differ diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index 9a83803..98778c8 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef WNT #include @@ -58,7 +59,8 @@ QString tmpDirName() { return QString( "/INSTALLWORK" ) + QString::number( getp * Class for executing systen commands */ // ================================================================ -QWaitCondition myWC; +static QMutex myMutex(false); +static QWaitCondition myWC; class QProcessThread: public QThread { typedef QPtrList ItemList; @@ -81,9 +83,11 @@ public: QCheckListItem* item = myItems.first(); myCommands.pop_front(); myItems.removeFirst(); + myMutex.lock(); SALOME_InstallWizard::postValidateEvent( myWizard, result, (void*)item ); if ( hasCommands() ) - myWC.wait(); + myWC.wait(&myMutex); + myMutex.unlock(); }; } @@ -1911,6 +1915,8 @@ void SALOME_InstallWizard::processValidateEvent( const int val, void* data ) InstallWizard::processValidateEvent( val, data ); return; } + myMutex.lock(); + myMutex.unlock(); QCheckListItem* item = (QCheckListItem*)data; if ( val > 0 ) { if ( val == 2 ) { diff --git a/src/globals.h b/src/globals.h index 4871e97..cb6868b 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,3 +1,10 @@ +// File : globals.h +// Created : 14/01/2005 +// Author : Vadim SANDLER +// Project : SALOME +// Module : Installation Wizard +// Copyright : 2004-2005 CEA + #if !defined( ___GLOBALS ) #define ___GLOBALS diff --git a/src/icons.h b/src/icons.h index be61dec..ae908b8 100644 --- a/src/icons.h +++ b/src/icons.h @@ -2,9 +2,8 @@ // Created : Thu Mar 27 12:01:00 2003 // Author : Vadim SANDLER // Project : SALOME -// Module : InstallWizard -// Copyright : 2003 CEA/DEN, EDF R&D -// $Header$ +// Module : Installation Wizard +// Copyright : 2004-2005 CEA #ifndef ICONS_SALOME_INSTALL_H #define ICONS_SALOME_INSTALL_H