Skip to content

Commit

Permalink
Fix after rebasing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jun 29, 2024
1 parent 1327bf1 commit e318999
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 24 deletions.
4 changes: 4 additions & 0 deletions src/mobase/wrappers/basic_classes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
#include <format>

#include <executableinfo.h>
#include <extension.h>
#include <filemapping.h>
#include <guessedvalue.h>
#include <idownloadmanager.h>
#include <iextensionlist.h>
#include <igamefeatures.h>
#include <iinstallationmanager.h>
#include <imodinterface.h>
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions src/mobase/wrappers/pyplugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
16 changes: 0 additions & 16 deletions src/mobase/wrappers/pyplugins.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<PluginSetting> settings() const override
{
PYBIND11_OVERRIDE_PURE(QList<PluginSetting>, PluginBase, settings, );
Expand Down
1 change: 1 addition & 0 deletions tests/mocks/MockOrganizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class MockOrganizer : public IOrganizer {
MOCK_METHOD(std::shared_ptr<const IFileTree>, 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));
Expand Down
3 changes: 0 additions & 3 deletions tests/runner/test_iplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ TEST(IPlugin, Basic)
const IPlugin* plugin = qobject_cast<IPlugin*>(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();
Expand Down

0 comments on commit e318999

Please sign in to comment.