Commit 8f5d08a5 authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Do not delete plugin instances. Fixes segfaults with multiple widgets.

parent da6412ad
......@@ -51,17 +51,7 @@ class PluginManagerPrivate
PluginManagerPrivate::~PluginManagerPrivate()
{
qDeleteAll( m_renderPluginTemplates );
m_renderPluginTemplates.clear();
qDeleteAll( m_networkPluginTemplates );
m_networkPluginTemplates.clear();
qDeleteAll( m_positionProviderPluginTemplates );
m_positionProviderPluginTemplates.clear();
qDeleteAll( m_runnerPlugins );
m_runnerPlugins.clear();
// nothing to do
}
PluginManager::PluginManager( QObject *parent )
......@@ -143,16 +133,10 @@ void PluginManagerPrivate::loadPlugins()
MarbleDirs::debug();
qDeleteAll( m_renderPluginTemplates );
m_renderPluginTemplates.clear();
qDeleteAll( m_networkPluginTemplates );
m_networkPluginTemplates.clear();
qDeleteAll( m_positionProviderPluginTemplates );
m_positionProviderPluginTemplates.clear();
// No need to delete runner plugins
Q_ASSERT( m_renderPluginTemplates.isEmpty() );
Q_ASSERT( m_networkPluginTemplates.isEmpty() );
Q_ASSERT( m_positionProviderPluginTemplates.isEmpty() );
Q_ASSERT( m_runnerPlugins.isEmpty() );
foreach( const QString &fileName, pluginFileNameList ) {
// mDebug() << fileName << " - " << MarbleDirs::pluginPath( fileName );
......
......@@ -235,6 +235,8 @@ MonavPlugin::MonavPlugin( QObject *parent ) : RunnerPlugin( parent ), d( new Mon
} else {
setStatusMessage( tr ( "The monav routing daemon does not seem to be installed on your system." ) );
}
connect( qApp, SIGNAL( aboutToQuit() ), this, SLOT( stopDaemon() ) );
}
MonavPlugin::~MonavPlugin()
......
......@@ -57,6 +57,8 @@ public:
private:
MonavPluginPrivate* const d;
Q_PRIVATE_SLOT( d, void stopDaemon() )
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment