From 996c1d1c936f30c45928d209a166f0aeaae2f850 Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Thu, 22 Jan 2009 11:37:42 +0000 Subject: [PATCH] compile the X11 QApplication constructor only on X11 platforms --- hurricane/src/hviewer/BreakpointWidget.cpp | 2 +- hurricane/src/hviewer/HApplication.cpp | 2 + .../hurricane/viewer/BreakpointWidget.h | 2 +- .../hviewer/hurricane/viewer/HApplication.h | 2 + hurricane/src/isobar/PyComponent.cpp | 48 ++----------------- hurricane/src/isobar/PyContact.cpp | 2 - hurricane/src/isobar/PyEntity.cpp | 47 ++---------------- hurricane/src/isobar/PyLayer.cpp | 3 +- hurricane/src/isobar/PySegment.cpp | 34 ------------- hurricane/src/isobar/PyTransformation.cpp | 34 ------------- 10 files changed, 17 insertions(+), 159 deletions(-) diff --git a/hurricane/src/hviewer/BreakpointWidget.cpp b/hurricane/src/hviewer/BreakpointWidget.cpp index 9e63cc01..84035302 100644 --- a/hurricane/src/hviewer/BreakpointWidget.cpp +++ b/hurricane/src/hviewer/BreakpointWidget.cpp @@ -89,7 +89,7 @@ namespace Hurricane { } - int BreakpointWidget::raiseFinished ( int ) + void BreakpointWidget::raiseFinished ( int ) { _isFinished = true; } diff --git a/hurricane/src/hviewer/HApplication.cpp b/hurricane/src/hviewer/HApplication.cpp index a3b90fcb..019c3f79 100644 --- a/hurricane/src/hviewer/HApplication.cpp +++ b/hurricane/src/hviewer/HApplication.cpp @@ -58,6 +58,7 @@ namespace Hurricane { { } +#if defined(Q_WS_X11) HApplication::HApplication ( Display* display, Qt::HANDLE visual, Qt::HANDLE colormap ) : QApplication ( display, visual, colormap ) { } @@ -66,6 +67,7 @@ namespace Hurricane { HApplication::HApplication ( Display* display, int& argc, char** argv, Qt::HANDLE visual, Qt::HANDLE colormap ) : QApplication ( display, argc, argv, visual, colormap ) { } +#endif bool HApplication::notify ( QObject* object, QEvent* event ) diff --git a/hurricane/src/hviewer/hurricane/viewer/BreakpointWidget.h b/hurricane/src/hviewer/hurricane/viewer/BreakpointWidget.h index 8ad369a6..de01fa2c 100644 --- a/hurricane/src/hviewer/hurricane/viewer/BreakpointWidget.h +++ b/hurricane/src/hviewer/hurricane/viewer/BreakpointWidget.h @@ -47,7 +47,7 @@ namespace Hurricane { public slots: void updateStopLevel ( int ); protected slots: - int raiseFinished ( int ); + void raiseFinished ( int ); private: QLabel* _message; diff --git a/hurricane/src/hviewer/hurricane/viewer/HApplication.h b/hurricane/src/hviewer/hurricane/viewer/HApplication.h index dbe0faf3..4723aede 100644 --- a/hurricane/src/hviewer/hurricane/viewer/HApplication.h +++ b/hurricane/src/hviewer/hurricane/viewer/HApplication.h @@ -41,8 +41,10 @@ namespace Hurricane { HApplication ( int& argc, char** argv ); HApplication ( int& argc, char** argv, bool GUIenabled ); HApplication ( int& argc, char** argv, Type type ); +#if defined(Q_WS_X11) HApplication ( Display*, Qt::HANDLE visual=0, Qt::HANDLE colormap=0 ); HApplication ( Display*, int& argc, char** argv, Qt::HANDLE visual=0, Qt::HANDLE colormap=0 ); +#endif virtual bool notify ( QObject*, QEvent* ); }; diff --git a/hurricane/src/isobar/PyComponent.cpp b/hurricane/src/isobar/PyComponent.cpp index bdc5fde6..78d88b6e 100644 --- a/hurricane/src/isobar/PyComponent.cpp +++ b/hurricane/src/isobar/PyComponent.cpp @@ -1,37 +1,3 @@ - -// -*- C++ -*- -// -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it -// and/or modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 of -// the License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA -// -// License-Tag -// Authors-Tag -// =================================================================== // // $Id: PyComponent.cpp,v 1.17 2008/02/07 17:09:41 xtof Exp $ // @@ -98,8 +64,7 @@ extern "C" { // --------------------------------------------------------------- // Attribute Method : "PyComponent_getPosition ()" - static PyObject* PyComponent_getPosition ( PyComponent *self ) - { + static PyObject* PyComponent_getPosition ( PyComponent *self ) { trace << "PyComponent_getPosition ()" << endl; METHOD_HEAD ( "Component.getPosition()" ) @@ -117,8 +82,7 @@ extern "C" { // --------------------------------------------------------------- // Attribute Method : "PyComponent_getNet ()" - static PyObject* PyComponent_getNet ( PyComponent *self ) - { + static PyObject* PyComponent_getNet ( PyComponent *self ) { trace << "PyComponent_getNet ()" << endl; Net* net = NULL; @@ -135,8 +99,7 @@ extern "C" { // --------------------------------------------------------------- // Attribute Method : "PyComponent_getLayer ()" - static PyObject* PyComponent_getLayer ( PyComponent *self ) - { + static PyObject* PyComponent_getLayer ( PyComponent *self ) { trace << "PyComponent_getLayer ()" << endl; METHOD_HEAD ( "Component.getLayer()" ) @@ -153,8 +116,7 @@ extern "C" { // --------------------------------------------------------------- // Attribute Method : "PyComponent_getBoundingBox ()" - static PyObject* PyComponent_getBoundingBox ( PyComponent *self ) - { + static PyObject* PyComponent_getBoundingBox ( PyComponent *self ) { trace << "PyComponent_getBoundingBox ()" << endl; METHOD_HEAD ( "Component.getBoundingBox()" ) @@ -195,7 +157,7 @@ extern "C" { PyTypeObjectLinkPyType(Component) -# else // End of Python Module Code Part. +#else // End of Python Module Code Part. // x=================================================================x diff --git a/hurricane/src/isobar/PyContact.cpp b/hurricane/src/isobar/PyContact.cpp index 851cdf10..2ce0f460 100644 --- a/hurricane/src/isobar/PyContact.cpp +++ b/hurricane/src/isobar/PyContact.cpp @@ -151,6 +151,4 @@ extern "C" { } // End of extern "C". - - } // End of Isobar namespace. diff --git a/hurricane/src/isobar/PyEntity.cpp b/hurricane/src/isobar/PyEntity.cpp index 5b1be577..bfc0d07d 100644 --- a/hurricane/src/isobar/PyEntity.cpp +++ b/hurricane/src/isobar/PyEntity.cpp @@ -1,37 +1,3 @@ - -// -*- C++ -*- -// -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it -// and/or modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 of -// the License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA -// -// License-Tag -// Authors-Tag -// =================================================================== // // $Id: PyEntity.cpp,v 1.8 2007/04/26 13:38:47 d2 Exp $ // @@ -93,8 +59,7 @@ extern "C" { // --------------------------------------------------------------- // Attribute Method : "PyEntity_getCell ()" - static PyObject* PyEntity_getCell ( PyEntity *self ) - { + static PyObject* PyEntity_getCell ( PyEntity *self ) { trace << "PyEntity_getCell ()" << endl; Cell* cell = NULL; @@ -131,7 +96,7 @@ extern "C" { PyTypeObjectLinkPyType(Entity) -# else // End of Python Module Code Part. +#else // End of Python Module Code Part. // x=================================================================x @@ -191,7 +156,7 @@ extern "C" { // PyEntity Object Definitions. -# endif // End of Shared Library Code Part. +#endif // End of Shared Library Code Part. } // End of extern "C". @@ -201,8 +166,7 @@ extern "C" { # if !defined(__PYTHON_MODULE__) -Hurricane::Entity* EntityCast ( PyObject* derivedObject ) -{ +Hurricane::Entity* EntityCast ( PyObject* derivedObject ) { if ( IsPyCell (derivedObject) ) return PYCELL_O(derivedObject); if ( IsPyInstance (derivedObject) ) return PYINSTANCE_O(derivedObject); if ( IsPyReference (derivedObject) ) return PYREFERENCE_O(derivedObject); @@ -216,8 +180,7 @@ Hurricane::Entity* EntityCast ( PyObject* derivedObject ) return NULL; } -# endif +#endif } // End of Isobar namespace. - diff --git a/hurricane/src/isobar/PyLayer.cpp b/hurricane/src/isobar/PyLayer.cpp index 15e34369..4b86d911 100644 --- a/hurricane/src/isobar/PyLayer.cpp +++ b/hurricane/src/isobar/PyLayer.cpp @@ -51,8 +51,7 @@ extern "C" { // --------------------------------------------------------------- // Attribute Method : "PyLayer_getTechnology ()" - static PyObject* PyLayer_getTechnology ( PyLayer *self ) - { + static PyObject* PyLayer_getTechnology ( PyLayer *self ) { trace << "PyLayer_getTechnology ()" << endl; Technology* techno = NULL; diff --git a/hurricane/src/isobar/PySegment.cpp b/hurricane/src/isobar/PySegment.cpp index 0552e3f4..58c5e1f7 100644 --- a/hurricane/src/isobar/PySegment.cpp +++ b/hurricane/src/isobar/PySegment.cpp @@ -1,37 +1,3 @@ - -// -*- C++ -*- -// -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it -// and/or modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 of -// the License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA -// -// License-Tag -// Authors-Tag -// =================================================================== // // $Id: PySegment.cpp,v 1.12 2008/02/07 17:09:42 xtof Exp $ // diff --git a/hurricane/src/isobar/PyTransformation.cpp b/hurricane/src/isobar/PyTransformation.cpp index fd91e4b4..acd8a671 100644 --- a/hurricane/src/isobar/PyTransformation.cpp +++ b/hurricane/src/isobar/PyTransformation.cpp @@ -1,37 +1,3 @@ - -// -*- C++ -*- -// -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it -// and/or modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 of -// the License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA -// -// License-Tag -// Authors-Tag -// =================================================================== // // $Id: PyTransformation.cpp,v 1.17 2007/01/30 14:47:24 cobell Exp $ //