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
This fixes "Missing QML.Element class info" runtime warnings and
MOC compile-time warnings about missing QML registration headers when
compiling the Qt interface for MacOSX, which are leading to the UI not
appearing on screen:
[qt] main generic debug: no qtwindoweffects modules matched with name any
[qt] qt generic debug: A module providing window effects capability could not be instantiated. Native background blur effect will not be available. The application may compensate this with a simulated effect on certain platform(s).
[qt] qt generic warning: (default) Missing QML.Element class info for VLCDuration
[qt] qt generic warning: (default) Missing QML.Element class info for VLCTime
[qt] qt generic warning: (default) Missing QML.Element class info for CSDMenu
[qt] qt generic warning: (default) Missing QML.Element class info for WheelToVLCConverter
[qt] main generic debug: looking for qt theme provider module matching "any": 1 candidates
...
main generic debug: using interface module "qt"
[qt] qt generic warning: (qml) component is not ready: qrc:/qt/qml/VLC/MainInterface/MainDisplay.qml:194 Type BannerSources unavailable
qrc:/qt/qml/VLC/MainInterface/BannerSources.qml:161 Type Widgets.BannerCone unavailable
qrc:/qt/qml/VLC/Widgets/BannerCone.qml:60 CSDMenu is not a type
[0000600001c06280] [qt] qt generic warning: (qml) unable to load view mc
Indeed, when we rely on QML_ELEMENT, QML_VALUE_TYPE, or QML_NAMED_ELEMENT,
the MOC must be able to find those defines. But on MacOS they can be
in a framework, that the Qt module from meson doesn't include properly
in the MOC commands.
Add explicit QQmlEngine and QJSEngine includes to mainctx.cpp which is
currently relying on transitive includes. Next commits will remove those
transitive includes.
On macOS with dynamically linked Qt, the native style is used by
default, which doesn't support control customization. This causes
warnings like:
"The current style does not support customization of this control"
VLC's QML files customize control backgrounds, which requires a
non-native style. Set Basic style on macOS (and when statically
linked) to enable customization.
QPlatformWindow is only fully defined when Qt GUI private headers are
available. Guard the access to nativeWindow->devicePixelRatio() with
the #ifdef QT_GUI_PRIVATE to fix compilation when private headers are
not available.
When QT_GUI_PRIVATE is not defined, fall back to using the Qt effective
DPR for both values, which makes the coordinate conversion a no-op.
This is correct for the case where no additional Qt scaling (like
QT_SCALE_FACTOR) is applied on top of native scaling.
On Macos with a Homebrew Qt installation, the private library's package
information doesn't seem to be provided so it is not found.
VLC_PKG_LIBEXEC_DIR is truncated, leading to failure to find binaries
from LIBEXEC, and thus Qt interface not starting.
[255/2305] Compiling C object src/libvlccore.so.9.0.0.p/posix_dirs.c.o
../src/posix/dirs.c: In function ‘config_GetSysPath’:
../src/posix/dirs.c:53:33: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (17 chars into 16 available) [-Wunterminated-string-initialization]
53 | [VLC_PKG_LIBEXEC_DIR] = "VLC_LIBEXEC_PATH",
| ^~~~~~~~~~~~~~~~~~
Co-authored-by: Fatih Uzunoglu <fuzun54@outlook.com>
Fatih found the root cause and reported it after Gabriel signalled he
couldn't launch the UI anymore.
Regression from e23555302f.
This uses Xcode 26 along with its SDK for tvOS, macOS-arm64, watchOS,
iOS, iOS-Simulator-x86_64 and xrOS.
The macOS-x86_64 remains on the current runner.
The macro is meant to test if the used mingw-w64 is at least the version we want.
If it's equal the test should match as well.
This whole we have been rebuilding headers/packages we didn't need.
Since the generated DLL is too big if it contains the symbols (#28643, #28598)
we strip the symbols.
Since it won't be used to make release builds, it doesn't matter.
`MediaCover` has been supporting various fill modes for a while, including
preserve aspect fit that is wanted here, and as the comment says we can now
use it instead of using a custom item.
If is rhi used, we are not doing background coloring through the image
provider, since it can be done must more efficiently through `ImageExt`
thanks to its fragment shader that has the capability.
Shortcut strings (like "Ctrl+B") do not need to be translated.
Standardizing on QKeySequence handles localization automatically
and avoids potential errors if translators change the key codes.
I verified the codebase using [ grep -r "setShortcut.*qtr" ] and
fixed all 3 instances found in the qt module.
Gbm states the following:
> Each call to gbm_bo_get_fd_for_plane() returns a new
> file descriptor and the caller is responsible for
> closing the file descriptor.
This is currently not satisfied. Because of that, the
application quickly runs out of the file descriptors
that the system can give when resizing the video window.
This fixes the crash for me when I resize the window on
wayland. In my case it takes a few seconds of accumulated
resize before running out of file descriptors.