Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kf6-kcolorscheme for 
openSUSE:Factory checked in at 2026-01-12 10:11:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kf6-kcolorscheme (Old)
 and      /work/SRC/openSUSE:Factory/.kf6-kcolorscheme.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kf6-kcolorscheme"

Mon Jan 12 10:11:10 2026 rev:23 rq:1326410 version:6.22.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kf6-kcolorscheme/kf6-kcolorscheme.changes        
2025-12-16 15:55:15.256322250 +0100
+++ 
/work/SRC/openSUSE:Factory/.kf6-kcolorscheme.new.1928/kf6-kcolorscheme.changes  
    2026-01-12 10:14:32.548774015 +0100
@@ -1,0 +2,12 @@
+Sun Jan  4 14:47:06 UTC 2026 - Christophe Marin <[email protected]>
+
+- Update to 6.22.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/frameworks/6/6.22.0
+- Changes since 6.21.0:
+  * Update dependency version to 6.22.0
+  * Use Qt API instead of KColorSchemeWatcher
+  * Update version to 6.22.0
+
+-------------------------------------------------------------------

Old:
----
  kcolorscheme-6.21.0.tar.xz
  kcolorscheme-6.21.0.tar.xz.sig

New:
----
  kcolorscheme-6.22.0.tar.xz
  kcolorscheme-6.22.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kf6-kcolorscheme.spec ++++++
--- /var/tmp/diff_new_pack.D21ADw/_old  2026-01-12 10:14:34.640859925 +0100
+++ /var/tmp/diff_new_pack.D21ADw/_new  2026-01-12 10:14:34.640859925 +0100
@@ -19,11 +19,11 @@
 %define qt6_version 6.8.0
 
 %define rname kcolorscheme
-# Full KF6 version (e.g. 6.21.0)
+# Full KF6 version (e.g. 6.22.0)
 %{!?_kf6_version: %global _kf6_version %{version}}
 %bcond_without released
 Name:           kf6-kcolorscheme
-Version:        6.21.0
+Version:        6.22.0
 Release:        0
 Summary:        Classes to read and interact with KColorScheme
 License:        LGPL-2.0-or-later


++++++ kcolorscheme-6.21.0.tar.xz -> kcolorscheme-6.22.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcolorscheme-6.21.0/CMakeLists.txt 
new/kcolorscheme-6.22.0/CMakeLists.txt
--- old/kcolorscheme-6.21.0/CMakeLists.txt      2025-12-05 14:19:28.000000000 
+0100
+++ new/kcolorscheme-6.22.0/CMakeLists.txt      2026-01-02 18:40:44.000000000 
+0100
@@ -3,12 +3,12 @@
 
 cmake_minimum_required(VERSION 3.16)
 
-set(KF_VERSION "6.21.0") # handled by release scripts
-set(KF_DEP_VERSION "6.21.0") # handled by release scripts
+set(KF_VERSION "6.22.0") # handled by release scripts
+set(KF_DEP_VERSION "6.22.0") # handled by release scripts
 project(KColorScheme VERSION ${KF_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 6.21.0  NO_MODULE)
+find_package(ECM 6.22.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -47,8 +47,8 @@
 find_package(KF6I18n ${KF_DEP_VERSION} REQUIRED)
 
 ecm_set_disabled_deprecation_versions(
-    QT 6.10.0
-    KF 6.19.0
+    QT 6.11.0
+    KF 6.21.0
 )
 
 add_definitions(-DTRANSLATION_DOMAIN=\"kcolorscheme6\")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcolorscheme-6.21.0/po/ga/kcolorscheme6.po 
new/kcolorscheme-6.22.0/po/ga/kcolorscheme6.po
--- old/kcolorscheme-6.21.0/po/ga/kcolorscheme6.po      1970-01-01 
01:00:00.000000000 +0100
+++ new/kcolorscheme-6.22.0/po/ga/kcolorscheme6.po      2026-01-02 
18:40:44.000000000 +0100
@@ -0,0 +1,23 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR This file is copyright:
+# This file is distributed under the same license as the kcolorscheme package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: kcolorscheme\n"
+"Report-Msgid-Bugs-To: https://bugs.kde.org\n";
+"POT-Creation-Date: 2025-11-17 11:49+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <[email protected]>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: kcolorschememodel.cpp:73
+#, kde-format
+msgid "Default"
+msgstr ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcolorscheme-6.21.0/src/kcolorschemehelpers_p.h 
new/kcolorscheme-6.22.0/src/kcolorschemehelpers_p.h
--- old/kcolorscheme-6.21.0/src/kcolorschemehelpers_p.h 2025-12-05 
14:19:28.000000000 +0100
+++ new/kcolorscheme-6.22.0/src/kcolorschemehelpers_p.h 2026-01-02 
18:40:44.000000000 +0100
@@ -13,23 +13,9 @@
 #include <QPalette>
 #include <QVariant>
 
-#include <array>
-
-#ifdef Q_OS_WIN
-#include "windows.h"
-#endif
+#include "kcolorschememanager_p.h"
 
-#ifdef Q_OS_WIN
-static bool isHighContrastModeActive()
-{
-    HIGHCONTRAST result;
-    result.cbSize = sizeof(HIGHCONTRAST);
-    if (SystemParametersInfo(SPI_GETHIGHCONTRAST, result.cbSize, &result, 0)) {
-        return (result.dwFlags & HCF_HIGHCONTRASTON);
-    }
-    return false;
-}
-#endif
+#include <array>
 
 static KSharedConfigPtr defaultConfig()
 {
@@ -38,12 +24,11 @@
     // Read from the application's color scheme file (as set by 
KColorSchemeManager).
     // If unset, this is equivalent to openConfig() and the system scheme is 
used.
     const auto colorSchemePath = 
qApp->property("KDE_COLOR_SCHEME_PATH").toString();
-#ifdef Q_OS_WIN
     // If no color scheme is set and high-contrast is active then use the 
system colors
-    if (colorSchemePath.isEmpty() && isHighContrastModeActive()) {
+    if (colorSchemePath.isEmpty() && 
KColorSchemeManagerPrivate::contrastPreference() == 
KColorSchemeManagerPrivate::HighContrast) {
         return {};
     }
-#endif
+
     if (!config || config->name() != colorSchemePath) {
         config = KSharedConfig::openConfig(colorSchemePath);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcolorscheme-6.21.0/src/kcolorschememanager.cpp 
new/kcolorscheme-6.22.0/src/kcolorschememanager.cpp
--- old/kcolorscheme-6.21.0/src/kcolorschememanager.cpp 2025-12-05 
14:19:28.000000000 +0100
+++ new/kcolorscheme-6.22.0/src/kcolorschememanager.cpp 2026-01-02 
18:40:44.000000000 +0100
@@ -11,7 +11,6 @@
 #include "kcolorscheme.h"
 #include "kcolorschememodel.h"
 
-#include <KColorSchemeWatcher>
 #include <KConfigGroup>
 #include <KConfigGui>
 #include <KLocalizedString>
@@ -24,10 +23,19 @@
 #include <QPainter>
 #include <QPointer>
 #include <QStandardPaths>
+#include <QStyleHints>
+
+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
+#include <QAccessibilityHints>
+#endif
 
 #include <private/qguiapplication_p.h>
 #include <qpa/qplatformtheme.h>
 
+#ifdef Q_OS_WIN
+#include <windows.h>
+#endif
+
 // ensure we are linking KConfigGui, so QColor I/O from KConfig works
 KCONFIGGUI_EXPORT int initKConfigGroupGui();
 static int s_init = initKConfigGroupGui();
@@ -66,20 +74,20 @@
 
 QString KColorSchemeManagerPrivate::automaticColorSchemeId() const
 {
-    if (!m_colorSchemeWatcher) {
+    QString platformThemeSchemePath = 
qApp->property("KDE_COLOR_SCHEME_PATH").toString();
+    if (isKdePlatformTheme() || !platformThemeSchemePath.isEmpty()) {
         return QString();
     }
 
-    switch (m_colorSchemeWatcher->systemPreference()) {
-    case KColorSchemeWatcher::PreferHighContrast:
+    if (contrastPreference() == ContrastPreference::HighContrast) {
         return QString();
-    case KColorSchemeWatcher::PreferDark:
+    }
+
+    if (qGuiApp->styleHints()->colorScheme() == Qt::ColorScheme::Dark) {
         return getDarkColorScheme();
-    case KColorSchemeWatcher::PreferLight:
-    case KColorSchemeWatcher::NoPreference:
-        return getLightColorScheme();
-    };
-    return QString();
+    }
+
+    return getLightColorScheme();
 }
 
 // The meaning of the Default entry depends on the platform
@@ -154,17 +162,21 @@
 void KColorSchemeManager::init()
 {
     QString platformThemeSchemePath = 
qApp->property("KDE_COLOR_SCHEME_PATH").toString();
-    if (!isKdePlatformTheme() && platformThemeSchemePath.isEmpty()) {
-        d->m_colorSchemeWatcher.emplace();
-        QObject::connect(&*d->m_colorSchemeWatcher, 
&KColorSchemeWatcher::systemPreferenceChanged, this, [this]() {
-            if (!d->m_activatedScheme.isEmpty()) {
-                // Don't override what has been manually set
-                return;
-            }
 
-            d->activateSchemeInternal(d->automaticColorSchemePath());
-        });
-    }
+    auto schemeChanged = [this] {
+        if (!d->m_activatedScheme.isEmpty()) {
+            // Don't override what has been manually set
+            return;
+        }
+
+        d->activateSchemeInternal(d->automaticColorSchemePath());
+    };
+
+    connect(qApp->styleHints(), &QStyleHints::colorSchemeChanged, this, 
schemeChanged);
+
+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
+    connect(qApp->styleHints()->accessibility(), 
&QAccessibilityHints::contrastPreferenceChanged, this, schemeChanged);
+#endif
 
     KSharedConfigPtr config = KSharedConfig::openConfig();
     KConfigGroup cg(config, QStringLiteral("UiSettings"));
@@ -321,6 +333,30 @@
     return 
d->indexForSchemeId(d->m_activatedScheme).data(KColorSchemeModel::NameRole).toString();
 }
 
+#ifdef Q_OS_WIN
+static bool isWindowsHighContrastModeActive()
+{
+    HIGHCONTRAST result;
+    result.cbSize = sizeof(HIGHCONTRAST);
+    if (SystemParametersInfo(SPI_GETHIGHCONTRAST, result.cbSize, &result, 0)) {
+        return (result.dwFlags & HCF_HIGHCONTRASTON);
+    }
+    return false;
+}
+#endif
+
+KColorSchemeManagerPrivate::ContrastPreference 
KColorSchemeManagerPrivate::contrastPreference()
+{
+#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
+    return qGuiApp->styleHints()->accessibility()->contrastPreference() == 
Qt::ContrastPreference::HighContrast ? HighContrast : NoPreference;
+#else
+#ifdef Q_OS_WIN
+    return isWindowsHighContrastModeActive() ? HighContrast : NoPreference;
+#endif
+#endif
+    return NoPreference;
+}
+
 KColorSchemeManager *KColorSchemeManager::instance()
 {
     Q_ASSERT(qApp);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcolorscheme-6.21.0/src/kcolorschememanager_p.h 
new/kcolorscheme-6.22.0/src/kcolorschememanager_p.h
--- old/kcolorscheme-6.21.0/src/kcolorschememanager_p.h 2025-12-05 
14:19:28.000000000 +0100
+++ new/kcolorscheme-6.22.0/src/kcolorschememanager_p.h 2026-01-02 
18:40:44.000000000 +0100
@@ -12,8 +12,6 @@
 
 #include "kcolorschememodel.h"
 
-#include <KColorSchemeWatcher>
-
 class KColorSchemeManager;
 
 class KColorSchemeManagerPrivate
@@ -31,6 +29,12 @@
     QString automaticColorSchemePath() const;
     QModelIndex indexForSchemeId(const QString &id) const;
 
+    enum ContrastPreference {
+        NoPreference,
+        HighContrast,
+    };
+    static ContrastPreference contrastPreference();
+
     const QString &getLightColorScheme() const
     {
         return m_lightColorScheme;
@@ -42,7 +46,6 @@
 
     QString m_lightColorScheme = QStringLiteral("BreezeLight");
     QString m_darkColorScheme = QStringLiteral("BreezeDark");
-    std::optional<KColorSchemeWatcher> m_colorSchemeWatcher;
 };
 
 #endif

Reply via email to