|
11 | 11 | // IOrganizer must be bring here to properly compile the Python bindings of |
12 | 12 | // plugin requirements |
13 | 13 | #include <uibase/imoinfo.h> |
14 | | -#include <uibase/iprofile.h> |
15 | 14 | #include <uibase/isavegame.h> |
16 | 15 | #include <uibase/isavegameinfowidget.h> |
17 | 16 | #include <uibase/pluginrequirements.h> |
@@ -76,41 +75,6 @@ namespace mo2::python { |
76 | 75 | ~PySaveGameInfoWidget() { std::cout << "~PySaveGameInfoWidget()" << std::endl; } |
77 | 76 | }; |
78 | 77 |
|
79 | | - class PyProfile : public IProfile { |
80 | | - public: |
81 | | - QString name() const override |
82 | | - { |
83 | | - PYBIND11_OVERRIDE_PURE(QString, IProfile, name, ); |
84 | | - } |
85 | | - |
86 | | - QString absolutePath() const override |
87 | | - { |
88 | | - PYBIND11_OVERRIDE_PURE(QString, IProfile, absolutePath, ); |
89 | | - } |
90 | | - |
91 | | - bool localSavesEnabled() const override |
92 | | - { |
93 | | - PYBIND11_OVERRIDE_PURE(bool, IProfile, localSavesEnabled, ); |
94 | | - } |
95 | | - |
96 | | - bool localSettingsEnabled() const override |
97 | | - { |
98 | | - PYBIND11_OVERRIDE_PURE(bool, IProfile, localSettingsEnabled, ); |
99 | | - } |
100 | | - |
101 | | - bool invalidationActive(bool* supported) const override |
102 | | - { |
103 | | - PYBIND11_OVERRIDE_PURE(bool, IProfile, invalidationActive, supported); |
104 | | - } |
105 | | - |
106 | | - QString absoluteIniFilePath(QString iniFile) const override |
107 | | - { |
108 | | - PYBIND11_OVERRIDE_PURE(QString, IProfile, absoluteIniFilePath, iniFile); |
109 | | - } |
110 | | - |
111 | | - ~PyProfile() { std::cout << "~PyProfile()" << std::endl; } |
112 | | - }; |
113 | | - |
114 | 78 | void add_wrapper_bindings(pybind11::module_ m) |
115 | 79 | { |
116 | 80 | // ISaveGame - custom type_caster<> for shared_ptr<> to keep the Python object |
@@ -151,24 +115,6 @@ namespace mo2::python { |
151 | 115 | .def("longDescription", &IPluginRequirement::Problem::longDescription); |
152 | 116 |
|
153 | 117 | iPluginRequirementClass.def("check", &IPluginRequirement::check, "organizer"_a); |
154 | | - |
155 | | - // IProfile - custom type_caster<> for shared_ptr<> to keep the Python object |
156 | | - // alive when returned from Python (see shared_cpp_owner.h) |
157 | | - |
158 | | - // must be done BEFORE imodlist because there is a default argument to a |
159 | | - // IProfile* in the modlist class |
160 | | - py::class_<IProfile, PyProfile, std::shared_ptr<IProfile>>(m, "IProfile") |
161 | | - .def("name", &IProfile::name) |
162 | | - .def("absolutePath", &IProfile::absolutePath) |
163 | | - .def("localSavesEnabled", &IProfile::localSavesEnabled) |
164 | | - .def("localSettingsEnabled", &IProfile::localSettingsEnabled) |
165 | | - .def("invalidationActive", |
166 | | - [](const IProfile* p) { |
167 | | - bool supported; |
168 | | - bool active = p->invalidationActive(&supported); |
169 | | - return std::make_tuple(active, supported); |
170 | | - }) |
171 | | - .def("absoluteIniFilePath", &IProfile::absoluteIniFilePath, "inifile"_a); |
172 | 118 | } |
173 | 119 |
|
174 | 120 | } // namespace mo2::python |
0 commit comments