[vlc-devel] [PATCH v2 05/11] qml: suppress verbose qml warning about connection syntax

Pierre Lamot pierre at videolabs.io
Wed Sep 16 09:24:53 CEST 2020


  legacy connection syntax is required to keep compatibility with Qt <= 5.14
---
 modules/gui/qt/qt.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index 17ab076b91..c05df6e2fa 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -43,6 +43,7 @@ extern "C" char **environ;
 #include <QDate>
 #include <QMutex>
 #include <QtQuickControls2/QQuickStyle>
+#include <QLoggingCategory>
 
 #include "qt.hpp"
 
@@ -593,6 +594,12 @@ static void *Thread( void *obj )
     /* Start the QApplication here */
     QVLCApp app( argc, argv );
 
+#if QT_VERSION >= QT_VERSION_CHECK(5,15,1)
+    //suppress deprecation warnings about QML 'Connections' syntax
+    //legacy connection syntax is required to keep compatibility with Qt <= 5.14
+    QLoggingCategory::setFilterRules("qt.qml.connections.warning=false");
+#endif
+
     //app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
 
     /* Set application direction to locale direction,
-- 
2.25.1



More information about the vlc-devel mailing list