mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
removed unused IOrganizer from PythonRunner
This commit is contained in:
@@ -110,7 +110,7 @@ ProxyPython::~ProxyPython()
|
||||
}
|
||||
}
|
||||
|
||||
typedef IPythonRunner* (*CreatePythonRunner_func)(const MOBase::IOrganizer *moInfo, const QString &pythonPath);
|
||||
typedef IPythonRunner* (*CreatePythonRunner_func)(const QString &pythonPath);
|
||||
|
||||
|
||||
bool ProxyPython::init(IOrganizer *moInfo)
|
||||
@@ -170,7 +170,7 @@ bool ProxyPython::init(IOrganizer *moInfo)
|
||||
m_MOInfo->setPersistent(name(), "tryInit", true);
|
||||
}
|
||||
|
||||
m_Runner = CreatePythonRunner(moInfo, pythonPath);
|
||||
m_Runner = CreatePythonRunner(pythonPath);
|
||||
|
||||
if (m_MOInfo) {
|
||||
m_MOInfo->setPersistent(name(), "tryInit", false);
|
||||
|
||||
@@ -1035,7 +1035,7 @@ class PythonRunner : public IPythonRunner
|
||||
{
|
||||
|
||||
public:
|
||||
PythonRunner(const MOBase::IOrganizer* moInfo);
|
||||
PythonRunner();
|
||||
bool initPython(const QString& pythonDir);
|
||||
QList<QObject*> instantiate(const QString& pluginName);
|
||||
bool isPythonInstalled() const;
|
||||
@@ -1066,13 +1066,12 @@ private:
|
||||
// List of python objects representing plugins to keep all the bpy::object "alive"
|
||||
// during the execution.
|
||||
std::vector<bpy::object> m_PythonObjects;
|
||||
const MOBase::IOrganizer* m_MOInfo;
|
||||
wchar_t* m_PythonHome;
|
||||
};
|
||||
|
||||
IPythonRunner* CreatePythonRunner(MOBase::IOrganizer* moInfo, const QString& pythonDir)
|
||||
IPythonRunner* CreatePythonRunner(const QString& pythonDir)
|
||||
{
|
||||
PythonRunner* result = new PythonRunner(moInfo);
|
||||
PythonRunner* result = new PythonRunner;
|
||||
if (result->initPython(pythonDir)) {
|
||||
return result;
|
||||
}
|
||||
@@ -1082,8 +1081,7 @@ IPythonRunner* CreatePythonRunner(MOBase::IOrganizer* moInfo, const QString& pyt
|
||||
}
|
||||
}
|
||||
|
||||
PythonRunner::PythonRunner(const MOBase::IOrganizer *moInfo)
|
||||
: m_MOInfo(moInfo)
|
||||
PythonRunner::PythonRunner()
|
||||
{
|
||||
m_PythonHome = new wchar_t[MAX_PATH + 1];
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
#define PYDLLEXPORT Q_DECL_IMPORT
|
||||
#endif // PYTHONRUNNER_LIBRARY
|
||||
|
||||
extern "C" PYDLLEXPORT IPythonRunner *CreatePythonRunner(MOBase::IOrganizer *moInfo, const QString &pythonDir);
|
||||
extern "C" PYDLLEXPORT IPythonRunner *CreatePythonRunner(const QString &pythonDir);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user