Commit 91110c76 authored by Vincent Carrubba's avatar Vincent Carrubba
Browse files

Applying HACKING rules on EffectPluginTypeLoader

parent 66e1f3fb
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <QDebug> #include <QDebug>
EffectPluginTypeLoader::EffectPluginTypeLoader() : m_iepc( NULL ) EffectPluginTypeLoader::EffectPluginTypeLoader( void ) : m_iepc( NULL )
{ {
} }
...@@ -38,11 +38,11 @@ EffectPluginTypeLoader::~EffectPluginTypeLoader() ...@@ -38,11 +38,11 @@ EffectPluginTypeLoader::~EffectPluginTypeLoader()
IEffectPlugin* EffectPluginTypeLoader::createIEffectPluginInstance( void ) const IEffectPlugin* EffectPluginTypeLoader::createIEffectPluginInstance( void ) const
{ {
if ( m_iepc != NULL ) if ( m_iepc != NULL )
return ( m_iepc->createIEffectPluginInstance() ); return m_iepc->createIEffectPluginInstance();
return ( NULL ); return NULL;
} }
bool EffectPluginTypeLoader::load( QString const & fileName ) bool EffectPluginTypeLoader::load( const QString & fileName )
{ {
QObject* tmp; QObject* tmp;
m_qpl.setFileName( fileName ); m_qpl.setFileName( fileName );
...@@ -51,15 +51,15 @@ bool EffectPluginTypeLoader::load( QString const & fileName ) ...@@ -51,15 +51,15 @@ bool EffectPluginTypeLoader::load( QString const & fileName )
if ( tmp == NULL ) if ( tmp == NULL )
{ {
qDebug() << m_qpl.errorString(); qDebug() << m_qpl.errorString();
return ( false ); return false ;
} }
m_iepc = qobject_cast<IEffectPluginCreator*>( tmp ); m_iepc = qobject_cast<IEffectPluginCreator*>( tmp );
if ( m_iepc == NULL ) if ( m_iepc == NULL )
{ {
qDebug() << "The type of the created instance of the loaded class isn't IEffectPluginCreator* !"; qDebug() << "The type of the created instance of"
return ( false ); << "the loaded class isn't IEffectPluginCreator* !";
return false;
} }
return ( true ); return true;
} }
...@@ -35,18 +35,16 @@ class EffectPluginTypeLoader ...@@ -35,18 +35,16 @@ class EffectPluginTypeLoader
{ {
public: public:
EffectPluginTypeLoader(); EffectPluginTypeLoader( void );
~EffectPluginTypeLoader(); ~EffectPluginTypeLoader();
IEffectPlugin* createIEffectPluginInstance( void ) const; IEffectPlugin* createIEffectPluginInstance( void ) const;
bool load( QString const & fileName ); bool load( const QString & fileName );
private: private:
QPluginLoader m_qpl; QPluginLoader m_qpl;
IEffectPluginCreator* m_iepc; IEffectPluginCreator* m_iepc;
}; };
// L'EffectNode contiendra son id de type, son nom de type, son id d'instance, et son nom d'instance
#endif // EFFECTPLUGINTYPELOADER_H_ #endif // EFFECTPLUGINTYPELOADER_H_
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