From 07a2182674cc0b1c00e9636c1845192832bd0706 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 9 Nov 2016 12:15:15 +0100 Subject: [PATCH] remove obsolete class ViewProviderPythonFeaturePy --- src/Gui/CMakeLists.txt | 3 -- src/Gui/ViewProvider.h | 3 -- src/Gui/ViewProviderPythonFeature.cpp | 1 - src/Gui/ViewProviderPythonFeature.h | 6 +-- src/Gui/ViewProviderPythonFeaturePy.xml | 17 -------- src/Gui/ViewProviderPythonFeaturePyImp.cpp | 50 ---------------------- 6 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 src/Gui/ViewProviderPythonFeaturePy.xml delete mode 100644 src/Gui/ViewProviderPythonFeaturePyImp.cpp diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index d6b367c71..20ec8963d 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -119,7 +119,6 @@ generate_from_xml(DocumentPy) generate_from_xml(PythonWorkbenchPy) generate_from_xml(ViewProviderPy) generate_from_xml(ViewProviderDocumentObjectPy) -generate_from_xml(ViewProviderPythonFeaturePy) generate_from_xml(WorkbenchPy) generate_from_xml(SelectionObjectPy) @@ -128,7 +127,6 @@ generate_from_py(FreeCADGuiInit GuiInitScript.h) # The XML files SET(FreeCADGui_XML_SRCS ViewProviderDocumentObjectPy.xml - ViewProviderPythonFeaturePy.xml ViewProviderPy.xml PythonWorkbenchPy.xml WorkbenchPy.xml @@ -829,7 +827,6 @@ SET(Viewprovider_CPP_SRCS ViewProviderDocumentObject.cpp ViewProviderDocumentObjectGroup.cpp ViewProviderDocumentObjectPyImp.cpp - ViewProviderPythonFeaturePyImp.cpp ViewProviderExtern.cpp ViewProviderFeature.cpp ViewProviderGeometryObject.cpp diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index a3da5ee44..27de3423e 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -367,9 +367,6 @@ private: int viewOverrideMode; std::string _sCurrentMode; std::map _sDisplayMaskModes; - - // friends - friend class ViewProviderPythonFeaturePy; }; } // namespace Gui diff --git a/src/Gui/ViewProviderPythonFeature.cpp b/src/Gui/ViewProviderPythonFeature.cpp index b910d0667..eede9551b 100644 --- a/src/Gui/ViewProviderPythonFeature.cpp +++ b/src/Gui/ViewProviderPythonFeature.cpp @@ -52,7 +52,6 @@ #endif #include "ViewProviderPythonFeature.h" -#include "ViewProviderPythonFeaturePy.h" #include "Tree.h" #include "Window.h" #include "Application.h" diff --git a/src/Gui/ViewProviderPythonFeature.h b/src/Gui/ViewProviderPythonFeature.h index 4ee3b9580..900a63ec8 100644 --- a/src/Gui/ViewProviderPythonFeature.h +++ b/src/Gui/ViewProviderPythonFeature.h @@ -25,7 +25,6 @@ #define GUI_VIEWPROVIDERPYTHONFEATURE_H #include -#include #include #include @@ -358,10 +357,7 @@ public: //@} PyObject* getPyObject() { - if (!ViewProviderT::pyViewObject) - ViewProviderT::pyViewObject = new ViewProviderPythonFeaturePy(this); - ViewProviderT::pyViewObject->IncRef(); - return ViewProviderT::pyViewObject; + return ViewProviderT::getPyObject(); } protected: diff --git a/src/Gui/ViewProviderPythonFeaturePy.xml b/src/Gui/ViewProviderPythonFeaturePy.xml deleted file mode 100644 index 19727c0e6..000000000 --- a/src/Gui/ViewProviderPythonFeaturePy.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - This is the view provider class for Python features - - - diff --git a/src/Gui/ViewProviderPythonFeaturePyImp.cpp b/src/Gui/ViewProviderPythonFeaturePyImp.cpp deleted file mode 100644 index 3fe07ae43..000000000 --- a/src/Gui/ViewProviderPythonFeaturePyImp.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2009 Werner Mayer * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library 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 Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif - -#include "Gui/ViewProviderPythonFeature.h" -#include - -// inclusion of the generated files (generated out of ViewProviderPythonFeaturePy.xml) -#include "ViewProviderPythonFeaturePy.h" -#include "ViewProviderPythonFeaturePy.cpp" - -using namespace Gui; - -// returns a string which represents the object e.g. when printed in python -std::string ViewProviderPythonFeaturePy::representation(void) const -{ - return ""; -} - -PyObject *ViewProviderPythonFeaturePy::getCustomAttributes(const char* attr) const -{ - return 0; -} - -int ViewProviderPythonFeaturePy::setCustomAttributes(const char* attr, PyObject *value) -{ - return 0; -}