Browse Source

qt: use QtQml/qqmlregistration.h for QML registration macros

Use <QtQml/qqmlregistration.h> instead of <QQmlEngine>. It's
possible to switch to his header now[^1] that we are using Qt >= 6.2.

[^1]: d8e9e1a2b6, qt: update to Qt 6

When we rely on QML_ELEMENT, QML_VALUE_TYPE, or QML_NAMED_ELEMENT, the
MOC must be able to find those defines.

The QtQmlIntegration header is the proper[^2] to include to add support
for those registration macros but only appears starting with Qt 6.9. The
qqmlintegration.h header is the one transitively included by QQmlEngine
that provides those features starting with Qt 6.2.

[^2]: https://doc.qt.io/qt-6/qqmlintegration-h.html
pull/198/head
Alexandre Janniaux 3 months ago
committed by Felix Paul Kühne
parent
commit
9bedec23b8
  1. 2
      modules/gui/qt/util/csdmenu.hpp
  2. 2
      modules/gui/qt/util/vlchotkeyconverter.hpp

2
modules/gui/qt/util/csdmenu.hpp

@ -18,7 +18,7 @@
#ifndef CSDMENU_HPP
#define CSDMENU_HPP
#include <QQmlEngine>
#include <QtQml/qqmlregistration.h>
#include <QMenu>
Q_MOC_INCLUDE("maininterface/mainctx.hpp")

2
modules/gui/qt/util/vlchotkeyconverter.hpp

@ -3,7 +3,7 @@
#include <QObject>
#include <QPoint>
#include <QQmlEngine>
#include <QtQml/qqmlregistration.h>
/* VLC Key/Wheel hotkeys interactions */

Loading…
Cancel
Save