From f25602cc6930bde36237b222b8069d49dd4651b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Fri, 1 May 2020 21:30:31 +0200 Subject: [PATCH] Update the wrapper and the python interface after change to IModInterface. --- src/runner/pythonrunner.cpp | 4 ++-- src/runner/uibasewrappers.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index 8fdd89c..01fb6c1 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -622,7 +622,7 @@ struct QClass_converters wrapper = reinterpret_cast(objPtr); return wrapper->super.data; } else { - if (std::is_same_v) + if constexpr (std::is_same_v) { // QStringLists aren't wrapped by PyQt - regular Python string/unicode lists are used instead bpy::extract> extractor(objPtr); @@ -994,7 +994,7 @@ BOOST_PYTHON_MODULE(mobase) .def("addCategory", bpy::pure_virtual(&IModInterface::addCategory)) .def("removeCategory", bpy::pure_virtual(&IModInterface::removeCategory)) .def("categories", bpy::pure_virtual(&IModInterface::categories)) - .def("setGameName", bpy::pure_virtual(&IModInterface::setGameName)) + .def("setGamePlugin", bpy::pure_virtual(&IModInterface::setGamePlugin)) .def("setName", bpy::pure_virtual(&IModInterface::setName)) .def("remove", bpy::pure_virtual(&IModInterface::remove)) ; diff --git a/src/runner/uibasewrappers.h b/src/runner/uibasewrappers.h index b31bb60..d37f422 100644 --- a/src/runner/uibasewrappers.h +++ b/src/runner/uibasewrappers.h @@ -443,12 +443,12 @@ struct IModInterfaceWrapper: MOBase::IModInterface, boost::python::wrapperget_override("setNexusID")(nexusID); } virtual void setInstallationFile(const QString &fileName) override { this->get_override("setInstallationFile")(fileName); } virtual void addNexusCategory(int categoryID) override { this->get_override("addNexusCategory")(categoryID); } - virtual void setGameName(const QString &gameName) override { this->get_override("setGameName")(gameName); } + virtual void setGamePlugin(const MOBase::IPluginGame *gamePlugin) override { this->get_override("setGamePlugin")(gamePlugin); } virtual bool setName(const QString &name) override { return this->get_override("setName")(name); } virtual bool remove() override { return this->get_override("remove")(); } virtual void addCategory(const QString &categoryName) override { this->get_override("addCategory")(categoryName); } virtual bool removeCategory(const QString &categoryName) override { return this->get_override("removeCategory")(categoryName); } - virtual QStringList categories() override { return this->get_override("categories")(); } + virtual QStringList categories() const override { return this->get_override("categories")(); } };