From 2b560b6cbccba3201c59a4cf24143e4c7578516a Mon Sep 17 00:00:00 2001 From: env Date: Mon, 8 Aug 2005 04:56:06 +0000 Subject: [PATCH] ENV: Windows porting --- src/GLViewer/GLViewer_Tools.cxx | 4 +++- src/Plot2d/Plot2d_ViewFrame.cxx | 2 +- src/PyInterp/PyInterp_base.cxx | 4 ++++ src/PyInterp/PyInterp_base.h | 2 ++ src/Qtx/QtxActionMgr.cxx | 2 +- src/STD/STD_Application.cxx | 2 +- src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h | 4 +++- src/TOOLSGUI/ToolsGUI_HelpWindow.cxx | 3 ++- src/TOOLSGUI/ToolsGUI_IntervalWindow.h | 2 ++ src/TOOLSGUI/ToolsGUI_RegWidget.h | 6 ++++-- 10 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/GLViewer/GLViewer_Tools.cxx b/src/GLViewer/GLViewer_Tools.cxx index dcf259da8..5af5cd9bb 100644 --- a/src/GLViewer/GLViewer_Tools.cxx +++ b/src/GLViewer/GLViewer_Tools.cxx @@ -7,7 +7,9 @@ #include -#include +#include + +using namespace std; /**************************************************************************** ** Class: GLViewer_LineList diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 912dea7eb..10937b029 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -25,7 +25,7 @@ #include #include -#include +#include #include //#include "utilities.h" diff --git a/src/PyInterp/PyInterp_base.cxx b/src/PyInterp/PyInterp_base.cxx index 50e2b4ba9..525f87719 100644 --- a/src/PyInterp/PyInterp_base.cxx +++ b/src/PyInterp/PyInterp_base.cxx @@ -205,7 +205,11 @@ int compile_command(const char *command,PyObject *context) return 1; }else{ // Complete and correct text. We evaluate it. +#ifndef WNT PyObjWrapper r(PyEval_EvalCode(v,context,context)); +#else + PyObjWrapper r(PyEval_EvalCode((PyCodeObject *)&v,context,context)); +#endif if(!r){ // Execution error. We return -1 PyErr_Print(); diff --git a/src/PyInterp/PyInterp_base.h b/src/PyInterp/PyInterp_base.h index ff39c5a33..63a11f82f 100644 --- a/src/PyInterp/PyInterp_base.h +++ b/src/PyInterp/PyInterp_base.h @@ -24,7 +24,9 @@ #include // must be before qt includes ... +#ifndef WNT extern "C" PyObject * PyEval_EvalCode(PyObject *co, PyObject *g, PyObject *l); +#endif #define TOP_HISTORY_PY "--- top of history ---" #define BEGIN_HISTORY_PY "--- begin of history ---" diff --git a/src/Qtx/QtxActionMgr.cxx b/src/Qtx/QtxActionMgr.cxx index 93e8bbadf..4c8a6aab1 100644 --- a/src/Qtx/QtxActionMgr.cxx +++ b/src/Qtx/QtxActionMgr.cxx @@ -381,7 +381,7 @@ void QtxActionMgr::XMLReader::read( const QDomNode& parent_node, for( int i=0, n=children.count(); i #include -#include +#include /*!Create and return new instance of STD_Application*/ extern "C" STD_EXPORT SUIT_Application* createApplication() diff --git a/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h b/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h index 9d474ac67..5da0d5cc6 100755 --- a/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h +++ b/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h @@ -31,6 +31,8 @@ #include +#include + class QLineEdit; class QPushButton; @@ -38,7 +40,7 @@ class QPushButton; // class : ToolsGUI_CatalogGeneratorDlg // purpose : //================================================================================= -class ToolsGUI_CatalogGeneratorDlg : public QDialog +class Standard_EXPORT ToolsGUI_CatalogGeneratorDlg : public QDialog { Q_OBJECT diff --git a/src/TOOLSGUI/ToolsGUI_HelpWindow.cxx b/src/TOOLSGUI/ToolsGUI_HelpWindow.cxx index e45d7fcc8..bd1ed427a 100755 --- a/src/TOOLSGUI/ToolsGUI_HelpWindow.cxx +++ b/src/TOOLSGUI/ToolsGUI_HelpWindow.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; # include "ToolsGUI_HelpWindow.h" # include "utilities.h" @@ -35,6 +34,8 @@ using namespace std; # include # include +using namespace std; + ToolsGUI_HelpWindow::ToolsGUI_HelpWindow(QWidget* parent, const char* name ) : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose ) { diff --git a/src/TOOLSGUI/ToolsGUI_IntervalWindow.h b/src/TOOLSGUI/ToolsGUI_IntervalWindow.h index 876c08469..40c1f1af1 100755 --- a/src/TOOLSGUI/ToolsGUI_IntervalWindow.h +++ b/src/TOOLSGUI/ToolsGUI_IntervalWindow.h @@ -16,7 +16,9 @@ # include # include +#ifndef WNT using namespace std; +#endif class ToolsGUI_IntervalWindow : public QDialog { diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.h b/src/TOOLSGUI/ToolsGUI_RegWidget.h index 2fa72b754..b2ff85087 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.h +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.h @@ -45,10 +45,12 @@ class QTextView; class QPushButton; #endif +#include + class ToolsGUI_HelpWindow; class ToolsGUI_IntervalWindow; -class ToolsGUI_InfoWindow : public QMainWindow { +class Standard_EXPORT ToolsGUI_InfoWindow : public QMainWindow { public: ToolsGUI_InfoWindow( QWidget* parent = 0, const char* name = 0); @@ -62,7 +64,7 @@ private: QTextView* myTextView; }; -class ToolsGUI_RegWidget : public QMainWindow +class Standard_EXPORT ToolsGUI_RegWidget : public QMainWindow { Q_OBJECT -- 2.39.2