small cleanup
This commit is contained in:
parent
e236763168
commit
c1b960f003
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
namespace Snore{
|
||||
|
||||
SnoreBackend::SnoreBackend ( QString name ) :
|
||||
SnoreBackend::SnoreBackend ( const QString &name ) :
|
||||
SnorePlugin ( name )
|
||||
{
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue