[vlmc-devel] EffectsEngine: allow compilation with Qt4

Jean-Baptiste Kempf git at videolan.org
Wed Feb 5 00:24:31 CET 2014


vlmc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Feb  2 14:05:33 2014 +0100| [6e510b29fd7ffda28dff8b3cd366644890810b4c] | committer: Hugo Beauzée-Luyssen

EffectsEngine: allow compilation with Qt4

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=6e510b29fd7ffda28dff8b3cd366644890810b4c
---

 src/EffectsEngine/EffectsEngine.cpp |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/EffectsEngine/EffectsEngine.cpp b/src/EffectsEngine/EffectsEngine.cpp
index 5555531..b72ccef 100644
--- a/src/EffectsEngine/EffectsEngine.cpp
+++ b/src/EffectsEngine/EffectsEngine.cpp
@@ -27,7 +27,13 @@
 #include "Types.h"
 
 #include <QApplication>
-#include <QStandardPaths>
+
+#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
+# include <QStandardPaths>
+#else
+# include <QDesktopServices>
+#endif
+
 #include <QDir>
 #include <QProcess>
 #include <QSettings>
@@ -41,8 +47,14 @@
 
 EffectsEngine::EffectsEngine()
 {
+#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
     m_cache = new QSettings( QStandardPaths::writableLocation(
                     QStandardPaths::CacheLocation ) + "/effects",
+#else
+    m_cache = new QSettings( QDesktopServices::storageLocation(
+                    QDesktopServices::CacheLocation ) + "/effects",
+#endif
+
                              QSettings::IniFormat, this );
     //Create the names entry. A bit ugly but faster (I guess...) afterward.
     m_names.push_back( QStringList() );



More information about the Vlmc-devel mailing list