On Friday 12 July 2013 01:28:21 Thomas Lübking wrote:
> +
> +namespace Common {
> +
> +PluginLoader::PluginLoader() : QObject(qApp)
> +{
> +++    // TODO: make more generic (pass plugin type as
> parameter) +    m_preferedAddressbookPlugin =
> QSettings().value(Common::SettingsNames::addressbookPlugin).to
> String(); +    m_preferedPasswordPlugin =
> QSettings().value(Common::SettingsNames::passwordPlugin).toStr
> ing(); +    m_pluginDirs =
> QSettings().value(Common::SettingsNames::pluginDirs).toStringL
> ist(); +
> +    reloadPlugins();
> --
> +    }
> +}
> +
> +void PluginLoader::reloadPlugins()
> +{
> ++++ // TODO allow reloading per plugin type
> +    delete m_addressbook;
> +    delete m_password;
> +
> +    unloadPlugin(m_addressbookLoader);
> +    unloadPlugin(m_passwordLoader);
> --
> +    return m_availablePasswordPlugins;
> +}
> +
> +QString PluginLoader::preferedAddressbookPlugin()
> +{
> +++   // TODO pass type here
> +    return m_preferedAddressbookPlugin;
> +}
> +
> +QString PluginLoader::preferedPasswordPlugin()
> +{
> --

Hello, if I understand you correctly, you suggest to make plugin 
loader more generic to support more plugin types? I think that it 
is not needed to have other plugins now and API for addressbook & 
password plugins is simpler. In future if there will be need for 
some new plugin type, plugin loader can be changed. But I do not 
see reason now to create big plugin API for only addressbook and 
password plugins...

-- 
Pali Rohár
[email protected]

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to