┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <[email protected]>2016-05-15 18:09:09 +0200
committerMartin T. H. Sandsmark <[email protected]>2016-05-21 18:16:41 +0200
commitbed16191b5e9253d8658c0dac0d336b3dab5e0e3 (patch)
tree44f576fb37fe37b9b314244d021b881ced0efcab
parent3b95644fa1495785f617165f4e8035528ec714e8 (diff)
Fix crash when closing split view with ownCloud plugin loaded
KPluginLoader::instantiatePlugins() wraps QPluginLoader::instace(), which doesn't return a new object for each call, so if we set the KFileItemModelRolesUpdater instance as parent to the plugin the shared instance will be deleted leading to crashes when other instances of KFileItemModelRolesUpdater tries to use their plugin objects. To fix this, set the QApplication as a parent. BUG: 357479 REVIEW: 127930
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp
index e5353dc2a..fe30f62f9 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.cpp
+++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp
@@ -133,7 +133,7 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel* model, QO
connect(m_directoryContentsCounter, &KDirectoryContentsCounter::result,
this, &KFileItemModelRolesUpdater::slotDirectoryContentsCountReceived);
- auto plugins = KPluginLoader::instantiatePlugins(QStringLiteral("kf5/overlayicon"), nullptr, this);
+ auto plugins = KPluginLoader::instantiatePlugins(QStringLiteral("kf5/overlayicon"), nullptr, qApp);
foreach (QObject *it, plugins) {
auto plugin = qobject_cast<KOverlayIconPlugin*>(it);
if (plugin) {