Destroy generic plugins on exit.
Change-Id: I9037cabae74f9a7d8743630d0f530aaa1593266f Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
This commit is contained in:
parent
47f016f519
commit
3c2aea92cf
@ -90,6 +90,8 @@ QPointF QGuiApplicationPrivate::lastCursorPosition(0.0, 0.0);
|
||||
|
||||
QPlatformIntegration *QGuiApplicationPrivate::platform_integration = 0;
|
||||
|
||||
QList<QObject *> QGuiApplicationPrivate::generic_plugin_list;
|
||||
|
||||
bool QGuiApplicationPrivate::app_do_modal = false;
|
||||
|
||||
QPalette *QGuiApplicationPrivate::app_pal = 0; // default application palette
|
||||
@ -294,6 +296,8 @@ static void init_plugins(const QList<QByteArray> &pluginList)
|
||||
plugin = QGenericPluginFactory::create(QLatin1String(pluginSpec.mid(0, colonPos)),
|
||||
QLatin1String(pluginSpec.mid(colonPos+1)));
|
||||
qDebug() << " created" << plugin;
|
||||
if (plugin)
|
||||
QGuiApplicationPrivate::generic_plugin_list.append(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
@ -424,6 +428,10 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate()
|
||||
is_app_closing = true;
|
||||
is_app_running = false;
|
||||
|
||||
for (int i = 0; i < generic_plugin_list.count(); ++i)
|
||||
delete generic_plugin_list.at(i);
|
||||
generic_plugin_list.clear();
|
||||
|
||||
QFont::cleanup();
|
||||
|
||||
#ifndef QT_NO_CURSOR
|
||||
|
@ -175,6 +175,7 @@ public:
|
||||
|
||||
static bool quitOnLastWindowClosed;
|
||||
|
||||
static QList<QObject *> generic_plugin_list;
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
Loading…
Reference in New Issue
Block a user