small cleanup

This commit is contained in:
Patrick von Reth 2012-01-31 11:54:36 +01:00
parent e236763168
commit c1b960f003
4 changed files with 8 additions and 4 deletions

View File

@ -25,7 +25,7 @@
namespace Snore{
SnorePlugin::SnorePlugin ( QString name ) :
SnorePlugin::SnorePlugin ( const QString &name ) :
m_name ( name ),
m_initialized(false)
{}
@ -37,6 +37,10 @@ SnorePlugin::~SnorePlugin()
bool SnorePlugin::init( SnoreCore *snore )
{
if(m_initialized){
qFatal("Something went wrong, plugin %s is already initialized",this->name().toLatin1().constData());
return false;
}
qDebug()<<"Initialize"<<m_name<<this<<snore;
this->m_snore = snore;
m_initialized = true;

View File

@ -31,7 +31,7 @@ class SNORE_EXPORT SnorePlugin:public QObject
{
Q_OBJECT
public:
SnorePlugin ( QString name);
SnorePlugin ( const QString &name);
virtual ~SnorePlugin();
virtual bool init( SnoreCore* snore );
bool isInitialized();

View File

@ -25,7 +25,7 @@
namespace Snore{
SnoreBackend::SnoreBackend ( QString name ) :
SnoreBackend::SnoreBackend ( const QString &name ) :
SnorePlugin ( name )
{

View File

@ -32,7 +32,7 @@ class SNORE_EXPORT SnoreBackend:public SnorePlugin
Q_OBJECT
Q_INTERFACES(Snore::SnorePlugin)
public:
SnoreBackend ( QString name );
SnoreBackend(const QString &name );
virtual ~SnoreBackend();
virtual bool init(SnoreCore *snore);