From b42090169706ab83bc81150b05b5ba0225a8e3a6 Mon Sep 17 00:00:00 2001 From: andrea Date: Mon, 11 Jul 2022 19:59:05 +0200 Subject: [PATCH] Remove 2 deprecate PyCFunction --- src/App/ApplicationPy.cpp | 4 ---- src/Mod/Image/InitGui.py | 2 +- src/Mod/Spreadsheet/InitGui.py | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/App/ApplicationPy.cpp b/src/App/ApplicationPy.cpp index f73d04776e..96793ee80e 100644 --- a/src/App/ApplicationPy.cpp +++ b/src/App/ApplicationPy.cpp @@ -66,10 +66,6 @@ PyMethodDef Application::Methods[] = { "Change the import module name of a registered filetype"}, {"getImportType", (PyCFunction) Application::sGetImportType, METH_VARARGS, "Get the name of the module that can import the filetype"}, - {"EndingAdd", (PyCFunction) Application::sAddImportType, METH_VARARGS, // deprecated - "deprecated -- use addImportType"}, - {"EndingGet", (PyCFunction) Application::sGetImportType, METH_VARARGS, // deprecated - "deprecated -- use getImportType"}, {"addExportType", (PyCFunction) Application::sAddExportType, METH_VARARGS, "Register filetype for export"}, {"changeExportModule", (PyCFunction) Application::sChangeExportModule, METH_VARARGS, diff --git a/src/Mod/Image/InitGui.py b/src/Mod/Image/InitGui.py index 168f6d2860..88bdc05343 100644 --- a/src/Mod/Image/InitGui.py +++ b/src/Mod/Image/InitGui.py @@ -53,4 +53,4 @@ class ImageWorkbench ( Workbench ): Gui.addWorkbench(ImageWorkbench()) # Append the open handler -FreeCAD.EndingAdd("Image formats (*.bmp *.jpg *.png *.xpm)","ImageGui") +FreeCAD.addImportType("Image formats (*.bmp *.jpg *.png *.xpm)","ImageGui") diff --git a/src/Mod/Spreadsheet/InitGui.py b/src/Mod/Spreadsheet/InitGui.py index dda6423eb7..8a8b7b2a1e 100644 --- a/src/Mod/Spreadsheet/InitGui.py +++ b/src/Mod/Spreadsheet/InitGui.py @@ -45,4 +45,4 @@ class SpreadsheetWorkbench ( Workbench ): Gui.addWorkbench(SpreadsheetWorkbench()) # Append the open handler -FreeCAD.EndingAdd("Spreadsheet formats (*.csv)","SpreadsheetGui") +FreeCAD.addImportType("Spreadsheet formats (*.csv)","SpreadsheetGui")