From e318999e8385bcb7b13049b684027cf657349baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Fri, 10 Nov 2023 10:46:45 +0100 Subject: [PATCH] Fix after rebasing. --- src/mobase/wrappers/basic_classes.cpp | 4 ++++ src/mobase/wrappers/pyplugins.cpp | 5 ----- src/mobase/wrappers/pyplugins.h | 16 ---------------- tests/mocks/MockOrganizer.h | 1 + tests/runner/test_iplugin.cpp | 3 --- 5 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/mobase/wrappers/basic_classes.cpp b/src/mobase/wrappers/basic_classes.cpp index c594362..ed06039 100644 --- a/src/mobase/wrappers/basic_classes.cpp +++ b/src/mobase/wrappers/basic_classes.cpp @@ -5,9 +5,11 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -517,6 +519,8 @@ namespace mo2::python { py::return_value_policy::reference) .def("pluginList", &IOrganizer::pluginList, py::return_value_policy::reference) + .def("extensionList", &IOrganizer::extensionList, + py::return_value_policy::reference) .def("modList", &IOrganizer::modList, py::return_value_policy::reference) .def("gameFeatures", &IOrganizer::gameFeatures, py::return_value_policy::reference) diff --git a/src/mobase/wrappers/pyplugins.cpp b/src/mobase/wrappers/pyplugins.cpp index 21fd436..3b3935c 100644 --- a/src/mobase/wrappers/pyplugins.cpp +++ b/src/mobase/wrappers/pyplugins.cpp @@ -144,11 +144,6 @@ namespace mo2::python { .def("init", &IPlugin::init, "organizer"_a) .def("name", &IPlugin::name) .def("localizedName", &IPlugin::localizedName) - .def("master", &IPlugin::master) - .def("author", &IPlugin::author) - .def("description", &IPlugin::description) - .def("version", &IPlugin::version) - .def("requirements", &IPlugin::requirements) .def("settings", &IPlugin::settings) .def("enabledByDefault", &IPlugin::enabledByDefault); diff --git a/src/mobase/wrappers/pyplugins.h b/src/mobase/wrappers/pyplugins.h index ff2b479..ac70b5e 100644 --- a/src/mobase/wrappers/pyplugins.h +++ b/src/mobase/wrappers/pyplugins.h @@ -45,22 +45,6 @@ namespace mo2::python { { PYBIND11_OVERRIDE(QString, PluginBase, localizedName, ); } - QString master() const override - { - PYBIND11_OVERRIDE(QString, PluginBase, master, ); - } - QString author() const override - { - PYBIND11_OVERRIDE_PURE(QString, PluginBase, author, ); - } - QString description() const override - { - PYBIND11_OVERRIDE_PURE(QString, PluginBase, description, ); - } - VersionInfo version() const override - { - PYBIND11_OVERRIDE_PURE(VersionInfo, PluginBase, version, ); - } QList settings() const override { PYBIND11_OVERRIDE_PURE(QList, PluginBase, settings, ); diff --git a/tests/mocks/MockOrganizer.h b/tests/mocks/MockOrganizer.h index 5ef98e8..06cf656 100644 --- a/tests/mocks/MockOrganizer.h +++ b/tests/mocks/MockOrganizer.h @@ -34,6 +34,7 @@ class MockOrganizer : public IOrganizer { MOCK_METHOD(std::shared_ptr, virtualFileTree, (), (const, override)); MOCK_METHOD(MOBase::IDownloadManager*, downloadManager, (), (const, override)); MOCK_METHOD(MOBase::IPluginList*, pluginList, (), (const, override)); + MOCK_METHOD(MOBase::IExtensionList&, extensionList, (), (const, override)); MOCK_METHOD(MOBase::IModList*, modList, (), (const, override)); MOCK_METHOD(MOBase::IProfile*, profile, (), (const, override)); MOCK_METHOD(MOBase::IGameFeatures*, gameFeatures, (), (const, override)); diff --git a/tests/runner/test_iplugin.cpp b/tests/runner/test_iplugin.cpp index 8531ea6..9527670 100644 --- a/tests/runner/test_iplugin.cpp +++ b/tests/runner/test_iplugin.cpp @@ -25,10 +25,7 @@ TEST(IPlugin, Basic) const IPlugin* plugin = qobject_cast(objects[0][0]); EXPECT_NE(plugin, nullptr); - EXPECT_EQ(plugin->author(), "The Author"); EXPECT_EQ(plugin->name(), "The Name"); - EXPECT_EQ(plugin->version(), VersionInfo(1, 3, 0)); - EXPECT_EQ(plugin->description(), "The Description"); // settings const auto settings = plugin->settings();