From e6a87a17987de5d8e462634777df31e2cae5c1a6 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Wed, 4 Nov 2020 20:57:50 -0500 Subject: added IPlugin::registered() removed useless dummy interfaces because init() isn't called anymore python plugins currently broken because init() isn't called on them fixed create instance dialog being shown on startup even if portable instance existed display a message when the last instance can't be found fixed instance manager dialog failing to open the portable instance --- src/organizerproxy.cpp | 206 ------------------------------------------------- 1 file changed, 206 deletions(-) (limited to 'src/organizerproxy.cpp') diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index b2a4f791..45efc00c 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -287,209 +287,3 @@ bool OrganizerProxy::onPluginSettingChanged(std::functiononPluginSettingChanged(func); } - - - -DummyOrganizerProxy::DummyOrganizerProxy(MOBase::IPlugin* plugin) - : m_mods(new DummyModList), m_plugins(new DummyPluginList) -{ -} - -DummyOrganizerProxy::~DummyOrganizerProxy() = default; - -IModRepositoryBridge *DummyOrganizerProxy::createNexusBridge() const -{ - return nullptr; -} - -QString DummyOrganizerProxy::profileName() const -{ - return {}; -} - -QString DummyOrganizerProxy::profilePath() const -{ - return {}; -} - -QString DummyOrganizerProxy::downloadsPath() const -{ - return {}; -} - -QString DummyOrganizerProxy::overwritePath() const -{ - return {}; -} - -QString DummyOrganizerProxy::basePath() const -{ - return {}; -} - -QString DummyOrganizerProxy::modsPath() const -{ - return {}; -} - -VersionInfo DummyOrganizerProxy::appVersion() const -{ - return {}; -} - -IPluginGame *DummyOrganizerProxy::getGame(const QString &gameName) const -{ - return nullptr; -} - -IModInterface *DummyOrganizerProxy::createMod(MOBase::GuessedValue &name) -{ - return nullptr; -} - -void DummyOrganizerProxy::modDataChanged(IModInterface *mod) -{ -} - -QVariant DummyOrganizerProxy::pluginSetting(const QString &pluginName, const QString &key) const -{ - if (key == "enabled") { - return true; - } - - return {}; -} - -void DummyOrganizerProxy::setPluginSetting(const QString &pluginName, const QString &key, const QVariant &value) -{ -} - -QVariant DummyOrganizerProxy::persistent(const QString &pluginName, const QString &key, const QVariant &def) const -{ - return {}; -} - -void DummyOrganizerProxy::setPersistent(const QString &pluginName, const QString &key, const QVariant &value, bool sync) -{ -} - -QString DummyOrganizerProxy::pluginDataPath() const -{ - return qApp->applicationDirPath() + "/" + ToQString(AppConfig::pluginPath()) + "/data"; -} - -HANDLE DummyOrganizerProxy::startApplication( - const QString& exe, const QStringList& args, const QString &cwd, - const QString& profile, const QString &overwrite, bool ignoreOverwrite) -{ - return INVALID_HANDLE_VALUE; -} - -bool DummyOrganizerProxy::waitForApplication(HANDLE handle, LPDWORD exitCode) const -{ - return true; -} - -bool DummyOrganizerProxy::onAboutToRun(const std::function &func) -{ - return true; -} - -bool DummyOrganizerProxy::onFinishedRun(const std::function &func) -{ - return true; -} - -bool DummyOrganizerProxy::onUserInterfaceInitialized(std::function const& func) -{ - return true; -} - -bool DummyOrganizerProxy::onProfileCreated(std::function const& func) -{ - return true; -} - -bool DummyOrganizerProxy::onProfileRenamed(std::function const& func) -{ - return true; -} - -bool DummyOrganizerProxy::onProfileRemoved(std::function const& func) -{ - return true; -} - -bool DummyOrganizerProxy::onProfileChanged(std::function const& func) -{ - return true; -} - -bool DummyOrganizerProxy::onPluginSettingChanged(std::function const& func) -{ - return true; -} - -void DummyOrganizerProxy::refresh(bool saveChanges) -{ -} - -IModInterface *DummyOrganizerProxy::installMod(const QString &fileName, const QString &nameSuggestion) -{ - return nullptr; -} - -QString DummyOrganizerProxy::resolvePath(const QString &fileName) const -{ - return {}; -} - -QStringList DummyOrganizerProxy::listDirectories(const QString &directoryName) const -{ - return {}; -} - -QStringList DummyOrganizerProxy::findFiles(const QString &path, const std::function &filter) const -{ - return {}; -} - -QStringList DummyOrganizerProxy::findFiles(const QString& path, const QStringList& globFilters) const -{ - return {}; -} - -QStringList DummyOrganizerProxy::getFileOrigins(const QString &fileName) const -{ - return {}; -} - -QList DummyOrganizerProxy::findFileInfos(const QString &path, const std::function &filter) const -{ - return {}; -} - -MOBase::IDownloadManager *DummyOrganizerProxy::downloadManager() const -{ - return nullptr; -} - -MOBase::IPluginList *DummyOrganizerProxy::pluginList() const -{ - return m_plugins.get(); -} - -MOBase::IModList *DummyOrganizerProxy::modList() const -{ - return m_mods.get(); -} - -MOBase::IProfile *DummyOrganizerProxy::profile() const -{ - return nullptr; -} - -MOBase::IPluginGame const *DummyOrganizerProxy::managedGame() const -{ - return nullptr; -} -- cgit v1.3.1