Commit 3cc5ace1 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Effect: Ensure the effect has been loaded before querying some infos.

parent d72e196c
......@@ -70,19 +70,25 @@ Effect::load()
#undef LOAD_FREI0R_SYMBOL
const QString&
Effect::name() const
Effect::name()
{
if ( isLoaded() == false )
load();
return m_name;
}
const QString&
Effect::description() const
Effect::description()
{
if ( isLoaded() == false )
load();
return m_desc;
}
Effect::Type
Effect::type() const
Effect::type()
{
if ( isLoaded() == false )
load();
return m_type;
}
......@@ -52,9 +52,9 @@ class Effect : public QLibrary
virtual ~Effect();
bool load();
const QString& name() const;
const QString& description() const;
Type type() const;
const QString& name();
const QString& description();
Type type();
private:
QString m_name;
......
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