public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qt6ct] epel9: Update to 0.11 snapshot
@ 2026-10-08 20:05 Zephyr Lykos
0 siblings, 0 replies; only message in thread
From: Zephyr Lykos @ 2026-10-08 20:05 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/qt6ct
Branch : epel9
Commit : 3631a702aeb4b557dace521452274e26a0f93c6c
Author : Zephyr Lykos <git@mochaa.ws>
Date : 2025-09-08T00:47:29+08:00
Stats : +638/-52 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/qt6ct/c/3631a702aeb4b557dace521452274e26a0f93c6c?branch=epel9
Log:
Update to 0.11 snapshot
---
diff --git a/.gitignore b/.gitignore
index a6b0d47..0dfcd5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1 @@
-/qt6ct-0.4.tar.gz
-/qt6ct-0.5.tar.gz
-/qt6ct-6abd586.tar.gz
-/qt6ct-4e881ab.tar.gz
-/qt6ct-0.7.tar.gz
-/qt6ct-0.8.tar.gz
-/qt6ct-0.9.tar.gz
+/qt6ct-*.tar*
diff --git a/9.patch b/9.patch
new file mode 100644
index 0000000..a711763
--- /dev/null
+++ b/9.patch
@@ -0,0 +1,609 @@
+From 06a58d44f2da5590879ea143006a32e571159561 Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010@ya.ru>
+Date: Mon, 21 Oct 2024 01:55:18 +0400
+Subject: [PATCH 1/4] Use KDE's QtQuick-QtWidgets style bridge
+
+---
+ CMakeLists.txt | 2 +-
+ src/qt6ct-qtplugin/CMakeLists.txt | 2 +-
+ src/qt6ct-qtplugin/qt6ctplatformtheme.cpp | 9 +++++++++
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5d8aeae..558ab7e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,7 +31,7 @@ add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060200 -DUSE_WIDGETS -DQT_DEPRE
+ add_compile_options(-Wall -Wextra)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
+
+-find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core Widgets OPTIONAL_COMPONENTS LinguistTools)
++find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core Widgets OPTIONAL_COMPONENTS QuickControls2 LinguistTools)
+
+ get_target_property(QT_QTPATHS_EXECUTABLE Qt6::qtpaths IMPORTED_LOCATION)
+
+diff --git a/src/qt6ct-qtplugin/CMakeLists.txt b/src/qt6ct-qtplugin/CMakeLists.txt
+index 93a2b84..300d993 100644
+--- a/src/qt6ct-qtplugin/CMakeLists.txt
++++ b/src/qt6ct-qtplugin/CMakeLists.txt
+@@ -7,5 +7,5 @@ set(app_SRCS
+
+ add_library(qt6ct-qtplugin MODULE ${app_SRCS})
+ set_target_properties(qt6ct-qtplugin PROPERTIES OUTPUT_NAME qt6ct)
+-target_link_libraries(qt6ct-qtplugin PRIVATE Qt6::Widgets Qt6::GuiPrivate qt6ct-common)
++target_link_libraries(qt6ct-qtplugin PRIVATE Qt6::Widgets Qt6::GuiPrivate $<TARGET_NAME_IF_EXISTS:Qt6::QuickControls2> qt6ct-common)
+ install(TARGETS qt6ct-qtplugin DESTINATION ${PLUGINDIR}/platformthemes)
+diff --git a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
+index b90c801..cb27d8c 100644
+--- a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
++++ b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
+@@ -44,6 +44,9 @@
+ #endif
+ #include <QFile>
+ #include <QFileSystemWatcher>
++#ifdef QT_QUICKCONTROLS2_LIB
++#include <QQuickStyle>
++#endif
+ #include <private/qiconloader_p.h>
+
+ #include "qt6ct.h"
+@@ -67,6 +70,12 @@ Qt6CTPlatformTheme::Qt6CTPlatformTheme()
+ QMetaObject::invokeMethod(this, &Qt6CTPlatformTheme::createFSWatcher, Qt::QueuedConnection);
+ #endif
+ QGuiApplication::setFont(m_generalFont);
++#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
+--
+GitLab
+
+
+From 91ac3b8efd5f086d127e729617bbf1cc2a9e7bd0 Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010@ya.ru>
+Date: Mon, 21 Oct 2024 02:00:29 +0400
+Subject: [PATCH 2/4] Write widget style and icon theme to kdeglobals
+
+This allows to style applications that use KStyleManager
+---
+ CMakeLists.txt | 1 +
+ src/qt6ct/CMakeLists.txt | 3 ++-
+ src/qt6ct/appearancepage.cpp | 12 ++++++++++++
+ src/qt6ct/appearancepage.h | 4 ++++
+ src/qt6ct/iconthemepage.cpp | 16 ++++++++++++++++
+ src/qt6ct/iconthemepage.h | 4 ++++
+ src/qt6ct/mainwindow.cpp | 8 ++++++++
+ src/qt6ct/tabpage.h | 8 ++++++++
+ 8 files changed, 55 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 558ab7e..0cc9721 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -32,6 +32,7 @@ add_compile_options(-Wall -Wextra)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
+
+ find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core Widgets OPTIONAL_COMPONENTS QuickControls2 LinguistTools)
++find_package(KF6Config)
+
+ get_target_property(QT_QTPATHS_EXECUTABLE Qt6::qtpaths IMPORTED_LOCATION)
+
+diff --git a/src/qt6ct/CMakeLists.txt b/src/qt6ct/CMakeLists.txt
+index fb0e1f7..7efe4eb 100644
+--- a/src/qt6ct/CMakeLists.txt
++++ b/src/qt6ct/CMakeLists.txt
+@@ -31,6 +31,7 @@ if(Qt6LinguistTools_FOUND)
+ endif()
+
+ add_executable(qt6ct ${app_SRCS})
+-target_link_libraries(qt6ct PRIVATE Qt6::Widgets Qt6::WidgetsPrivate qt6ct-common)
++target_link_libraries(qt6ct PRIVATE Qt6::Widgets Qt6::WidgetsPrivate $<TARGET_NAME_IF_EXISTS:KF6::ConfigCore> qt6ct-common)
++target_compile_definitions(qt6ct PRIVATE $<$<TARGET_EXISTS:KF6::ConfigCore>:KF_CONFIGCORE_LIB>)
+ install(TARGETS qt6ct DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES qt6ct.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
+diff --git a/src/qt6ct/appearancepage.cpp b/src/qt6ct/appearancepage.cpp
+index 2f1faf8..0745b16 100644
+--- a/src/qt6ct/appearancepage.cpp
++++ b/src/qt6ct/appearancepage.cpp
+@@ -35,6 +35,9 @@
+ #include <QMenu>
+ #include <QIcon>
+ #include <QStringList>
++#ifdef KF_CONFIGCORE_LIB
++#include <KConfigGroup>
++#endif
+ #include <qpa/qplatformthemefactory_p.h>
+ #include <qpa/qplatformtheme.h>
+ #include "qt6ct.h"
+@@ -126,6 +129,15 @@ void AppearancePage::writeSettings(QSettings *settings)
+ settings->endGroup();
+ }
+
++#ifdef KF_CONFIGCORE_LIB
++void AppearancePage::writeSettings(KSharedConfigPtr config)
++{
++ KConfigGroup group(config, "KDE");
++ group.writeEntry("widgetStyle", "qt6ct-style");
++ group.sync();
++}
++#endif
++
+ void AppearancePage::on_styleComboBox_textActivated(const QString &text)
+ {
+ QStyle *style = QStyleFactory::create(text);
+diff --git a/src/qt6ct/appearancepage.h b/src/qt6ct/appearancepage.h
+index e196b62..31c26c6 100644
+--- a/src/qt6ct/appearancepage.h
++++ b/src/qt6ct/appearancepage.h
+@@ -49,6 +49,10 @@ public:
+
+ void writeSettings(QSettings *settings) override;
+
++#ifdef KF_CONFIGCORE_LIB
++ void writeSettings(KSharedConfigPtr config) override;
++#endif
++
+ private slots:
+ void on_styleComboBox_textActivated(const QString &text);
+ void on_colorSchemeComboBox_activated(int);
+diff --git a/src/qt6ct/iconthemepage.cpp b/src/qt6ct/iconthemepage.cpp
+index 37960f9..9156116 100644
+--- a/src/qt6ct/iconthemepage.cpp
++++ b/src/qt6ct/iconthemepage.cpp
+@@ -34,6 +34,9 @@
+ #include <QProgressBar>
+ #include <QMetaObject>
+ #include <QThread>
++#ifdef KF_CONFIGCORE_LIB
++#include <KConfigGroup>
++#endif
+ #include "qt6ct.h"
+ #include "iconthemepage.h"
+ #include "ui_iconthemepage.h"
+@@ -71,6 +74,19 @@ void IconThemePage::writeSettings(QSettings *settings)
+ settings->setValue("Appearance/icon_theme"_L1, item->data(3, Qt::UserRole));
+ }
+
++#ifdef KF_CONFIGCORE_LIB
++void IconThemePage::writeSettings(KSharedConfigPtr config)
++{
++ QTreeWidgetItem *item = m_ui->treeWidget->currentItem();
++ if(!item)
++ return;
++
++ KConfigGroup group(config, "Icons");
++ group.writeEntry("Theme", item->data(3, Qt::UserRole));
++ group.sync();
++}
++#endif
++
+ void IconThemePage::onFinished()
+ {
+ m_ui->treeWidget->addTopLevelItems(m_items);
+diff --git a/src/qt6ct/iconthemepage.h b/src/qt6ct/iconthemepage.h
+index 8938671..9ad3580 100644
+--- a/src/qt6ct/iconthemepage.h
++++ b/src/qt6ct/iconthemepage.h
+@@ -51,6 +51,10 @@ public:
+
+ void writeSettings(QSettings *settings) override;
+
++#ifdef KF_CONFIGCORE_LIB
++ void writeSettings(KSharedConfigPtr config) override;
++#endif
++
+ private slots:
+ void onFinished();
+
+diff --git a/src/qt6ct/mainwindow.cpp b/src/qt6ct/mainwindow.cpp
+index 122dff2..10296a4 100644
+--- a/src/qt6ct/mainwindow.cpp
++++ b/src/qt6ct/mainwindow.cpp
+@@ -91,11 +91,19 @@ void MainWindow::on_buttonBox_clicked(QAbstractButton *button)
+ if(id == QDialogButtonBox::Ok || id == QDialogButtonBox::Apply)
+ {
+ QSettings settings(Qt6CT::configFile(), QSettings::IniFormat);
++#ifdef KF_CONFIGCORE_LIB
++ KSharedConfigPtr config = KSharedConfig::openConfig("kdeglobals");
++#endif
+ for(int i = 0; i < m_ui->tabWidget->count(); ++i)
+ {
+ TabPage *p = qobject_cast<TabPage*>(m_ui->tabWidget->widget(i));
+ if(p)
++ {
+ p->writeSettings(&settings);
++#ifdef KF_CONFIGCORE_LIB
++ p->writeSettings(config);
++#endif
++ }
+ }
+ }
+
+diff --git a/src/qt6ct/tabpage.h b/src/qt6ct/tabpage.h
+index c77b5a7..4e46ddd 100644
+--- a/src/qt6ct/tabpage.h
++++ b/src/qt6ct/tabpage.h
+@@ -32,6 +32,10 @@
+ #include <QWidget>
+ #include <QSettings>
+
++#ifdef KF_CONFIGCORE_LIB
++#include <KSharedConfig>
++#endif
++
+ class TabPage : public QWidget
+ {
+ Q_OBJECT
+@@ -39,6 +43,10 @@ public:
+ explicit TabPage(QWidget *parent = nullptr);
+
+ virtual void writeSettings(QSettings *settings) = 0;
++
++#ifdef KF_CONFIGCORE_LIB
++ virtual void writeSettings(KSharedConfigPtr config) {}
++#endif
+ };
+
+ #endif // TABPAGE_H
+--
+GitLab
+
+
+From ee837c42fff5771504d6213f53878549f731ea51 Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010@ya.ru>
+Date: Mon, 21 Oct 2024 01:47:18 +0400
+Subject: [PATCH 3/4] Add KDE color schemes support
+
+---
+ CMakeLists.txt | 1 +
+ src/qt6ct-common/CMakeLists.txt | 3 ++-
+ src/qt6ct-common/qt6ct.cpp | 17 +++++++++++++++
+ src/qt6ct-common/qt6ct.h | 1 +
+ src/qt6ct-qtplugin/qt6ctplatformtheme.cpp | 26 +++++++++++++++++++++++
+ src/qt6ct-qtplugin/qt6ctplatformtheme.h | 5 ++++-
+ src/qt6ct/CMakeLists.txt | 2 +-
+ src/qt6ct/appearancepage.cpp | 22 ++++++++++++++++---
+ src/qt6ct/appearancepage.h | 2 +-
+ 9 files changed, 72 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0cc9721..b18a42e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,6 +33,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
+
+ find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core Widgets OPTIONAL_COMPONENTS QuickControls2 LinguistTools)
+ find_package(KF6Config)
++find_package(KF6ColorScheme)
+
+ get_target_property(QT_QTPATHS_EXECUTABLE Qt6::qtpaths IMPORTED_LOCATION)
+
+diff --git a/src/qt6ct-common/CMakeLists.txt b/src/qt6ct-common/CMakeLists.txt
+index 3b9f0b9..2afce8d 100644
+--- a/src/qt6ct-common/CMakeLists.txt
++++ b/src/qt6ct-common/CMakeLists.txt
+@@ -24,5 +24,6 @@ set(app_SRCS
+
+ add_library(qt6ct-common SHARED ${app_SRCS})
+ set_target_properties(qt6ct-common PROPERTIES VERSION ${QT6CT_VERSION})
+-target_link_libraries(qt6ct-common PRIVATE Qt6::Gui)
++target_link_libraries(qt6ct-common PRIVATE Qt6::Gui $<TARGET_NAME_IF_EXISTS:KF6::ConfigCore> $<TARGET_NAME_IF_EXISTS:KF6::ColorScheme>)
++target_compile_definitions(qt6ct-common PRIVATE $<$<TARGET_EXISTS:KF6::ConfigCore>:KF_CONFIGCORE_LIB> $<$<TARGET_EXISTS:KF6::ColorScheme>:KF_COLORSCHEME_LIB>)
+ install(TARGETS qt6ct-common DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/src/qt6ct-common/qt6ct.cpp b/src/qt6ct-common/qt6ct.cpp
+index 616440b..896895d 100644
+--- a/src/qt6ct-common/qt6ct.cpp
++++ b/src/qt6ct-common/qt6ct.cpp
+@@ -34,6 +34,10 @@
+ #include <QFile>
+ #include <QSettings>
+ #include <QtDebug>
++#if defined KF_CONFIGCORE_LIB && defined KF_COLORSCHEME_LIB
++#include <KSharedConfig>
++#include <KColorScheme>
++#endif
+ #include "qt6ct.h"
+
+ #ifndef QT6CT_DATADIR
+@@ -121,6 +125,9 @@ QStringList Qt6CT::sharedColorSchemePaths()
+ for(const QString &p : QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation))
+ {
+ paths << (p + QStringLiteral("/qt6ct/colors"));
++#if defined KF_CONFIGCORE_LIB && defined KF_COLORSCHEME_LIB
++ paths << (p + QStringLiteral("/color-schemes"));
++#endif
+ }
+ paths << QStringLiteral(QT6CT_DATADIR"/qt6ct/colors");
+ paths.removeDuplicates();
+@@ -148,8 +155,18 @@ QString Qt6CT::resolvePath(const QString &path)
+ return tmp;
+ }
+
++bool Qt6CT::isKColorScheme(const QString &filePath)
++{
++ return filePath.toLower().endsWith(".colors");
++}
++
+ QPalette Qt6CT::loadColorScheme(const QString &filePath, const QPalette &fallback)
+ {
++#if defined KF_CONFIGCORE_LIB && defined KF_COLORSCHEME_LIB
++ if(isKColorScheme(filePath))
++ return KColorScheme::createApplicationPalette(KSharedConfig::openConfig(filePath));
++#endif
++
+ QPalette customPalette;
+ QSettings settings(filePath, QSettings::IniFormat);
+ settings.beginGroup("ColorScheme"_L1);
+diff --git a/src/qt6ct-common/qt6ct.h b/src/qt6ct-common/qt6ct.h
+index f253987..7d6b283 100644
+--- a/src/qt6ct-common/qt6ct.h
++++ b/src/qt6ct-common/qt6ct.h
+@@ -101,6 +101,7 @@ public:
+ static QString styleColorSchemeFile();
+ static QStringList sharedColorSchemePaths();
+ static QString resolvePath(const QString &path);
++ static bool isKColorScheme(const QString &filePath);
+ static QPalette loadColorScheme(const QString &filePath, const QPalette &fallback);
+
+ static void registerStyleInstance(StyleInstance *instance);
+diff --git a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
+index cb27d8c..f43a29b 100644
+--- a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
++++ b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
+@@ -70,6 +70,9 @@ Qt6CTPlatformTheme::Qt6CTPlatformTheme()
+ QMetaObject::invokeMethod(this, &Qt6CTPlatformTheme::createFSWatcher, Qt::QueuedConnection);
+ #endif
+ QGuiApplication::setFont(m_generalFont);
++ //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
+@@ -82,6 +85,7 @@ Qt6CTPlatformTheme::Qt6CTPlatformTheme()
+ if(!QStyleFactory::keys().contains(u"qt6ct-style"_s))
+ qCCritical(lqt6ct) << "unable to find qt6ct proxy style";
+ #endif
++ QCoreApplication::instance()->installEventFilter(this);
+ }
+
+ Qt6CTPlatformTheme::~Qt6CTPlatformTheme()
+@@ -167,6 +171,11 @@ void Qt6CTPlatformTheme::applySettings()
+
+ QGuiApplication::setFont(m_generalFont); //apply font
+
++ if(Qt6CT::isKColorScheme(m_schemePath))
++ qApp->setProperty("KDE_COLOR_SCHEME_PATH", m_schemePath);
++ else if(m_update)
++ qApp->setProperty("KDE_COLOR_SCHEME_PATH", QVariant());
++
+ #ifdef QT_WIDGETS_LIB
+ if(hasWidgets())
+ {
+@@ -243,6 +252,8 @@ void Qt6CTPlatformTheme::updateSettings()
+
+ void Qt6CTPlatformTheme::readSettings()
+ {
++ m_schemePath.clear();
++
+ QSettings settings(Qt6CT::configFile(), QSettings::IniFormat);
+
+ settings.beginGroup("Appearance"_L1);
+@@ -252,6 +263,7 @@ void Qt6CTPlatformTheme::readSettings()
+ if(!schemePath.isEmpty() && settings.value("custom_palette"_L1, false).toBool())
+ {
+ schemePath = Qt6CT::resolvePath(schemePath); //replace environment variables
++ m_schemePath = schemePath;
+ m_palette = Qt6CT::loadColorScheme(schemePath, m_palette);
+ }
+ m_iconTheme = settings.value("icon_theme"_L1).toString();
+@@ -361,3 +373,17 @@ QString Qt6CTPlatformTheme::loadStyleSheets(const QStringList &paths)
+ content.replace(regExp, u"\n"_s);
+ return content;
+ }
++
++//There's such a thing as KColorSchemeManager that lets the user to change the color scheme
++//application-wide and we should re-apply the color scheme if KCSM resets it to the default
++//which leads KColorScheme to get the color scheme from kdeglobals which won't help us.
++bool Qt6CTPlatformTheme::eventFilter(QObject *obj, QEvent *e)
++{
++ if(obj == qApp &&
++ e->type() == QEvent::DynamicPropertyChange &&
++ static_cast<QDynamicPropertyChangeEvent*>(e)->propertyName() == "KDE_COLOR_SCHEME_PATH" &&
++ qApp->property("KDE_COLOR_SCHEME_PATH").toString().isEmpty() &&
++ Qt6CT::isKColorScheme(m_schemePath))
++ applySettings();
++ return QObject::eventFilter(obj, e);
++}
+diff --git a/src/qt6ct-qtplugin/qt6ctplatformtheme.h b/src/qt6ct-qtplugin/qt6ctplatformtheme.h
+index 5312a64..80ac0a4 100644
+--- a/src/qt6ct-qtplugin/qt6ctplatformtheme.h
++++ b/src/qt6ct-qtplugin/qt6ctplatformtheme.h
+@@ -66,6 +66,9 @@ public:
+ //virtual QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const;
+ //virtual QString standardButtonText(int button) const;
+
++protected:
++ bool eventFilter(QObject *obj, QEvent *e) override;
++
+ private slots:
+ void applySettings();
+ #ifdef QT_WIDGETS_LIB
+@@ -79,7 +82,7 @@ private:
+ bool hasWidgets();
+ #endif
+ QString loadStyleSheets(const QStringList &paths);
+- QString m_style, m_iconTheme, m_userStyleSheet, m_prevStyleSheet;
++ QString m_style, m_schemePath, m_iconTheme, m_userStyleSheet, m_prevStyleSheet;
+ QPalette m_palette;
+ QFont m_generalFont, m_fixedFont;
+ int m_doubleClickInterval;
+diff --git a/src/qt6ct/CMakeLists.txt b/src/qt6ct/CMakeLists.txt
+index 7efe4eb..578f3b0 100644
+--- a/src/qt6ct/CMakeLists.txt
++++ b/src/qt6ct/CMakeLists.txt
+@@ -32,6 +32,6 @@ endif()
+
+ add_executable(qt6ct ${app_SRCS})
+ target_link_libraries(qt6ct PRIVATE Qt6::Widgets Qt6::WidgetsPrivate $<TARGET_NAME_IF_EXISTS:KF6::ConfigCore> qt6ct-common)
+-target_compile_definitions(qt6ct PRIVATE $<$<TARGET_EXISTS:KF6::ConfigCore>:KF_CONFIGCORE_LIB>)
++target_compile_definitions(qt6ct PRIVATE $<$<TARGET_EXISTS:KF6::ConfigCore>:KF_CONFIGCORE_LIB> $<$<TARGET_EXISTS:KF6::ColorScheme>:KF_COLORSCHEME_LIB>)
+ install(TARGETS qt6ct DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES qt6ct.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
+diff --git a/src/qt6ct/appearancepage.cpp b/src/qt6ct/appearancepage.cpp
+index 0745b16..09f753a 100644
+--- a/src/qt6ct/appearancepage.cpp
++++ b/src/qt6ct/appearancepage.cpp
+@@ -73,7 +73,7 @@ AppearancePage::AppearancePage(QWidget *parent) :
+ QMenu *menu = new QMenu(this);
+ menu->addAction(QIcon::fromTheme(u"document-new"_s), tr("Create"), this, qOverload<>(&AppearancePage::createColorScheme));
+ m_changeColorSchemeAction = menu->addAction(QIcon::fromTheme(u"accessories-text-editor"_s), tr("Edit"), this, &AppearancePage::changeColorScheme);
+- menu->addAction(QIcon::fromTheme(u"edit-copy"_s), tr("Create a Copy"), this, &AppearancePage::copyColorScheme);
++ m_copyColorSchemeAction = menu->addAction(QIcon::fromTheme(u"edit-copy"_s), tr("Create a Copy"), this, &AppearancePage::copyColorScheme);
+ m_renameColorSchemeAction = menu->addAction(tr("Rename"), this, &AppearancePage::renameColorScheme);
+ menu->addSeparator();
+ m_removeColorSchemeAction = menu->addAction(QIcon::fromTheme(u"edit-delete"_s), tr("Remove"), this, &AppearancePage::removeColorScheme);
+@@ -345,6 +345,7 @@ void AppearancePage::setPreviewPalette(const QPalette &p)
+
+ void AppearancePage::updateActions()
+ {
++ m_copyColorSchemeAction->setVisible(!Qt6CT::isKColorScheme(m_ui->colorSchemeComboBox->currentData().toString()));
+ if(m_ui->colorSchemeComboBox->count() == 0 ||
+ !QFileInfo(m_ui->colorSchemeComboBox->currentData().toString()).isWritable())
+ {
+@@ -440,11 +441,26 @@ void AppearancePage::findColorSchemes(const QString &path)
+ {
+ QDir dir(path);
+ dir.setFilter(QDir::Files);
+- dir.setNameFilters({ u"*.conf"_s });
++ QStringList nameFilters;
++ nameFilters << u"*.conf"_s;
++#if defined KF_CONFIGCORE_LIB && defined KF_COLORSCHEME_LIB
++ nameFilters << u"*.colors"_s;
++#endif
++ dir.setNameFilters(nameFilters);
+
+ for(const QFileInfo &info : dir.entryInfoList())
+ {
+- m_ui->colorSchemeComboBox->addItem(info.baseName(), info.filePath());
++ QString name = info.baseName();
++ QString path = info.filePath();
++#if defined KF_CONFIGCORE_LIB && defined KF_COLORSCHEME_LIB
++ if(Qt6CT::isKColorScheme(path))
++ {
++ KSharedConfigPtr config = KSharedConfig::openConfig(path, KConfig::SimpleConfig);
++ KConfigGroup group(config, "General");
++ name = group.readEntry("Name", name) + " (KColorScheme)";
++ }
++#endif
++ m_ui->colorSchemeComboBox->addItem(name, path);
+ }
+ }
+
+diff --git a/src/qt6ct/appearancepage.h b/src/qt6ct/appearancepage.h
+index 31c26c6..8e4902e 100644
+--- a/src/qt6ct/appearancepage.h
++++ b/src/qt6ct/appearancepage.h
+@@ -77,7 +77,7 @@ private:
+ QStyle *m_selectedStyle = nullptr;
+ QPalette m_customPalette;
+ QWidget *m_previewWidget;
+- QAction *m_changeColorSchemeAction, *m_renameColorSchemeAction, *m_removeColorSchemeAction;
++ QAction *m_changeColorSchemeAction, *m_copyColorSchemeAction, *m_renameColorSchemeAction, *m_removeColorSchemeAction;
+ Ui::PreviewForm *m_previewUi;
+ };
+
+--
+GitLab
+
+
+From 6fa66ca94f1f8fa5119ad6669d5e3547f4077c1c Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010@ya.ru>
+Date: Mon, 21 Oct 2024 01:58:02 +0400
+Subject: [PATCH 4/4] Use KDE's icon engine
+
+It has KDE color schemes support that prevents dark icons on dark background
+---
+ CMakeLists.txt | 1 +
+ src/qt6ct-qtplugin/CMakeLists.txt | 3 ++-
+ src/qt6ct-qtplugin/qt6ctplatformtheme.cpp | 12 ++++++++++++
+ src/qt6ct-qtplugin/qt6ctplatformtheme.h | 4 +++-
+ 4 files changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b18a42e..0d88aeb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -34,6 +34,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
+ find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core Widgets OPTIONAL_COMPONENTS QuickControls2 LinguistTools)
+ find_package(KF6Config)
+ find_package(KF6ColorScheme)
++find_package(KF6IconThemes)
+
+ get_target_property(QT_QTPATHS_EXECUTABLE Qt6::qtpaths IMPORTED_LOCATION)
+
+diff --git a/src/qt6ct-qtplugin/CMakeLists.txt b/src/qt6ct-qtplugin/CMakeLists.txt
+index 300d993..e5366ef 100644
+--- a/src/qt6ct-qtplugin/CMakeLists.txt
++++ b/src/qt6ct-qtplugin/CMakeLists.txt
+@@ -7,5 +7,6 @@ set(app_SRCS
+
+ add_library(qt6ct-qtplugin MODULE ${app_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> qt6ct-common)
++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_compile_definitions(qt6ct-qtplugin PRIVATE $<$<TARGET_EXISTS:KF6::IconThemes>:KF_ICONTHEMES_LIB>)
+ install(TARGETS qt6ct-qtplugin DESTINATION ${PLUGINDIR}/platformthemes)
+diff --git a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
+index f43a29b..cfcc9ec 100644
+--- a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
++++ b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
+@@ -55,6 +55,11 @@
+ #include <QStringList>
+ #include <qpa/qplatformthemefactory_p.h>
+
++#ifdef KF_ICONTHEMES_LIB
++#include <KIconEngine>
++#include <KIconLoader>
++#endif
++
+ Q_LOGGING_CATEGORY(lqt6ct, "qt6ct", QtWarningMsg)
+
+ //QT_QPA_PLATFORMTHEME=qt6ct
+@@ -161,6 +166,13 @@ QIcon Qt6CTPlatformTheme::fileIcon(const QFileInfo &fileInfo, QPlatformTheme::Ic
+ return QIcon::fromTheme(type.iconName());
+ }
+
++#ifdef KF_ICONTHEMES_LIB
++QIconEngine *Qt6CTPlatformTheme::createIconEngine(const QString &iconName) const
++{
++ return new KIconEngine(iconName, KIconLoader::global());
++}
++#endif
++
+ void Qt6CTPlatformTheme::applySettings()
+ {
+ if(!QGuiApplication::desktopSettingsAware() || m_isIgnored)
+diff --git a/src/qt6ct-qtplugin/qt6ctplatformtheme.h b/src/qt6ct-qtplugin/qt6ctplatformtheme.h
+index 80ac0a4..db66d33 100644
+--- a/src/qt6ct-qtplugin/qt6ctplatformtheme.h
++++ b/src/qt6ct-qtplugin/qt6ctplatformtheme.h
+@@ -62,7 +62,9 @@ public:
+ //virtual QPixmap fileIconPixmap(const QFileInfo &fileInfo, const QSizeF &size,
+ // QPlatformTheme::IconOptions iconOptions = 0) const;
+
+- //virtual QIconEngine *createIconEngine(const QString &iconName) const;
++#ifdef KF_ICONTHEMES_LIB
++ virtual QIconEngine *createIconEngine(const QString &iconName) const override;
++#endif
+ //virtual QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const;
+ //virtual QString standardButtonText(int button) const;
+
+--
+GitLab
+
diff --git a/qt6ct.spec b/qt6ct.spec
index 8dd6701..aec0628 100644
--- a/qt6ct.spec
+++ b/qt6ct.spec
@@ -1,74 +1,52 @@
-#For git snapshots, set to 0 to use release instead:
-%global usesnapshot 0
-%if 0%{?usesnapshot}
-%global commit0 4e881ab49b26f82eb3e66e1ffe73f4f23af7b4a3
-%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
-%global snapshottag .git%{shortcommit0}
-%endif
+%global forgename gitlab
+%global forgeurl https://www.opencode.net/trialuser/qt6ct
+%global commit 23a985f45cf793ce7ce05811411d2374b4f979c4
+
+%forgemeta
Name: qt6ct
-Version: 0.9
-%if 0%{?usesnapshot}
-Release: 0.14%{?snapshottag}%{?dist}
-%else
-Release: 14%{?dist}
-%endif
+Version: 0.11
+Release: 1%{?dist}
Summary: Qt6 - Configuration Tool
-# The entire source code is under BSD-2-Clause License
-# Automatically converted from old format: BSD - review is highly recommended.
-License: LicenseRef-Callaway-BSD
-Url: https://github.com/trialuser02/qt6ct
-
-%if 0%{?usesnapshot}
-Source0: https://github.com/trialuser02/qt6ct/archive/%{commit0}/%{name}-%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
-%else
-Source0: https://github.com/trialuser02/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
-%endif
+License: BSD-2-Clause
+URL: %{forgeurl}
-ExcludeArch: s390x
+Source0: %{forgesource}
+# https://www.opencode.net/trialuser/qt6ct/-/merge_requests/9
+Patch: https://www.opencode.net/trialuser/qt6ct/-/merge_requests/9.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: qt6-rpm-macros >= %{version}
BuildRequires: qt6-qtbase-devel
BuildRequires: qt6-qtbase-private-devel
+BuildRequires: qt6-qtdeclarative-devel
BuildRequires: qt6-linguist
-BuildRequires: pkgconfig(xkbcommon)
-BuildRequires: chrpath
-BuildRequires: desktop-file-utils
-Requires: qt6-qtsvg
+BuildRequires: kf6-kiconthemes-devel
+BuildRequires: kf6-kconfig-devel
+BuildRequires: desktop-file-utils
%description
This program allows users to configure Qt6 settings (theme, font, icons, etc.)
under DE/WM without Qt integration.
%prep
-%if 0%{?usesnapshot}
-%setup -q -n %{name}-%{commit0}
-%else
-%autosetup -n %{name}-%{version} -p1
-%endif
+%forgeautosetup -p1
%build
-# Create translation files.
-lrelease-qt6 src/qt6ct/translations/*.ts
-%{_qt6_qmake} %{_qt6_qmake_flags}
-%make_build
+%cmake
+%cmake_build
%install
-%make_install INSTALL_ROOT=%{buildroot}
-# /usr/bin/qt6ct' contains a standard rpath '/usr/lib64' in [/usr/lib64]
-chrpath --delete %{buildroot}%{_bindir}/%{name}
-chrpath --delete %{buildroot}%{_qt6_plugindir}/styles/libqt6ct-style.so
-chrpath --delete %{buildroot}%{_qt6_plugindir}/platformthemes/libqt6ct.so
+%cmake_install
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%files
-%doc AUTHORS README ChangeLog
+%doc AUTHORS README.md ChangeLog
%license COPYING
%{_bindir}/%{name}
%{_qt6_plugindir}/platformthemes/libqt6ct.so
@@ -80,10 +58,15 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%dir %{_datadir}/%{name}/qss/
%{_datadir}/%{name}/qss/*.qss
%{_libdir}/libqt6ct-common.so
-%{_libdir}/libqt6ct-common.so.0
%{_libdir}/libqt6ct-common.so.%{version}*
%changelog
+* Sun Sep 07 2025 Zephyr Lykos <fedora@mochaa.ws> - 0.11-1
+- New version, switch upstream URL
+- Use CMake to build, remove unused BR
+- Add KDE theming support
+- Remove ExcludeArch s390x
+
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.9-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
diff --git a/sources b/sources
index e49a15d..4faded4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (qt6ct-0.9.tar.gz) = a7c5ee0458b0bd662f1c6868abfc2ee97b4d97032dde9f21fdfaa3be3a2c4439aa68826d41918743881a89c61feae9775ec72e471208308a2c1b4cdc01e3ec4f
+SHA512 (qt6ct-23a985f45cf793ce7ce05811411d2374b4f979c4.tar.bz2) = 8dad9a0a224db9938bcfbbc07489221c89759e801cf896d920922cd14e9040fcd28290e99db6c9e60f146c2a4fcbf859efa7aa9a65519d4bdb5901baca330378
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-08 20:05 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:05 [rpms/qt6ct] epel9: Update to 0.11 snapshot Zephyr Lykos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox