From: azv Date: Tue, 10 Jan 2017 08:07:07 +0000 (+0300) Subject: Remove workaround for loading SketchPlugin on Debian 6.0. X-Git-Tag: V_2.7.0~346^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bdf37811c7072a6c70bcbdd89743384f76476c48;hp=b27ed963fce6b3bd949e257270125981f539a577;p=modules%2Fshaper.git Remove workaround for loading SketchPlugin on Debian 6.0. Debian 6.0 support has been stopped. --- diff --git a/src/Model/Model_Session.cpp b/src/Model/Model_Session.cpp index 5bb981ea3..9d13485f3 100644 --- a/src/Model/Model_Session.cpp +++ b/src/Model/Model_Session.cpp @@ -473,22 +473,3 @@ int Model_Session::transactionID() { return ROOT_DOC->transactionID(); } - -void Model_Session::forceLoadPlugin(const std::string& thePluginName) -{ - // load all information about plugins, features and attributes - LoadPluginsInfo(); - - // store name of current plugin for further restoring, - // because forceLoadPlugin may be called while loading another plugin - std::string aCurrentPluginName = myCurrentPluginName; - - myCurrentPluginName = thePluginName; - if (myPluginObjs.find(myCurrentPluginName) == myPluginObjs.end()) { - // load plugin library if not yet done - Config_ModuleReader::loadPlugin(myCurrentPluginName); - } - - // restore current plugin - myCurrentPluginName = aCurrentPluginName; -} diff --git a/src/Model/Model_Session.h b/src/Model/Model_Session.h index d9f9f2c2d..2afa84a26 100644 --- a/src/Model/Model_Session.h +++ b/src/Model/Model_Session.h @@ -128,9 +128,6 @@ class Model_Session : public ModelAPI_Session, public Events_Listener /// Returns the global identifier of the current transaction (needed for the update algo) MODEL_EXPORT virtual int transactionID(); - /// Load plugin by its name - MODEL_EXPORT virtual void forceLoadPlugin(const std::string& thePluginName); - protected: /// Loads (if not done yet) the information about the features and plugins void LoadPluginsInfo(); diff --git a/src/ModelAPI/ModelAPI_Session.h b/src/ModelAPI/ModelAPI_Session.h index cc6987bd3..40984fb03 100644 --- a/src/ModelAPI/ModelAPI_Session.h +++ b/src/ModelAPI/ModelAPI_Session.h @@ -115,9 +115,6 @@ class MODELAPI_EXPORT ModelAPI_Session /// Returns the global identifier of the current transaction (needed for the update algo) virtual int transactionID() = 0; - /// Load plugin by its name - virtual void forceLoadPlugin(const std::string& thePluginName) = 0; - protected: /// Sets the session interface implementation (once per application launch) static void setSession(std::shared_ptr theManager); diff --git a/src/PythonAPI/model/sketcher/__init__.py b/src/PythonAPI/model/sketcher/__init__.py index 9231f5d32..7aa993434 100644 --- a/src/PythonAPI/model/sketcher/__init__.py +++ b/src/PythonAPI/model/sketcher/__init__.py @@ -1,16 +1,5 @@ """Package for Sketch plugin for the Parametric Geometry API of the Modeler. """ -# DEBIAN 6.0 WORKAROUND START -""" - Following code is used to support Debian 6.0. - It is kept, because SketchPlugin should be loaded before SketchAPI is first used. - Otherwise, the runtime error will be generated while some static inline methods are broken. -""" -from ModelAPI import ModelAPI_Session -aSession = ModelAPI_Session.get() -aSession.forceLoadPlugin("SketchPlugin") -# DEBIAN 6.0 WORKAROUND FINISH - from SketchAPI import addSketch from tools import addPolyline, addPolygon