public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qt6ct] epel9: Don't use KDE's QtQuick-QtWidgets style bridge
@ 2026-10-08 20:06 Zephyr Lykos
  0 siblings, 0 replies; only message in thread
From: Zephyr Lykos @ 2026-10-08 20:06 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/qt6ct
Branch : epel9
Commit : 6927d9648ab98f0ea39b2a186898069370ef2f10
Author : Zephyr Lykos <git@mochaa.ws>
Date   : 2025-09-09T06:21:01+08:00
Stats  : +77/-2 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/qt6ct/c/6927d9648ab98f0ea39b2a186898069370ef2f10?branch=epel9

Log:
Don't use KDE's QtQuick-QtWidgets style bridge

---
diff --git a/0001-build-refactor-CMake-build-rules.patch b/0001-build-refactor-CMake-build-rules.patch
index 36f72fe..2c3867f 100644
--- a/0001-build-refactor-CMake-build-rules.patch
+++ b/0001-build-refactor-CMake-build-rules.patch
@@ -1,7 +1,7 @@
 From 37b5df86077954ff9575f78b485a7205858cc676 Mon Sep 17 00:00:00 2001
 From: Zephyr Lykos <git@mochaa.ws>
 Date: Mon, 8 Sep 2025 16:34:18 +0800
-Subject: [PATCH 1/2] build: refactor CMake build rules
+Subject: [PATCH 1/3] build: refactor CMake build rules
 
 ---
  CMakeLists.txt                        | 55 ++++++---------------------

diff --git a/0002-Wrap-forward-declaration-within-QT_NAMESPACE.patch b/0002-Wrap-forward-declaration-within-QT_NAMESPACE.patch
index f26b51b..19ced30 100644
--- a/0002-Wrap-forward-declaration-within-QT_NAMESPACE.patch
+++ b/0002-Wrap-forward-declaration-within-QT_NAMESPACE.patch
@@ -1,7 +1,7 @@
 From eeb6172912b878d7ccb14d69682b73f3e3599826 Mon Sep 17 00:00:00 2001
 From: Zephyr Lykos <git@mochaa.ws>
 Date: Mon, 8 Sep 2025 21:18:15 +0800
-Subject: [PATCH 2/2] Wrap forward declaration within QT_NAMESPACE
+Subject: [PATCH 2/3] Wrap forward declaration within QT_NAMESPACE
 
 ---
  src/qt6ct/appearancepage.h    | 4 ++++

diff --git a/0003-Revert-Use-KDE-s-QtQuick-QtWidgets-style-bridge.patch b/0003-Revert-Use-KDE-s-QtQuick-QtWidgets-style-bridge.patch
new file mode 100644
index 0000000..de5ffe2
--- /dev/null
+++ b/0003-Revert-Use-KDE-s-QtQuick-QtWidgets-style-bridge.patch
@@ -0,0 +1,74 @@
+From 968c1f1f9125f036d27cb58e5953eaea2bcda308 Mon Sep 17 00:00:00 2001
+From: Zephyr Lykos <git@mochaa.ws>
+Date: Tue, 9 Sep 2025 06:14:19 +0800
+Subject: [PATCH 3/3] Revert "Use KDE's QtQuick-QtWidgets style bridge"
+
+This reverts commit 06a58d44f2da5590879ea143006a32e571159561.
+
+This breaks some application's styling, like nheko, which relies on
+Fusion's default component size & padding.
+
+The style bridge was only applied to applications initializing
+QtWidgets. Since there is QT_QUICK_CONTROLS_CONF, leave configuration
+logic to there.
+---
+ CMakeLists.txt                            | 2 +-
+ src/qt6ct-qtplugin/CMakeLists.txt         | 2 +-
+ src/qt6ct-qtplugin/qt6ctplatformtheme.cpp | 9 ---------
+ 3 files changed, 2 insertions(+), 11 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 366c3df..5601065 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -36,7 +36,7 @@ add_compile_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060200 -DUSE_WIDGETS -D
+ add_compile_options(-Wall -Wextra)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
+ 
+-find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core Widgets LinguistTools OPTIONAL_COMPONENTS QuickControls2)
++find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core Widgets LinguistTools)
+ find_package(KF6 COMPONENTS Config ColorScheme IconThemes)
+ 
+ include(ECMQueryQt)
+diff --git a/src/qt6ct-qtplugin/CMakeLists.txt b/src/qt6ct-qtplugin/CMakeLists.txt
+index d986c7b..b7ebf8a 100644
+--- a/src/qt6ct-qtplugin/CMakeLists.txt
++++ b/src/qt6ct-qtplugin/CMakeLists.txt
+@@ -5,6 +5,6 @@ set(lib_SRCS
+ 
+ add_library(qt6ct-qtplugin MODULE ${lib_SRCS})
+ set_target_properties(qt6ct-qtplugin PROPERTIES OUTPUT_NAME qt6ct)
+-target_link_libraries(qt6ct-qtplugin PRIVATE Qt6::Widgets Qt6::GuiPrivate $<TARGET_NAME_IF_EXISTS:Qt6::QuickControls2> $<TARGET_NAME_IF_EXISTS:KF6::IconThemes> qt6ct-common)
++target_link_libraries(qt6ct-qtplugin PRIVATE Qt6::Widgets Qt6::GuiPrivate $<TARGET_NAME_IF_EXISTS:KF6::IconThemes> qt6ct-common)
+ target_compile_definitions(qt6ct-qtplugin PRIVATE $<$<TARGET_EXISTS:KF6::IconThemes>:KF_ICONTHEMES_LIB>)
+ install(TARGETS qt6ct-qtplugin DESTINATION ${QT_INSTALL_PLUGINS}/platformthemes)
+diff --git a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
+index 3ed3c64..99b523f 100644
+--- a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
++++ b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
+@@ -44,9 +44,6 @@
+ #endif
+ #include <QFile>
+ #include <QFileSystemWatcher>
+-#ifdef QT_QUICKCONTROLS2_LIB
+-#include <QQuickStyle>
+-#endif
+ #include <private/qiconloader_p.h>
+ 
+ #include "qt6ct.h"
+@@ -78,12 +75,6 @@ Qt6CTPlatformTheme::Qt6CTPlatformTheme()
+         //must be applied before Q_COREAPP_STARTUP_FUNCTION execution
+         if(Qt6CT::isKColorScheme(m_schemePath))
+             qApp->setProperty("KDE_COLOR_SCHEME_PATH", m_schemePath);
+-#if defined QT_WIDGETS_LIB && defined QT_QUICKCONTROLS2_LIB
+-        if(hasWidgets())
+-            //don't override the value explicitly set by the user
+-            if(QQuickStyle::name().isEmpty() || QQuickStyle::name() == QLatin1String("Fusion"))
+-                QQuickStyle::setStyle(QLatin1String("org.kde.desktop"));
+-#endif
+     }
+     qCDebug(lqt6ct) << "using qt6ct plugin";
+ #ifdef QT_WIDGETS_LIB
+-- 
+2.51.0
+

diff --git a/qt6ct.spec b/qt6ct.spec
index f010f00..885643f 100644
--- a/qt6ct.spec
+++ b/qt6ct.spec
@@ -17,6 +17,7 @@ Source0: %{forgesource}
 Patch0:  qt6ct-kde.patch
 Patch1:  0001-build-refactor-CMake-build-rules.patch
 Patch2:  0002-Wrap-forward-declaration-within-QT_NAMESPACE.patch
+Patch3:  0003-Revert-Use-KDE-s-QtQuick-QtWidgets-style-bridge.patch
 
 BuildRequires: cmake
 BuildRequires: extra-cmake-modules

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-08 20:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 20:06 [rpms/qt6ct] epel9: Don't use KDE's QtQuick-QtWidgets style bridge Zephyr Lykos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox