Commit 63609d36 authored by Bernhard Beschow's avatar Bernhard Beschow
Browse files

PluginManager: no need to inherit QObject

parent 23c1e5bf
......@@ -54,9 +54,8 @@ PluginManagerPrivate::~PluginManagerPrivate()
// nothing to do
}
PluginManager::PluginManager( QObject *parent )
: QObject(parent),
d( new PluginManagerPrivate() )
PluginManager::PluginManager()
: d( new PluginManagerPrivate() )
{
}
......@@ -171,5 +170,3 @@ void PluginManagerPrivate::loadPlugins()
}
}
#include "PluginManager.moc"
......@@ -13,7 +13,6 @@
#define MARBLE_PLUGINMANAGER_H
#include <QtCore/QList>
#include <QtCore/QObject>
#include "marble_export.h"
......@@ -40,12 +39,11 @@ class RunnerPlugin;
*
*/
class MARBLE_EXPORT PluginManager : public QObject
class MARBLE_EXPORT PluginManager
{
Q_OBJECT
public:
explicit PluginManager( QObject *parent = 0 );
explicit PluginManager();
~PluginManager();
/**
......
......@@ -28,12 +28,14 @@ void PluginManagerTest::loadPlugins()
MarbleDirs::setMarbleDataPath( DATA_PATH );
MarbleDirs::setMarblePluginPath( PLUGIN_PATH );
int pluginNumber = MarbleDirs::pluginEntryList( "", QDir::Files ).size();
PluginManager *pm = new PluginManager( 0 );
int renderPlugins = pm->createRenderPlugins().size();
int networkPlugins = pm->createNetworkPlugins().size();
int positionPlugins = pm->createPositionProviderPlugins().size();
int runnerPlugins = pm->runnerPlugins().size();
const int pluginNumber = MarbleDirs::pluginEntryList( "", QDir::Files ).size();
PluginManager pm;
const int renderPlugins = pm.createRenderPlugins().size();
const int networkPlugins = pm.createNetworkPlugins().size();
const int positionPlugins = pm.createPositionProviderPlugins().size();
const int runnerPlugins = pm.runnerPlugins().size();
QCOMPARE( renderPlugins + networkPlugins + positionPlugins + runnerPlugins, pluginNumber );
}
......
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