[vlmc-devel] another check for qt version

Sanket Markan git at videolan.org
Fri Mar 11 14:33:48 CET 2016


vlmc | branch: master | Sanket Markan <sanketmarkan at gmail.com> | Fri Mar 11 18:50:07 2016 +0530| [5357ae8cac7e8cf74c0164deb435b69808310047] | committer: Hugo Beauzée-Luyssen

another check for qt version

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

> https://code.videolan.org/videolan/vlmc/commit/5357ae8cac7e8cf74c0164deb435b69808310047
---

 src/Tools/VlmcLogger.cpp | 9 ---------
 src/Tools/VlmcLogger.h   | 4 ----
 2 files changed, 13 deletions(-)

diff --git a/src/Tools/VlmcLogger.cpp b/src/Tools/VlmcLogger.cpp
index 360dab1..57c9219 100644
--- a/src/Tools/VlmcLogger.cpp
+++ b/src/Tools/VlmcLogger.cpp
@@ -100,11 +100,7 @@ VlmcLogger::setup()
     Backend::IBackend* backend = Backend::getBackend();
     backend->setLogHandler( this, &VlmcLogger::backendLogHandler );
 
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
     qInstallMessageHandler( VlmcLogger::vlmcMessageHandler );
-#else
-    qInstallMsgHandler( VlmcLogger::vlmcMessageHandler );
-#endif
 }
 
 void
@@ -131,15 +127,10 @@ VlmcLogger::writeToFile(const char *msg)
 }
 
 void
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
 VlmcLogger::vlmcMessageHandler( QtMsgType type, const QMessageLogContext&, const QString& str )
 {
     const QByteArray byteArray = str.toLocal8Bit();
     const char* msg = byteArray.constData();
-#else
-VlmcLogger::vlmcMessageHandler( QtMsgType type, const char* msg )
-{
-#endif
     //FIXME: This is ok as long as we guarantee no log message will arrive after
     // we uninstall the hook
 
diff --git a/src/Tools/VlmcLogger.h b/src/Tools/VlmcLogger.h
index c912369..bf6f87f 100644
--- a/src/Tools/VlmcLogger.h
+++ b/src/Tools/VlmcLogger.h
@@ -49,11 +49,7 @@ class   VlmcLogger : public QObject
             Quiet = QtCriticalMsg
         };
 
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
         static void     vlmcMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& str );
-#else
-        static void     vlmcMessageHandler( QtMsgType type, const char* msg );
-#endif
         static void     backendLogHandler( void* data, Backend::IBackend::LogLevel logLevel, const char* msg );
 
         void            setup();



More information about the Vlmc-devel mailing list