[vlc-commits] [Git][videolan/vlc][master] qt: require minimum Qt to be the one in the contribs with static Qt
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Aug 1 08:50:36 UTC 2026
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
9934d240 by Fatih Uzunoglu at 2026-08-01T10:20:31+02:00
qt: require minimum Qt to be the one in the contribs with static Qt
It is a maintenance burden otherwise, since no one tests static Qt
with anything other than what we provide in the contribs.
Currently the minimum required Qt is 6.2, but that is only tested
with non-static Qt (mainly relevant to Linux).
Additionally we also depend on the Qt patches we have in Windows
build case.
- - - - -
5 changed files:
- modules/gui/qt/maininterface/compositor_dcomp.cpp
- modules/gui/qt/plugins.hpp
- modules/gui/qt/qt.cpp
- modules/gui/qt/qt.hpp
- modules/gui/qt/qt6.pro
Changes:
=====================================
modules/gui/qt/maininterface/compositor_dcomp.cpp
=====================================
@@ -39,7 +39,7 @@
#if __has_include(<d3d12.h>) && __has_include(<d3d12sdklayers.h>)
#include <QtGui/private/qrhid3d12_p.h>
-#if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0)) || defined(QRHI_D3D12_AVAILABLE)
+#ifdef QRHI_D3D12_AVAILABLE
#define QRhiD3D12_ACTIVE
#endif
#endif
=====================================
modules/gui/qt/plugins.hpp
=====================================
@@ -54,16 +54,9 @@
Q_IMPORT_QML_PLUGIN(QtQmlModelsPlugin)
Q_IMPORT_QML_PLUGIN(QtQmlPlugin)
Q_IMPORT_QML_PLUGIN(QtQmlWorkerScriptPlugin)
-#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
- Q_IMPORT_QML_PLUGIN(QtQmlMetaPlugin)
-#endif
#ifdef _WIN32
-#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
Q_IMPORT_PLUGIN(QModernWindowsStylePlugin)
-#else
- Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin)
-#endif
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
// Q_IMPORT_PLUGIN(QWindowsDirect2DIntegrationPlugin)
#elif defined(Q_OS_MACOS)
=====================================
modules/gui/qt/qt.cpp
=====================================
@@ -854,7 +854,6 @@ static void *Thread( void *obj )
#endif
Q_INIT_RESOURCE( shaders );
-#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
// NOTE: Qt declarative 6.8.0 initializes scenegraph_shaders,
// but not scenegraph_curve_shaders. Curve shaders
// are used in particular cases even when curve
@@ -862,12 +861,8 @@ static void *Thread( void *obj )
// observed with underlined text on Windows which lead
// access violation in the scene graph thread.
Q_INIT_RESOURCE( scenegraph_curve_shaders );
-#endif
Q_INIT_RESOURCE( qmake_QtQml );
-#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
- Q_INIT_RESOURCE( qmake_QtQml_Base );
-#endif
Q_INIT_RESOURCE( qmake_QtQml_Models );
Q_INIT_RESOURCE( qmake_QtQml_WorkerScript );
Q_INIT_RESOURCE( qmake_QtQuick );
@@ -879,13 +874,8 @@ static void *Thread( void *obj )
Q_INIT_RESOURCE( qmake_QtQuick_Layouts );
Q_INIT_RESOURCE( qmake_QtQuick_Templates );
-#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
Q_INIT_RESOURCE( QuickControls2Basic_raw_qml_0 );
Q_INIT_RESOURCE( qtquickcontrols2basicstyle );
-#else
- Q_INIT_RESOURCE( qtquickcontrols2basicstyleplugin_raw_qml_0 );
- Q_INIT_RESOURCE( qtquickcontrols2basicstyleplugin );
-#endif
// Q_INIT_RESOURCE( qtquickshapes_shaders );
#endif
@@ -1053,7 +1043,7 @@ static void *Thread( void *obj )
static constexpr QLatin1String graphicsApiRhiSoftwareKey {"graphics-api-rhi-software"};
if (qEnvironmentVariableIsEmpty("QSG_RHI_BACKEND") &&
qEnvironmentVariableIsEmpty("QT_QUICK_BACKEND") &&
- (QT_VERSION < QT_VERSION_CHECK(6, 4, 0) || !uint(qEnvironmentVariableIntValue("QSG_RHI_PREFER_SOFTWARE_RENDERER"))))
+ !uint(qEnvironmentVariableIntValue("QSG_RHI_PREFER_SOFTWARE_RENDERER")))
{
const auto enableRhiSoftwareRenderer = []() {
// We could use `QQuickGraphicsConfiguration::setPreferSoftwareDevice()`, but this
=====================================
modules/gui/qt/qt.hpp
=====================================
@@ -36,6 +36,16 @@
#include <qconfig.h>
+#ifdef QT_STATIC
+#if __has_include(<QtVersionChecks>)
+#include <QtVersionChecks> // Available since Qt 6.8
+#else
+#include <QtGlobal>
+#endif
+
+static_assert(QT_VERSION >= QT_VERSION_CHECK(6, 8, 3), "With static Qt, the Qt version must be greater than or equal to what we provide in the contribs.");
+#endif
+
#include <QString>
enum {
=====================================
modules/gui/qt/qt6.pro
=====================================
@@ -8,13 +8,7 @@ CONFIG -= debug_and_release
CONFIG += no_include_pwd
win32 {
-QTPLUGIN += qwindows
-
-versionAtLeast(QT_VERSION, 6.7.0) {
-QTPLUGIN += qmodernwindowsstyle
-} else {
-QTPLUGIN += qwindowsvistastyle
-}
+QTPLUGIN += qwindows qmodernwindowsstyle
}
linux {
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9934d24075a8372bc805ed67ae5402b4303c494e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9934d24075a8372bc805ed67ae5402b4303c494e
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list