[vlmc-devel] commit: EffectsEngine: Use the recommended way of getting environment ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Tue Sep 7 17:11:24 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Sep 7 17:10:36 2010 +0200| [6dc1d88df828e82d8bc5f2fdedf22c18c838c74d] | committer: Hugo Beauzée-Luyssen
EffectsEngine: Use the recommended way of getting environment
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=6dc1d88df828e82d8bc5f2fdedf22c18c838c74d
---
src/EffectsEngine/EffectsEngine.cpp | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/EffectsEngine/EffectsEngine.cpp b/src/EffectsEngine/EffectsEngine.cpp
index e4ad2bf..5e4dc13 100644
--- a/src/EffectsEngine/EffectsEngine.cpp
+++ b/src/EffectsEngine/EffectsEngine.cpp
@@ -123,16 +123,10 @@ EffectsEngine::loadEffects()
QStringList pathList;
#if defined( Q_OS_UNIX )
- const QStringList &env = QProcess::systemEnvironment();
- foreach ( const QString &e, env )
- {
- if ( e.startsWith( "FREI0R_PATH=" ) == true )
- {
- const QString list = e.mid( 12 );
- pathList = list.split( ':' );
- }
- }
- if ( pathList.isEmpty() == true )
+ const QProcessEnvironment &env = QProcessEnvironment::systemEnvironment();
+ if ( env.contains( "FREI0R_PATH" ) == true )
+ pathList = env.value( "FREI0R_PATH" ).split( ':' );
+ else
{
//Refer to http://www.piksel.org/frei0r/1.2/spec/group__pluglocations.html
pathList << QString( QDir::homePath() + "/.frei0r-1/lib/" ) <<
More information about the Vlmc-devel
mailing list