[vlmc-devel] commit: Effect: Ensure the effect has been loaded before querying some infos. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Wed Jul 28 00:22:09 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Jul 27 23:23:20 2010 +0200| [3cc5ace10287db461a4e79832a2c39f329820151] | committer: Hugo Beauzée-Luyssen
Effect: Ensure the effect has been loaded before querying some infos.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=3cc5ace10287db461a4e79832a2c39f329820151
---
src/EffectsEngine/Effect.cpp | 12 +++++++++---
src/EffectsEngine/Effect.h | 6 +++---
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/EffectsEngine/Effect.cpp b/src/EffectsEngine/Effect.cpp
index cc33e35..ebfd8c6 100644
--- a/src/EffectsEngine/Effect.cpp
+++ b/src/EffectsEngine/Effect.cpp
@@ -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;
}
diff --git a/src/EffectsEngine/Effect.h b/src/EffectsEngine/Effect.h
index ddbb4dc..9d17203 100644
--- a/src/EffectsEngine/Effect.h
+++ b/src/EffectsEngine/Effect.h
@@ -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;
More information about the Vlmc-devel
mailing list