From 94af4ec895b822830fee5b655e1b9908cff67fdf Mon Sep 17 00:00:00 2001 From: smh Date: Fri, 30 Apr 2004 13:41:10 +0000 Subject: [PATCH] Fix on concurent scripts execution --- src/SALOMEGUI/PyInterp_base.cxx | 43 +++++++++------------------------ src/SALOMEGUI/QAD_PyEditor.cxx | 12 ++++----- src/SALOMEGUI/QAD_PyEditor.h | 11 ++++++--- src/SALOMEGUI/QAD_Study.cxx | 1 + 4 files changed, 26 insertions(+), 41 deletions(-) diff --git a/src/SALOMEGUI/PyInterp_base.cxx b/src/SALOMEGUI/PyInterp_base.cxx index d460ee541..a61c1c195 100644 --- a/src/SALOMEGUI/PyInterp_base.cxx +++ b/src/SALOMEGUI/PyInterp_base.cxx @@ -26,8 +26,10 @@ using namespace std; #ifdef _DEBUG_ static int MYDEBUG = 0; +static int MYPYDEBUG = 0; #else static int MYDEBUG = 0; +static int MYPYDEBUG = 0; #endif @@ -38,32 +40,14 @@ PyLockWrapper::PyLockWrapper(PyThreadState* theThreadState): myThreadState(theThreadState), mySaveThreadState(PyInterp_base::_gtstate) { - //if(MYDEBUG) MESSAGE(" PyLockWrapper(...) - myThreadState = "<>> "; setText(_currentPrompt); break; diff --git a/src/SALOMEGUI/QAD_PyEditor.h b/src/SALOMEGUI/QAD_PyEditor.h index 94c92c3af..c5596f441 100644 --- a/src/SALOMEGUI/QAD_PyEditor.h +++ b/src/SALOMEGUI/QAD_PyEditor.h @@ -35,12 +35,13 @@ class QMutex; class QAD_PyInterp; -class TInitEditorThread; -class TExecCommandThread; class QAD_PyEditor : public QTextEdit { - Q_OBJECT + Q_OBJECT; + + friend class TInitEditorThread; + friend class TExecCommandThread; public: enum { PYTHON_OK = QEvent::User + 5000, PYTHON_ERROR, PYTHON_INCOMPLETE, @@ -77,6 +78,10 @@ private: QMutex* myExecCommandMutex; TInitEditorThread* myInitEditorThread; TExecCommandThread* myExecCommandThread; + + QString myBanner; + QString myOutput; + QString myError; }; #endif diff --git a/src/SALOMEGUI/QAD_Study.cxx b/src/SALOMEGUI/QAD_Study.cxx index fbd95d9e4..f43c8714f 100644 --- a/src/SALOMEGUI/QAD_Study.cxx +++ b/src/SALOMEGUI/QAD_Study.cxx @@ -171,6 +171,7 @@ QAD_Study::~QAD_Study () delete myInitStudyThread; } delete myMutex; + delete myInterp; } } -- 2.39.2