create plugin cache per application to prevent clashes on stratup
This commit is contained in:
parent
991b6641e3
commit
e4e1ab0cbf
|
@ -28,7 +28,6 @@
|
|||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include <QMetaEnum>
|
||||
#include <QApplication>
|
||||
|
||||
using namespace Snore;
|
||||
|
||||
|
@ -145,6 +144,7 @@ void PluginContainer::updatePluginCache()
|
|||
cache().setValue("version",Version::revision());
|
||||
cache().setValue("buildtime",Version::buildTime());
|
||||
cache().setValue("pluginPath",pluginDir().absolutePath());
|
||||
cache().setValue("application", qApp->applicationFilePath());
|
||||
QList<PluginContainer*> plugins = pluginCache(SnorePlugin::ALL).values();
|
||||
cache().beginWriteArray("plugins");
|
||||
for(int i=0;i< plugins.size();++i)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <QSettings>
|
||||
#include <QFlag>
|
||||
#include <QPluginLoader>
|
||||
#include <QApplication>
|
||||
|
||||
|
||||
|
||||
|
@ -72,7 +73,7 @@ private:
|
|||
if(_cache == NULL)
|
||||
{
|
||||
_cache = new QSettings("SnoreNotify","libsnore");
|
||||
_cache->beginGroup( SnoreCorePrivate::computeHash(pluginDir().absolutePath().toLatin1()));
|
||||
_cache->beginGroup( SnoreCorePrivate::computeHash(pluginDir().absolutePath().append(qApp->applicationFilePath()).toLatin1()));
|
||||
}
|
||||
return *_cache;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue