[vlmc-devel] EffectsEngine.cpp: Fix pathlist issue for both mac/windows.
Rohit Yadav
git at videolan.org
Tue Jul 26 23:34:47 CEST 2011
vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Wed Jul 27 08:50:41 2011 +0530| [eefec878a9bec1df8957e56dcc0a6e747d980684] | committer: Rohit Yadav
EffectsEngine.cpp: Fix pathlist issue for both mac/windows.
Keep it simple, let it search application directory on all platforms.
May be useful, if vlmc is built statically even on Linux.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=eefec878a9bec1df8957e56dcc0a6e747d980684
---
src/EffectsEngine/EffectsEngine.cpp | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/EffectsEngine/EffectsEngine.cpp b/src/EffectsEngine/EffectsEngine.cpp
index 399b908..ef80a7c 100644
--- a/src/EffectsEngine/EffectsEngine.cpp
+++ b/src/EffectsEngine/EffectsEngine.cpp
@@ -126,10 +126,9 @@ void
EffectsEngine::loadEffects()
{
QStringList pathList;
-
-#if defined ( QS_OS_MAC )
pathList << qApp->applicationDirPath() + "/effects/";
-#elif defined ( Q_OS_UNIX )
+
+#if defined ( Q_OS_UNIX )
const QProcessEnvironment &env = QProcessEnvironment::systemEnvironment();
if ( env.contains( "FREI0R_PATH" ) == true )
pathList = env.value( "FREI0R_PATH" ).split( ':' );
@@ -141,7 +140,6 @@ EffectsEngine::loadEffects()
QString("/usr/lib/frei0r-1/" );
}
#elif defined ( Q_OS_WIN32 )
- pathList << qApp->applicationDirPath() + "/effects/";
TCHAR appDir[128];
if ( GetModuleFileName( NULL, appDir, 128 ) > 0 )
{
@@ -172,7 +170,7 @@ EffectsEngine::loadEffects()
}
const QStringList&
-EffectsEngine::effects(Effect::Type type) const
+EffectsEngine::effects( Effect::Type type ) const
{
return m_names[type];
}
More information about the Vlmc-devel
mailing list