Example #1
0
void KatePluginManager::loadConfig(KConfig *config)
{
    // first: unload the plugins
    unloadAllPlugins();

    /**
     * ask config object
     */
    if (config) {
        KConfigGroup cg = KConfigGroup(config, QStringLiteral("Kate Plugins"));

        // disable all plugin if no config, beside the ones marked as default load
        for (int i = 0; i < m_pluginList.size(); ++i) {
            m_pluginList[i].load = cg.readEntry(m_pluginList[i].saveName(), m_pluginList[i].defaultLoad);
        }
    }

    /**
     * load plugins
     */
    for (KatePluginList::iterator it = m_pluginList.begin(); it != m_pluginList.end(); ++it) {
        if (it->load) {
            loadPlugin(&(*it));

            // restore config
            if (auto interface = qobject_cast<KTextEditor::SessionConfigInterface *> (it->plugin)) {
                KConfigGroup group(config, QString::fromLatin1("Plugin:%1:").arg(it->saveName()));
                interface->readSessionConfig(group);
            }
        }
    }
}
Example #2
0
	void PluginManager::shutdown()
	{
		MYGUI_ASSERT(mIsInitialise, getClassTypeName() << " is not initialised");
		MYGUI_LOG(Info, "* Shutdown: " << getClassTypeName());

		unloadAllPlugins();
		ResourceManager::getInstance().unregisterLoadXmlDelegate(mXmlPluginTagName);

		MYGUI_LOG(Info, getClassTypeName() << " successfully shutdown");
		mIsInitialise = false;
	}
Example #3
0
void AgentManager::loadAllPlugins()
{
	unloadAllPlugins();
	
    std::map<std::string,std::string> conf = getPluginConfigure();
    if(!conf.empty()){
        loadPluginsFromConfig(conf);
    }else{
		OPENSDK_WARN("AgentManager", "no config use debug mode");
        setDebugMode(true);
    }
}
Example #4
0
bool
PluginManager::finish()
{
  if (!initialized) return true;

  if (!unloadAllPlugins())
    return false;

  if (!NetworkManager::_finish())
    return false;

  initialized = false;
  return true;
}
Example #5
0
PluginManager::~PluginManager()
{
	unloadAllPlugins();
}
Example #6
0
KatePluginManager::~KatePluginManager()
{
    // than unload the plugins
    unloadAllPlugins();
}
Example #7
0
PluginCollection::~PluginCollection() {
  unloadAllPlugins();
  delete _parser;
  _parser = 0L;
}