Skip to content

qt: fix deprecated initilisation method warning

Lyndon Brown requested to merge jnqnfe/vlc:qt_depr into master

The warning:

In file included from ../../modules/gui/qt/maininterface/mainui.cpp:39:
WARNING : ../../modules/gui/qt/util/mouse_event_filter.hpp:56: 64:  'constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = Qt::MouseButton; QFlags<T>::Zero = int QFlags<Qt::MouseButton>::Private::*]' is deprecated: Use default constructor instead [-Wdeprecated-declarations]
   56 |     Qt::MouseButtons m_targetItemInitialAcceptedMouseButtons = 0;
      |                                                                ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1304,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:49,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QString:1,
                 from ../../modules/gui/qt/qt.hpp:41,
                 from ../../modules/gui/qt/maininterface/mainui.hpp:8,
                 from ../../modules/gui/qt/maininterface/mainui.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qflags.h:123:80: note: declared here
  123 |     QT_DEPRECATED_X("Use default constructor instead") Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {}
      |                                                                                ^~~~~~

Merge request reports

Loading