mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
delete plugin loaders from QFactoryLoader
previously deleting the QPluginLoader instances was causing crashses in gwenview sometimes (e.g. when gif plugin was in use but that plugin is no more) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
748128b688
commit
1b5ac1c06b
1 changed files with 12 additions and 0 deletions
|
@ -41,6 +41,7 @@ class QFactoryLoaderPrivate
|
|||
{
|
||||
public:
|
||||
QFactoryLoaderPrivate(const QString &suffix);
|
||||
~QFactoryLoaderPrivate();
|
||||
|
||||
QMutex mutex;
|
||||
QHash<QString,QPluginLoader*> pluginMap;
|
||||
|
@ -53,6 +54,17 @@ QFactoryLoaderPrivate::QFactoryLoaderPrivate(const QString &asuffix)
|
|||
{
|
||||
}
|
||||
|
||||
QFactoryLoaderPrivate::~QFactoryLoaderPrivate()
|
||||
{
|
||||
if (qt_debug_component()) {
|
||||
qDebug() << "QFactoryLoader: unloading" << suffix;
|
||||
}
|
||||
foreach (QPluginLoader *loader, pluginMap.values()) {
|
||||
loader->unload();
|
||||
delete loader;
|
||||
}
|
||||
}
|
||||
|
||||
QFactoryLoader::QFactoryLoader(const QString &suffix)
|
||||
: d_ptr(new QFactoryLoaderPrivate(suffix))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue