commit ef4eb90bb6c58db2d1d16cbe1aec729e8cd653b0 Author: Dmitry Samoylik Date: Mon Dec 23 14:33:26 2024 +0300 import qt5-qtbase-5.15.15-1.el10 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..542ba47 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/qtbase-everywhere-opensource-src-5.15.15.tar.xz +SOURCES/kde-5.15-rollup-20240904.patch.gz diff --git a/.qt5-qtbase.metadata b/.qt5-qtbase.metadata new file mode 100644 index 0000000..de4427b --- /dev/null +++ b/.qt5-qtbase.metadata @@ -0,0 +1,2 @@ +7120c075b63c4943225b8395a90575cf6b34e871 SOURCES/qtbase-everywhere-opensource-src-5.15.15.tar.xz +497e1e84d1719d64974df5c882eb7a1a9773a4f3 SOURCES/kde-5.15-rollup-20240904.patch.gz diff --git a/SOURCES/0001-Use-Wayland-by-default-on-GNOME.patch b/SOURCES/0001-Use-Wayland-by-default-on-GNOME.patch new file mode 100644 index 0000000..ba205bc --- /dev/null +++ b/SOURCES/0001-Use-Wayland-by-default-on-GNOME.patch @@ -0,0 +1,32 @@ +From dacd0c6b3466258d175e7119a8e4836171400820 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Wed, 26 Jul 2023 12:03:46 +0200 +Subject: [PATCH 01/15] Use Wayland by default on GNOME + +--- + src/gui/kernel/qguiapplication.cpp | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp +index b39b3b4e5e..a217719ea8 100644 +--- a/src/gui/kernel/qguiapplication.cpp ++++ b/src/gui/kernel/qguiapplication.cpp +@@ -1412,14 +1412,7 @@ void QGuiApplicationPrivate::createPlatformIntegration() + if (sessionType == QByteArrayLiteral("x11") && !platformName.contains(QByteArrayLiteral("xcb"))) { + platformName = QByteArrayLiteral("xcb"); + } else if (sessionType == QByteArrayLiteral("wayland") && !platformName.contains(QByteArrayLiteral("wayland"))) { +- QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower(); +- QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower(); +- if (currentDesktop.contains("gnome") || sessionDesktop.contains("gnome")) { +- qInfo() << "Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome." +- << "Use QT_QPA_PLATFORM=wayland to run on Wayland anyway."; +- } else { +- platformName = QByteArrayLiteral("wayland"); +- } ++ platformName = QByteArrayLiteral("wayland"); + } + } + #ifdef QT_QPA_DEFAULT_PLATFORM_NAME +-- +2.41.0 + diff --git a/SOURCES/0002-Add-enum-class-Qt-Appearance.patch b/SOURCES/0002-Add-enum-class-Qt-Appearance.patch new file mode 100644 index 0000000..cd7d5d0 --- /dev/null +++ b/SOURCES/0002-Add-enum-class-Qt-Appearance.patch @@ -0,0 +1,65 @@ +From c41101241ce626dd38ee71d5a37c6aeb434eddf4 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Wed, 26 Jul 2023 12:06:29 +0200 +Subject: [PATCH 02/15] Add enum class Qt::Appearance + +It has been decided to add an appearance property in QStyleHints, which +will be propagated to classes that do not include QPlatformTheme. + +Therefore an appearance enum class is added to the Qt namespace, thus +being available to all Qt classes. +--- + src/corelib/global/qnamespace.h | 7 +++++++ + src/corelib/global/qnamespace.qdoc | 11 +++++++++++ + 2 files changed, 18 insertions(+) + +diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h +index bf19b1627b..acf2c26368 100644 +--- a/src/corelib/global/qnamespace.h ++++ b/src/corelib/global/qnamespace.h +@@ -123,6 +123,12 @@ public: + UNICODE_ACCEL = 0x00000000 + }; + ++ enum class Appearance { ++ Unknown = 0x0000, ++ Light = 0x0001, ++ Dark = 0x0002 ++ }; ++ + enum MouseButton { + NoButton = 0x00000000, + LeftButton = 0x00000001, +@@ -1820,6 +1826,7 @@ public: + QT_Q_ENUM(DayOfWeek) + QT_Q_ENUM(CursorShape) + QT_Q_ENUM(GlobalColor) ++ QT_Q_ENUM(Appearance) + QT_Q_ENUM(AspectRatioMode) + QT_Q_ENUM(TransformationMode) + QT_Q_FLAG(ImageConversionFlags) +diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc +index dbb9469bba..70cf8290f5 100644 +--- a/src/corelib/global/qnamespace.qdoc ++++ b/src/corelib/global/qnamespace.qdoc +@@ -841,6 +841,17 @@ + \sa QDockWidget::setAllowedAreas, QDockWidget::isAreaAllowed + */ + ++/*! ++ \enum Qt::Appearance ++ ++ Represents the appearance of an application's theme, ++ defined by QGuiApplication::palette(). ++ ++ \value Unknown The appearance is unknown. ++ \value Light The background colors are lighter than the text color, i.e. the theme is light. ++ \value Dark The background colors are darker than the text color, i.e. the theme is dark. ++*/ ++ + /*! + \enum Qt::ImageConversionFlag + +-- +2.41.0 + diff --git a/SOURCES/0003-Sync-and-assert-StandardPixmap-enums-in-QPlatformThe.patch b/SOURCES/0003-Sync-and-assert-StandardPixmap-enums-in-QPlatformThe.patch new file mode 100644 index 0000000..fb09c2d --- /dev/null +++ b/SOURCES/0003-Sync-and-assert-StandardPixmap-enums-in-QPlatformThe.patch @@ -0,0 +1,78 @@ +From fb0bc2e9f466c37f398af4a7a374fee2b29f5073 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Wed, 26 Jul 2023 13:43:29 +0200 +Subject: [PATCH 03/15] Sync and assert StandardPixmap enums in QPlatformTheme + and QStyle + +Add missing enum values in QPlatformTheme::standardPixmap to sync with +QStyle::standardPixmap changes from: +785d2b9d0728bbbc0d2a92b7d4186a3114d54128 +aa5a595a98f1af4a514485268a18e6cb9cfec783 + +Add enum values NStandardPixmap at the bottom of both enums as well +as an assertion in QStyle constructor that these values are identical. +Add omitvalue for NStandardPixmap in QStyle (QPlatformTheme enum is +not documented). +--- + src/gui/kernel/qplatformtheme.h | 9 +++++++++ + src/widgets/styles/qstyle.cpp | 4 ++++ + src/widgets/styles/qstyle.h | 1 + + 3 files changed, 14 insertions(+) + +diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h +index 7e6c9d5740..99a30337f5 100644 +--- a/src/gui/kernel/qplatformtheme.h ++++ b/src/gui/kernel/qplatformtheme.h +@@ -256,6 +256,15 @@ public: + MediaVolume, + MediaVolumeMuted, + LineEditClearButton, ++ DialogYesToAllButton, ++ DialogNoToAllButton, ++ DialogSaveAllButton, ++ DialogAbortButton, ++ DialogRetryButton, ++ DialogIgnoreButton, ++ RestoreDefaultsButton, ++ NStandardPixmap, // assertion value for sync with QStyle::StandardPixmap ++ + // do not add any values below/greater than this + CustomBase = 0xf0000000 + }; +diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp +index 669f158b7b..18d21a843d 100644 +--- a/src/widgets/styles/qstyle.cpp ++++ b/src/widgets/styles/qstyle.cpp +@@ -412,6 +412,9 @@ QStyle::QStyle(QStylePrivate &dd) + { + Q_D(QStyle); + d->proxyStyle = this; ++ Q_STATIC_ASSERT_X(int(StandardPixmap::NStandardPixmap) == ++ int(QPlatformTheme::StandardPixmap::NStandardPixmap), ++ "StandardPixmap in QPlatformTheme and QStyle out of sync"); + } + + /*! +@@ -2117,6 +2120,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, + This enum value was added in Qt 5.14. + \value SP_RestoreDefaultsButton Icon for a standard RestoreDefaults button in a QDialogButtonBox. + This enum value was added in Qt 5.14. ++ \omitvalue NStandardPixmap + \value SP_CustomBase Base value for custom standard pixmaps; + custom values must be greater than this value. + +diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h +index 5be1b4b290..9d98f76152 100644 +--- a/src/widgets/styles/qstyle.h ++++ b/src/widgets/styles/qstyle.h +@@ -845,6 +845,7 @@ public: + SP_DialogRetryButton, + SP_DialogIgnoreButton, + SP_RestoreDefaultsButton, ++ NStandardPixmap, // assertion value for sync with QPlatformTheme::StandardPixmap + // do not add any values below/greater than this + SP_CustomBase = 0xf0000000 + }; +-- +2.41.0 + diff --git a/SOURCES/0004-QGtk3Theme-subscribe-to-theme-hint-changes.patch b/SOURCES/0004-QGtk3Theme-subscribe-to-theme-hint-changes.patch new file mode 100644 index 0000000..be05cee --- /dev/null +++ b/SOURCES/0004-QGtk3Theme-subscribe-to-theme-hint-changes.patch @@ -0,0 +1,47 @@ +From 24b6ad903ab2ed620f8c754aafb727e6aa342aca Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Wed, 26 Jul 2023 15:38:13 +0200 +Subject: [PATCH 04/15] QGtk3Theme: subscribe to theme hint changes + +--- + .../platformthemes/gtk3/qgtk3theme.cpp | 20 +++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp +index 42cb0c7d..248ed9d8 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp +@@ -40,6 +40,7 @@ + #include "qgtk3theme.h" + #include "qgtk3dialoghelpers.h" + #include "qgtk3menu.h" ++#include "qpa/qwindowsysteminterface.h" + #include + #include + +@@ -110,6 +111,25 @@ QGtk3Theme::QGtk3Theme() + /* Use our custom log handler. */ + g_log_set_handler("Gtk", G_LOG_LEVEL_MESSAGE, gtkMessageHandler, nullptr); + ++#define SETTING_CONNECT(setting) g_signal_connect(settings, "notify::" setting, G_CALLBACK(notifyThemeChanged), nullptr) ++ auto notifyThemeChanged = [] { ++ QWindowSystemInterface::handleThemeChange(nullptr); ++ }; ++ ++ GtkSettings *settings = gtk_settings_get_default(); ++ SETTING_CONNECT("gtk-cursor-blink-time"); ++ SETTING_CONNECT("gtk-double-click-distance"); ++ SETTING_CONNECT("gtk-double-click-time"); ++ SETTING_CONNECT("gtk-long-press-time"); ++ SETTING_CONNECT("gtk-entry-password-hint-timeout"); ++ SETTING_CONNECT("gtk-dnd-drag-threshold"); ++ SETTING_CONNECT("gtk-icon-theme-name"); ++ SETTING_CONNECT("gtk-fallback-icon-theme"); ++ SETTING_CONNECT("gtk-font-name"); ++ SETTING_CONNECT("gtk-application-prefer-dark-theme"); ++ SETTING_CONNECT("gtk-theme-name"); ++#undef SETTING_CONNECT ++ + /* Set XCURSOR_SIZE and XCURSOR_THEME for Wayland sessions */ + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"))) { + if (qEnvironmentVariableIsEmpty("XCURSOR_SIZE")) { diff --git a/SOURCES/0006-Re-implement-palette-standardPixmap-file-icons-fonts.patch b/SOURCES/0006-Re-implement-palette-standardPixmap-file-icons-fonts.patch new file mode 100644 index 0000000..08d22c7 --- /dev/null +++ b/SOURCES/0006-Re-implement-palette-standardPixmap-file-icons-fonts.patch @@ -0,0 +1,3292 @@ +From ffab9df46c5f2cb411765f72ecd6f5dcdb62fbb4 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 27 Jul 2023 11:54:44 +0200 +Subject: [PATCH 06/15] Re-implement palette, standardPixmap, file icons, fonts + in QGtk3Theme + +Read theme colors from GTK3 style context and build platform theme +palettes in Qt. +React to runtime theme changes. +Re-implement methods to retrieve GTK3 styled standardPixmaps, fonts +and file icons. +--- + .../5.15.15/QtCore/private/qflatmap_p.h | 2 + + src/corelib/tools/qflatmap_p.h | 1107 +++++++++++++++++ + src/plugins/platformthemes/gtk3/gtk3.pro | 6 + + .../platformthemes/gtk3/qgtk3interface.cpp | 558 +++++++++ + .../platformthemes/gtk3/qgtk3interface_p.h | 170 +++ + src/plugins/platformthemes/gtk3/qgtk3json.cpp | 475 +++++++ + src/plugins/platformthemes/gtk3/qgtk3json_p.h | 102 ++ + .../platformthemes/gtk3/qgtk3storage.cpp | 470 +++++++ + .../platformthemes/gtk3/qgtk3storage_p.h | 234 ++++ + .../platformthemes/gtk3/qgtk3theme.cpp | 23 + + src/plugins/platformthemes/gtk3/qgtk3theme.h | 8 + + 11 files changed, 3155 insertions(+) + create mode 100644 include/QtCore/5.15.15/QtCore/private/qflatmap_p.h + create mode 100644 src/corelib/tools/qflatmap_p.h + create mode 100644 src/plugins/platformthemes/gtk3/qgtk3interface.cpp + create mode 100644 src/plugins/platformthemes/gtk3/qgtk3interface_p.h + create mode 100644 src/plugins/platformthemes/gtk3/qgtk3json.cpp + create mode 100644 src/plugins/platformthemes/gtk3/qgtk3json_p.h + create mode 100644 src/plugins/platformthemes/gtk3/qgtk3storage.cpp + create mode 100644 src/plugins/platformthemes/gtk3/qgtk3storage_p.h + +diff --git a/include/QtCore/5.15.15/QtCore/private/qflatmap_p.h b/include/QtCore/5.15.15/QtCore/private/qflatmap_p.h +new file mode 100644 +index 0000000000..e629799f72 +--- /dev/null ++++ b/include/QtCore/5.15.15/QtCore/private/qflatmap_p.h +@@ -0,0 +1,2 @@ ++#include "../../../../../src/corelib/tools/qflatmap_p.h" ++ +diff --git a/src/corelib/tools/qflatmap_p.h b/src/corelib/tools/qflatmap_p.h +new file mode 100644 +index 0000000000..45153e23db +--- /dev/null ++++ b/src/corelib/tools/qflatmap_p.h +@@ -0,0 +1,1107 @@ ++// Copyright (C) 2022 The Qt Company Ltd. ++// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only ++ ++#ifndef QFLATMAP_P_H ++#define QFLATMAP_P_H ++ ++// ++// W A R N I N G ++// ------------- ++// ++// This file is not part of the Qt API. It exists for the convenience ++// of a number of Qt sources files. This header file may change from ++// version to version without notice, or even be removed. ++// ++// We mean it. ++// ++ ++#include "qlist.h" ++#include "private/qglobal_p.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++/* ++ QFlatMap provides an associative container backed by sorted sequential ++ containers. By default, QList is used. ++ ++ Keys and values are stored in two separate containers. This provides improved ++ cache locality for key iteration and makes keys() and values() fast ++ operations. ++ ++ One can customize the underlying container type by passing the KeyContainer ++ and MappedContainer template arguments: ++ QFlatMap, std::vector, std::vector> ++*/ ++ ++// Qt 6.4: ++// - removed QFlatMap API which was incompatible with STL semantics ++// - will be released with said API disabled, to catch any out-of-tree users ++// - also allows opting in to the new API using QFLATMAP_ENABLE_STL_COMPATIBLE_INSERT ++// Qt 6.5 ++// - will make QFLATMAP_ENABLE_STL_COMPATIBLE_INSERT the default: ++ ++#ifndef QFLATMAP_ENABLE_STL_COMPATIBLE_INSERT ++# define QFLATMAP_ENABLE_STL_COMPATIBLE_INSERT ++#endif ++ ++namespace Qt { ++ ++struct OrderedUniqueRange_t {}; ++constexpr OrderedUniqueRange_t OrderedUniqueRange = {}; ++ ++} // namespace Qt ++ ++template ++class QFlatMapValueCompare : protected Compare ++{ ++public: ++ QFlatMapValueCompare() = default; ++ QFlatMapValueCompare(const Compare &key_compare) ++ : Compare(key_compare) ++ { ++ } ++ ++ using value_type = std::pair; ++ static constexpr bool is_comparator_noexcept = noexcept( ++ std::declval()(std::declval(), std::declval())); ++ ++ bool operator()(const value_type &lhs, const value_type &rhs) const ++ noexcept(is_comparator_noexcept) ++ { ++ return Compare::operator()(lhs.first, rhs.first); ++ } ++}; ++ ++namespace qflatmap { ++namespace detail { ++template ++class QFlatMapMockPointer ++{ ++ T ref; ++public: ++ QFlatMapMockPointer(T r) ++ : ref(r) ++ { ++ } ++ ++ T *operator->() ++ { ++ return &ref; ++ } ++}; ++} // namespace detail ++} // namespace qflatmap ++ ++template, class KeyContainer = QList, ++ class MappedContainer = QList> ++class QFlatMap : private QFlatMapValueCompare ++{ ++ static_assert(std::is_nothrow_destructible_v, "Types with throwing destructors are not supported in Qt containers."); ++ ++ template ++ using mock_pointer = qflatmap::detail::QFlatMapMockPointer; ++ ++public: ++ using key_type = Key; ++ using mapped_type = T; ++ using value_compare = QFlatMapValueCompare; ++ using value_type = typename value_compare::value_type; ++ using key_container_type = KeyContainer; ++ using mapped_container_type = MappedContainer; ++ using size_type = typename key_container_type::size_type; ++ using key_compare = Compare; ++ ++ struct containers ++ { ++ key_container_type keys; ++ mapped_container_type values; ++ }; ++ ++ class iterator ++ { ++ public: ++ using difference_type = ptrdiff_t; ++ using value_type = std::pair; ++ using reference = std::pair; ++ using pointer = mock_pointer; ++ using iterator_category = std::random_access_iterator_tag; ++ ++ iterator() = default; ++ ++ iterator(containers *ac, size_type ai) ++ : c(ac), i(ai) ++ { ++ } ++ ++ reference operator*() const ++ { ++ return { c->keys[i], c->values[i] }; ++ } ++ ++ pointer operator->() const ++ { ++ return { operator*() }; ++ } ++ ++ bool operator==(const iterator &o) const ++ { ++ return c == o.c && i == o.i; ++ } ++ ++ bool operator!=(const iterator &o) const ++ { ++ return !operator==(o); ++ } ++ ++ iterator &operator++() ++ { ++ ++i; ++ return *this; ++ } ++ ++ iterator operator++(int) ++ { ++ ++ iterator r = *this; ++ ++*this; ++ return r; ++ } ++ ++ iterator &operator--() ++ { ++ --i; ++ return *this; ++ } ++ ++ iterator operator--(int) ++ { ++ iterator r = *this; ++ --*this; ++ return r; ++ } ++ ++ iterator &operator+=(size_type n) ++ { ++ i += n; ++ return *this; ++ } ++ ++ friend iterator operator+(size_type n, const iterator a) ++ { ++ iterator ret = a; ++ return ret += n; ++ } ++ ++ friend iterator operator+(const iterator a, size_type n) ++ { ++ return n + a; ++ } ++ ++ iterator &operator-=(size_type n) ++ { ++ i -= n; ++ return *this; ++ } ++ ++ friend iterator operator-(const iterator a, size_type n) ++ { ++ iterator ret = a; ++ return ret -= n; ++ } ++ ++ friend difference_type operator-(const iterator b, const iterator a) ++ { ++ return b.i - a.i; ++ } ++ ++ reference operator[](size_type n) const ++ { ++ size_type k = i + n; ++ return { c->keys[k], c->values[k] }; ++ } ++ ++ bool operator<(const iterator &other) const ++ { ++ return i < other.i; ++ } ++ ++ bool operator>(const iterator &other) const ++ { ++ return i > other.i; ++ } ++ ++ bool operator<=(const iterator &other) const ++ { ++ return i <= other.i; ++ } ++ ++ bool operator>=(const iterator &other) const ++ { ++ return i >= other.i; ++ } ++ ++ const Key &key() const { return c->keys[i]; } ++ T &value() const { return c->values[i]; } ++ ++ private: ++ containers *c = nullptr; ++ size_type i = 0; ++ friend QFlatMap; ++ }; ++ ++ class const_iterator ++ { ++ public: ++ using difference_type = ptrdiff_t; ++ using value_type = std::pair; ++ using reference = std::pair; ++ using pointer = mock_pointer; ++ using iterator_category = std::random_access_iterator_tag; ++ ++ const_iterator() = default; ++ ++ const_iterator(const containers *ac, size_type ai) ++ : c(ac), i(ai) ++ { ++ } ++ ++ const_iterator(iterator o) ++ : c(o.c), i(o.i) ++ { ++ } ++ ++ reference operator*() const ++ { ++ return { c->keys[i], c->values[i] }; ++ } ++ ++ pointer operator->() const ++ { ++ return { operator*() }; ++ } ++ ++ bool operator==(const const_iterator &o) const ++ { ++ return c == o.c && i == o.i; ++ } ++ ++ bool operator!=(const const_iterator &o) const ++ { ++ return !operator==(o); ++ } ++ ++ const_iterator &operator++() ++ { ++ ++i; ++ return *this; ++ } ++ ++ const_iterator operator++(int) ++ { ++ ++ const_iterator r = *this; ++ ++*this; ++ return r; ++ } ++ ++ const_iterator &operator--() ++ { ++ --i; ++ return *this; ++ } ++ ++ const_iterator operator--(int) ++ { ++ const_iterator r = *this; ++ --*this; ++ return r; ++ } ++ ++ const_iterator &operator+=(size_type n) ++ { ++ i += n; ++ return *this; ++ } ++ ++ friend const_iterator operator+(size_type n, const const_iterator a) ++ { ++ const_iterator ret = a; ++ return ret += n; ++ } ++ ++ friend const_iterator operator+(const const_iterator a, size_type n) ++ { ++ return n + a; ++ } ++ ++ const_iterator &operator-=(size_type n) ++ { ++ i -= n; ++ return *this; ++ } ++ ++ friend const_iterator operator-(const const_iterator a, size_type n) ++ { ++ const_iterator ret = a; ++ return ret -= n; ++ } ++ ++ friend difference_type operator-(const const_iterator b, const const_iterator a) ++ { ++ return b.i - a.i; ++ } ++ ++ reference operator[](size_type n) const ++ { ++ size_type k = i + n; ++ return { c->keys[k], c->values[k] }; ++ } ++ ++ bool operator<(const const_iterator &other) const ++ { ++ return i < other.i; ++ } ++ ++ bool operator>(const const_iterator &other) const ++ { ++ return i > other.i; ++ } ++ ++ bool operator<=(const const_iterator &other) const ++ { ++ return i <= other.i; ++ } ++ ++ bool operator>=(const const_iterator &other) const ++ { ++ return i >= other.i; ++ } ++ ++ const Key &key() const { return c->keys[i]; } ++ const T &value() const { return c->values[i]; } ++ ++ private: ++ const containers *c = nullptr; ++ size_type i = 0; ++ friend QFlatMap; ++ }; ++ ++private: ++ template ++ struct is_marked_transparent_type : std::false_type { }; ++ ++ template ++ struct is_marked_transparent_type> : std::true_type { }; ++ ++ template ++ using is_marked_transparent = typename std::enable_if< ++ is_marked_transparent_type::value>::type *; ++ ++ template ++ using is_compatible_iterator = typename std::enable_if< ++ std::is_same::value_type>::value>::type *; ++ ++public: ++ QFlatMap() = default; ++ ++#ifdef QFLATMAP_ENABLE_STL_COMPATIBLE_INSERT ++ explicit QFlatMap(const key_container_type &keys, const mapped_container_type &values) ++ : c{keys, values} ++ { ++ ensureOrderedUnique(); ++ } ++ ++ explicit QFlatMap(key_container_type &&keys, const mapped_container_type &values) ++ : c{std::move(keys), values} ++ { ++ ensureOrderedUnique(); ++ } ++ ++ explicit QFlatMap(const key_container_type &keys, mapped_container_type &&values) ++ : c{keys, std::move(values)} ++ { ++ ensureOrderedUnique(); ++ } ++ ++ explicit QFlatMap(key_container_type &&keys, mapped_container_type &&values) ++ : c{std::move(keys), std::move(values)} ++ { ++ ensureOrderedUnique(); ++ } ++ ++ explicit QFlatMap(std::initializer_list lst) ++ : QFlatMap(lst.begin(), lst.end()) ++ { ++ } ++ ++ template = nullptr> ++ explicit QFlatMap(InputIt first, InputIt last) ++ { ++ initWithRange(first, last); ++ ensureOrderedUnique(); ++ } ++#endif ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, const key_container_type &keys, ++ const mapped_container_type &values) ++ : c{keys, values} ++ { ++ } ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, key_container_type &&keys, ++ const mapped_container_type &values) ++ : c{std::move(keys), values} ++ { ++ } ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, const key_container_type &keys, ++ mapped_container_type &&values) ++ : c{keys, std::move(values)} ++ { ++ } ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, key_container_type &&keys, ++ mapped_container_type &&values) ++ : c{std::move(keys), std::move(values)} ++ { ++ } ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, std::initializer_list lst) ++ : QFlatMap(Qt::OrderedUniqueRange, lst.begin(), lst.end()) ++ { ++ } ++ ++ template = nullptr> ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, InputIt first, InputIt last) ++ { ++ initWithRange(first, last); ++ } ++ ++ explicit QFlatMap(const Compare &compare) ++ : value_compare(compare) ++ { ++ } ++ ++#ifdef QFLATMAP_ENABLE_STL_COMPATIBLE_INSERT ++ explicit QFlatMap(const key_container_type &keys, const mapped_container_type &values, ++ const Compare &compare) ++ : value_compare(compare), c{keys, values} ++ { ++ ensureOrderedUnique(); ++ } ++ ++ explicit QFlatMap(key_container_type &&keys, const mapped_container_type &values, ++ const Compare &compare) ++ : value_compare(compare), c{std::move(keys), values} ++ { ++ ensureOrderedUnique(); ++ } ++ ++ explicit QFlatMap(const key_container_type &keys, mapped_container_type &&values, ++ const Compare &compare) ++ : value_compare(compare), c{keys, std::move(values)} ++ { ++ ensureOrderedUnique(); ++ } ++ ++ explicit QFlatMap(key_container_type &&keys, mapped_container_type &&values, ++ const Compare &compare) ++ : value_compare(compare), c{std::move(keys), std::move(values)} ++ { ++ ensureOrderedUnique(); ++ } ++ ++ explicit QFlatMap(std::initializer_list lst, const Compare &compare) ++ : QFlatMap(lst.begin(), lst.end(), compare) ++ { ++ } ++ ++ template = nullptr> ++ explicit QFlatMap(InputIt first, InputIt last, const Compare &compare) ++ : value_compare(compare) ++ { ++ initWithRange(first, last); ++ ensureOrderedUnique(); ++ } ++#endif ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, const key_container_type &keys, ++ const mapped_container_type &values, const Compare &compare) ++ : value_compare(compare), c{keys, values} ++ { ++ } ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, key_container_type &&keys, ++ const mapped_container_type &values, const Compare &compare) ++ : value_compare(compare), c{std::move(keys), values} ++ { ++ } ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, const key_container_type &keys, ++ mapped_container_type &&values, const Compare &compare) ++ : value_compare(compare), c{keys, std::move(values)} ++ { ++ } ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, key_container_type &&keys, ++ mapped_container_type &&values, const Compare &compare) ++ : value_compare(compare), c{std::move(keys), std::move(values)} ++ { ++ } ++ ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, std::initializer_list lst, ++ const Compare &compare) ++ : QFlatMap(Qt::OrderedUniqueRange, lst.begin(), lst.end(), compare) ++ { ++ } ++ ++ template = nullptr> ++ explicit QFlatMap(Qt::OrderedUniqueRange_t, InputIt first, InputIt last, const Compare &compare) ++ : value_compare(compare) ++ { ++ initWithRange(first, last); ++ } ++ ++ size_type count() const noexcept { return c.keys.size(); } ++ size_type size() const noexcept { return c.keys.size(); } ++ size_type capacity() const noexcept { return c.keys.capacity(); } ++ bool isEmpty() const noexcept { return c.keys.empty(); } ++ bool empty() const noexcept { return c.keys.empty(); } ++ containers extract() && { return std::move(c); } ++ const key_container_type &keys() const noexcept { return c.keys; } ++ const mapped_container_type &values() const noexcept { return c.values; } ++ ++ void reserve(size_type s) ++ { ++ c.keys.reserve(s); ++ c.values.reserve(s); ++ } ++ ++ void clear() ++ { ++ c.keys.clear(); ++ c.values.clear(); ++ } ++ ++ bool remove(const Key &key) ++ { ++ return do_remove(find(key)); ++ } ++ ++ template = nullptr> ++ bool remove(const X &key) ++ { ++ return do_remove(find(key)); ++ } ++ ++ iterator erase(iterator it) ++ { ++ c.values.erase(toValuesIterator(it)); ++ return fromKeysIterator(c.keys.erase(toKeysIterator(it))); ++ } ++ ++ T take(const Key &key) ++ { ++ return do_take(find(key)); ++ } ++ ++ template = nullptr> ++ T take(const X &key) ++ { ++ return do_take(find(key)); ++ } ++ ++ bool contains(const Key &key) const ++ { ++ return find(key) != end(); ++ } ++ ++ template = nullptr> ++ bool contains(const X &key) const ++ { ++ return find(key) != end(); ++ } ++ ++ T value(const Key &key, const T &defaultValue) const ++ { ++ auto it = find(key); ++ return it == end() ? defaultValue : it.value(); ++ } ++ ++ template = nullptr> ++ T value(const X &key, const T &defaultValue) const ++ { ++ auto it = find(key); ++ return it == end() ? defaultValue : it.value(); ++ } ++ ++ T value(const Key &key) const ++ { ++ auto it = find(key); ++ return it == end() ? T() : it.value(); ++ } ++ ++ template = nullptr> ++ T value(const X &key) const ++ { ++ auto it = find(key); ++ return it == end() ? T() : it.value(); ++ } ++ ++ T &operator[](const Key &key) ++ { ++ return try_emplace(key).first.value(); ++ } ++ ++ T &operator[](Key &&key) ++ { ++ return try_emplace(std::move(key)).first.value(); ++ } ++ ++ T operator[](const Key &key) const ++ { ++ return value(key); ++ } ++ ++#ifdef QFLATMAP_ENABLE_STL_COMPATIBLE_INSERT ++ std::pair insert(const Key &key, const T &value) ++ { ++ return try_emplace(key, value); ++ } ++ ++ std::pair insert(Key &&key, const T &value) ++ { ++ return try_emplace(std::move(key), value); ++ } ++ ++ std::pair insert(const Key &key, T &&value) ++ { ++ return try_emplace(key, std::move(value)); ++ } ++ ++ std::pair insert(Key &&key, T &&value) ++ { ++ return try_emplace(std::move(key), std::move(value)); ++ } ++#endif ++ ++ template ++ std::pair try_emplace(const Key &key, Args&&...args) ++ { ++ auto it = lower_bound(key); ++ if (it == end() || key_compare::operator()(key, it.key())) { ++ c.values.insert(toValuesIterator(it), std::forward(args)...); ++ return { fromKeysIterator(c.keys.insert(toKeysIterator(it), key)), true }; ++ } else { ++ return {it, false}; ++ } ++ } ++ ++ template ++ std::pair try_emplace(Key &&key, Args&&...args) ++ { ++ auto it = lower_bound(key); ++ if (it == end() || key_compare::operator()(key, it.key())) { ++ c.values.insert(toValuesIterator(it), std::forward(args)...); ++ return { fromKeysIterator(c.keys.insert(toKeysIterator(it), std::move(key))), true }; ++ } else { ++ return {it, false}; ++ } ++ } ++ ++ template ++ std::pair insert_or_assign(const Key &key, M &&obj) ++ { ++ auto r = try_emplace(key, std::forward(obj)); ++ if (!r.second) ++ *toValuesIterator(r.first) = std::forward(obj); ++ return r; ++ } ++ ++ template ++ std::pair insert_or_assign(Key &&key, M &&obj) ++ { ++ auto r = try_emplace(std::move(key), std::forward(obj)); ++ if (!r.second) ++ *toValuesIterator(r.first) = std::forward(obj); ++ return r; ++ } ++ ++#ifdef QFLATMAP_ENABLE_STL_COMPATIBLE_INSERT ++ template = nullptr> ++ void insert(InputIt first, InputIt last) ++ { ++ insertRange(first, last); ++ } ++ ++ // ### Merge with the templated version above ++ // once we can use std::disjunction in is_compatible_iterator. ++ void insert(const value_type *first, const value_type *last) ++ { ++ insertRange(first, last); ++ } ++ ++ template = nullptr> ++ void insert(Qt::OrderedUniqueRange_t, InputIt first, InputIt last) ++ { ++ insertOrderedUniqueRange(first, last); ++ } ++ ++ // ### Merge with the templated version above ++ // once we can use std::disjunction in is_compatible_iterator. ++ void insert(Qt::OrderedUniqueRange_t, const value_type *first, const value_type *last) ++ { ++ insertOrderedUniqueRange(first, last); ++ } ++#endif ++ ++ iterator begin() { return { &c, 0 }; } ++ const_iterator begin() const { return { &c, 0 }; } ++ const_iterator cbegin() const { return begin(); } ++ const_iterator constBegin() const { return cbegin(); } ++ iterator end() { return { &c, c.keys.size() }; } ++ const_iterator end() const { return { &c, c.keys.size() }; } ++ const_iterator cend() const { return end(); } ++ const_iterator constEnd() const { return cend(); } ++ std::reverse_iterator rbegin() { return std::reverse_iterator(end()); } ++ std::reverse_iterator rbegin() const ++ { ++ return std::reverse_iterator(end()); ++ } ++ std::reverse_iterator crbegin() const { return rbegin(); } ++ std::reverse_iterator rend() { ++ return std::reverse_iterator(begin()); ++ } ++ std::reverse_iterator rend() const ++ { ++ return std::reverse_iterator(begin()); ++ } ++ std::reverse_iterator crend() const { return rend(); } ++ ++ iterator lower_bound(const Key &key) ++ { ++ auto cit = std::as_const(*this).lower_bound(key); ++ return { &c, cit.i }; ++ } ++ ++ template = nullptr> ++ iterator lower_bound(const X &key) ++ { ++ auto cit = std::as_const(*this).lower_bound(key); ++ return { &c, cit.i }; ++ } ++ ++ const_iterator lower_bound(const Key &key) const ++ { ++ return fromKeysIterator(std::lower_bound(c.keys.begin(), c.keys.end(), key, key_comp())); ++ } ++ ++ template = nullptr> ++ const_iterator lower_bound(const X &key) const ++ { ++ return fromKeysIterator(std::lower_bound(c.keys.begin(), c.keys.end(), key, key_comp())); ++ } ++ ++ iterator find(const Key &key) ++ { ++ return { &c, std::as_const(*this).find(key).i }; ++ } ++ ++ template = nullptr> ++ iterator find(const X &key) ++ { ++ return { &c, std::as_const(*this).find(key).i }; ++ } ++ ++ const_iterator find(const Key &key) const ++ { ++ auto it = lower_bound(key); ++ if (it != end()) { ++ if (!key_compare::operator()(key, it.key())) ++ return it; ++ it = end(); ++ } ++ return it; ++ } ++ ++ template = nullptr> ++ const_iterator find(const X &key) const ++ { ++ auto it = lower_bound(key); ++ if (it != end()) { ++ if (!key_compare::operator()(key, it.key())) ++ return it; ++ it = end(); ++ } ++ return it; ++ } ++ ++ template ++ size_type remove_if(Predicate pred) ++ { ++ const auto indirect_call_to_pred = [pred = std::move(pred)](iterator it) { ++ using Pair = decltype(*it); ++ using K = decltype(it.key()); ++ using V = decltype(it.value()); ++ using P = Predicate; ++ if constexpr (std::is_invocable_v) { ++ return pred(it.key(), it.value()); ++ } else if constexpr (std::is_invocable_v && !std::is_invocable_v) { ++ return pred(*it); ++ } else if constexpr (std::is_invocable_v && !std::is_invocable_v) { ++ return pred(it.key()); ++ } else { ++ static_assert(std::false_type(), ++ "Don't know how to call the predicate.\n" ++ "Options:\n" ++ "- pred(*it)\n" ++ "- pred(it.key(), it.value())\n" ++ "- pred(it.key())"); ++ } ++ }; ++ ++ auto first = begin(); ++ const auto last = end(); ++ ++ // find_if prefix loop ++ while (first != last && !indirect_call_to_pred(first)) ++ ++first; ++ ++ if (first == last) ++ return 0; // nothing to do ++ ++ // we know that we need to remove *first ++ ++ auto kdest = toKeysIterator(first); ++ auto vdest = toValuesIterator(first); ++ ++ ++first; ++ ++ auto k = std::next(kdest); ++ auto v = std::next(vdest); ++ ++ // Main Loop ++ // - first is used only for indirect_call_to_pred ++ // - operations are done on k, v ++ // Loop invariants: ++ // - first, k, v are pointing to the same element ++ // - [begin(), first[, [c.keys.begin(), k[, [c.values.begin(), v[: already processed ++ // - [first, end()[, [k, c.keys.end()[, [v, c.values.end()[: still to be processed ++ // - [c.keys.begin(), kdest[ and [c.values.begin(), vdest[ are keepers ++ // - [kdest, k[, [vdest, v[ are considered removed ++ // - kdest is not c.keys.end() ++ // - vdest is not v.values.end() ++ while (first != last) { ++ if (!indirect_call_to_pred(first)) { ++ // keep *first, aka {*k, *v} ++ *kdest = std::move(*k); ++ *vdest = std::move(*v); ++ ++kdest; ++ ++vdest; ++ } ++ ++k; ++ ++v; ++ ++first; ++ } ++ ++ const size_type r = std::distance(kdest, c.keys.end()); ++ c.keys.erase(kdest, c.keys.end()); ++ c.values.erase(vdest, c.values.end()); ++ return r; ++ } ++ ++ key_compare key_comp() const noexcept ++ { ++ return static_cast(*this); ++ } ++ ++ value_compare value_comp() const noexcept ++ { ++ return static_cast(*this); ++ } ++ ++private: ++ bool do_remove(iterator it) ++ { ++ if (it != end()) { ++ erase(it); ++ return true; ++ } ++ return false; ++ } ++ ++ T do_take(iterator it) ++ { ++ if (it != end()) { ++ T result = std::move(it.value()); ++ erase(it); ++ return result; ++ } ++ return {}; ++ } ++ ++ template = nullptr> ++ void initWithRange(InputIt first, InputIt last) ++ { ++ QtPrivate::reserveIfForwardIterator(this, first, last); ++ while (first != last) { ++ c.keys.push_back(first->first); ++ c.values.push_back(first->second); ++ ++first; ++ } ++ } ++ ++ iterator fromKeysIterator(typename key_container_type::iterator kit) ++ { ++ return { &c, static_cast(std::distance(c.keys.begin(), kit)) }; ++ } ++ ++ const_iterator fromKeysIterator(typename key_container_type::const_iterator kit) const ++ { ++ return { &c, static_cast(std::distance(c.keys.begin(), kit)) }; ++ } ++ ++ typename key_container_type::iterator toKeysIterator(iterator it) ++ { ++ return c.keys.begin() + it.i; ++ } ++ ++ typename mapped_container_type::iterator toValuesIterator(iterator it) ++ { ++ return c.values.begin() + it.i; ++ } ++ ++ template ++ void insertRange(InputIt first, InputIt last) ++ { ++ size_type i = c.keys.size(); ++ c.keys.resize(i + std::distance(first, last)); ++ c.values.resize(c.keys.size()); ++ for (; first != last; ++first, ++i) { ++ c.keys[i] = first->first; ++ c.values[i] = first->second; ++ } ++ ensureOrderedUnique(); ++ } ++ ++ class IndexedKeyComparator ++ { ++ public: ++ IndexedKeyComparator(const QFlatMap *am) ++ : m(am) ++ { ++ } ++ ++ bool operator()(size_type i, size_type k) const ++ { ++ return m->key_comp()(m->c.keys[i], m->c.keys[k]); ++ } ++ ++ private: ++ const QFlatMap *m; ++ }; ++ ++ template ++ void insertOrderedUniqueRange(InputIt first, InputIt last) ++ { ++ const size_type s = c.keys.size(); ++ c.keys.resize(s + std::distance(first, last)); ++ c.values.resize(c.keys.size()); ++ for (size_type i = s; first != last; ++first, ++i) { ++ c.keys[i] = first->first; ++ c.values[i] = first->second; ++ } ++ ++ std::vector p(size_t(c.keys.size())); ++ std::iota(p.begin(), p.end(), 0); ++ std::inplace_merge(p.begin(), p.begin() + s, p.end(), IndexedKeyComparator(this)); ++ applyPermutation(p); ++ makeUnique(); ++ } ++ ++ void ensureOrderedUnique() ++ { ++ std::vector p(size_t(c.keys.size())); ++ std::iota(p.begin(), p.end(), 0); ++ std::stable_sort(p.begin(), p.end(), IndexedKeyComparator(this)); ++ applyPermutation(p); ++ makeUnique(); ++ } ++ ++ void applyPermutation(const std::vector &p) ++ { ++ const size_type s = c.keys.size(); ++ std::vector done(s); ++ for (size_type i = 0; i < s; ++i) { ++ if (done[i]) ++ continue; ++ done[i] = true; ++ size_type j = i; ++ size_type k = p[i]; ++ while (i != k) { ++ qSwap(c.keys[j], c.keys[k]); ++ qSwap(c.values[j], c.values[k]); ++ done[k] = true; ++ j = k; ++ k = p[j]; ++ } ++ } ++ } ++ ++ void makeUnique() ++ { ++ // std::unique, but over two ranges ++ auto equivalent = [this](const auto &lhs, const auto &rhs) { ++ return !key_compare::operator()(lhs, rhs) && !key_compare::operator()(rhs, lhs); ++ }; ++ const auto kb = c.keys.begin(); ++ const auto ke = c.keys.end(); ++ auto k = std::adjacent_find(kb, ke, equivalent); ++ if (k == ke) ++ return; ++ ++ // equivalent keys found, we need to do actual work: ++ auto v = std::next(c.values.begin(), std::distance(kb, k)); ++ ++ auto kdest = k; ++ auto vdest = v; ++ ++ ++k; ++ ++v; ++ ++ // Loop Invariants: ++ // ++ // - [keys.begin(), kdest] and [values.begin(), vdest] are unique ++ // - k is not keys.end(), v is not values.end() ++ // - [next(k), keys.end()[ and [next(v), values.end()[ still need to be checked ++ while ((++v, ++k) != ke) { ++ if (!equivalent(*kdest, *k)) { ++ *++kdest = std::move(*k); ++ *++vdest = std::move(*v); ++ } ++ } ++ ++ c.keys.erase(std::next(kdest), ke); ++ c.values.erase(std::next(vdest), c.values.end()); ++ } ++ ++ containers c; ++}; ++ ++template> ++using QVarLengthFlatMap = QFlatMap, QVarLengthArray>; ++ ++QT_END_NAMESPACE ++ ++#endif // QFLATMAP_P_H ++ +diff --git a/src/plugins/platformthemes/gtk3/gtk3.pro b/src/plugins/platformthemes/gtk3/gtk3.pro +index 8d217396d3..c442b24a0a 100644 +--- a/src/plugins/platformthemes/gtk3/gtk3.pro ++++ b/src/plugins/platformthemes/gtk3/gtk3.pro +@@ -15,11 +15,17 @@ QMAKE_CXXFLAGS_WARN_ON += -Wno-error=parentheses + + HEADERS += \ + qgtk3dialoghelpers.h \ ++ qgtk3interface_p.h \ ++ qgtk3json_p.h \ + qgtk3menu.h \ ++ qgtk3storage_p.h \ + qgtk3theme.h + + SOURCES += \ + main.cpp \ + qgtk3dialoghelpers.cpp \ ++ qgtk3interface.cpp \ ++ qgtk3json.cpp \ + qgtk3menu.cpp \ ++ qgtk3storage.cpp \ + qgtk3theme.cpp +diff --git a/src/plugins/platformthemes/gtk3/qgtk3interface.cpp b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +new file mode 100644 +index 0000000000..d932b250a5 +--- /dev/null ++++ b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +@@ -0,0 +1,558 @@ ++// Copyright (C) 2022 The Qt Company Ltd. ++// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only ++ ++// ++// W A R N I N G ++// ------------- ++// ++// This file is not part of the Qt API. It exists purely as an ++// implementation detail. This header file may change from version to ++// version without notice, or even be removed. ++// ++// We mean it. ++// ++ ++ ++#include "qgtk3interface_p.h" ++#include "qgtk3storage_p.h" ++#include ++#include ++#include ++#include ++#include ++ ++QT_BEGIN_NAMESPACE ++Q_LOGGING_CATEGORY(lcQGtk3Interface, "qt.qpa.gtk"); ++ ++ ++// Callback for gnome event loop has to be static ++static QGtk3Storage *m_storage = nullptr; ++ ++QGtk3Interface::QGtk3Interface(QGtk3Storage *s) ++{ ++ initColorMap(); ++ ++ if (!s) { ++ qCDebug(lcQGtk3Interface) << "QGtk3Interface instantiated without QGtk3Storage." ++ << "No reaction to runtime theme changes."; ++ return; ++ } ++ ++ // Connect to the GTK settings changed signal ++ auto handleThemeChange = [] { ++ if (m_storage) ++ m_storage->handleThemeChange(); ++ }; ++ ++ GtkSettings *settings = gtk_settings_get_default(); ++ const gboolean success = g_signal_connect(settings, "notify::gtk-theme-name", ++ G_CALLBACK(handleThemeChange), nullptr); ++ if (success == FALSE) { ++ qCDebug(lcQGtk3Interface) << "Connection to theme change signal failed." ++ << "No reaction to runtime theme changes."; ++ } else { ++ m_storage = s; ++ } ++} ++ ++QGtk3Interface::~QGtk3Interface() ++{ ++ // Ignore theme changes when destructor is reached ++ m_storage = nullptr; ++ ++ // QGtkWidgets have to be destroyed manually ++ for (auto v : cache) ++ gtk_widget_destroy(v.second); ++} ++ ++int QGtk3Interface::toGtkState(const QString &state) ++{ ++#define CASE(x) \ ++ if (QLatin1String(QByteArray(state.toLatin1())) == #x) \ ++ return GTK_STATE_FLAG_ ##x ++ ++#define CONVERT\ ++ CASE(NORMAL);\ ++ CASE(ACTIVE);\ ++ CASE(PRELIGHT);\ ++ CASE(SELECTED);\ ++ CASE(INSENSITIVE);\ ++ CASE(INCONSISTENT);\ ++ CASE(FOCUSED);\ ++ CASE(BACKDROP);\ ++ CASE(DIR_LTR);\ ++ CASE(DIR_RTL);\ ++ CASE(LINK);\ ++ CASE(VISITED);\ ++ CASE(CHECKED);\ ++ CASE(DROP_ACTIVE) ++ ++ CONVERT; ++ return -1; ++#undef CASE ++} ++ ++const QLatin1String QGtk3Interface::fromGtkState(GtkStateFlags state) ++{ ++#define CASE(x) case GTK_STATE_FLAG_ ##x: return QLatin1String(#x) ++ switch (state) { ++ CONVERT; ++ } ++ Q_UNREACHABLE(); ++#undef CASE ++#undef CONVERT ++} ++ ++void QGtk3Interface::initColorMap() ++{ ++ // Populate map with default values ++ #define SAVE(src, state, prop, def)\ ++ {ColorKey({QGtkColorSource::src, GTK_STATE_FLAG_ ##state}), ColorValue({#prop, QGtkColorDefault::def})} ++ ++ gtkColorMap = ColorMap { ++ SAVE(Foreground, NORMAL, theme_fg_color, Foreground), ++ SAVE(Foreground, BACKDROP, theme_unfocused_selected_fg_color, Foreground), ++ SAVE(Foreground, INSENSITIVE, insensitive_fg_color, Foreground), ++ SAVE(Foreground, SELECTED, theme_selected_fg_color, Foreground), ++ SAVE(Foreground, ACTIVE, theme_unfocused_fg_color, Foreground), ++ SAVE(Text, NORMAL, theme_text_color, Foreground), ++ SAVE(Text, ACTIVE, theme_unfocused_text_color, Foreground), ++ SAVE(Base, NORMAL, theme_base_color, Background), ++ SAVE(Base, INSENSITIVE, insensitive_base_color, Background), ++ SAVE(Background, NORMAL, theme_bg_color, Background), ++ SAVE(Background, SELECTED, theme_selected_bg_color, Background), ++ SAVE(Background, INSENSITIVE, insensitive_bg_color, Background), ++ SAVE(Background, ACTIVE, theme_unfocused_bg_color, Background), ++ SAVE(Background, BACKDROP, theme_unfocused_selected_bg_color, Background), ++ SAVE(Border, NORMAL, borders, Border), ++ SAVE(Border, ACTIVE, unfocused_borders, Border) ++ }; ++#undef SAVE ++ ++ qCDebug(lcQGtk3Interface) << "Color map populated from defaults."; ++} ++ ++// Return an image rather than an icon or a pixmap: ++// Image can be cached and re-scaled to different sizes if requested multiple times ++QImage QGtk3Interface::standardPixmap(QPlatformTheme::StandardPixmap standardPixmap) const ++{ ++ switch (standardPixmap) { ++ case QPlatformTheme::DialogDiscardButton: ++ return qt_gtk_get_icon(GTK_STOCK_DELETE); ++ case QPlatformTheme::DialogOkButton: ++ return qt_gtk_get_icon(GTK_STOCK_OK); ++ case QPlatformTheme::DialogCancelButton: ++ return qt_gtk_get_icon(GTK_STOCK_CANCEL); ++ case QPlatformTheme::DialogYesButton: ++ return qt_gtk_get_icon(GTK_STOCK_YES); ++ case QPlatformTheme::DialogNoButton: ++ return qt_gtk_get_icon(GTK_STOCK_NO); ++ case QPlatformTheme::DialogOpenButton: ++ return qt_gtk_get_icon(GTK_STOCK_OPEN); ++ case QPlatformTheme::DialogCloseButton: ++ return qt_gtk_get_icon(GTK_STOCK_CLOSE); ++ case QPlatformTheme::DialogApplyButton: ++ return qt_gtk_get_icon(GTK_STOCK_APPLY); ++ case QPlatformTheme::DialogSaveButton: ++ return qt_gtk_get_icon(GTK_STOCK_SAVE); ++ case QPlatformTheme::MessageBoxWarning: ++ return qt_gtk_get_icon(GTK_STOCK_DIALOG_WARNING); ++ case QPlatformTheme::MessageBoxQuestion: ++ return qt_gtk_get_icon(GTK_STOCK_DIALOG_QUESTION); ++ case QPlatformTheme::MessageBoxInformation: ++ return qt_gtk_get_icon(GTK_STOCK_DIALOG_INFO); ++ case QPlatformTheme::MessageBoxCritical: ++ return qt_gtk_get_icon(GTK_STOCK_DIALOG_ERROR); ++ case QPlatformTheme::CustomBase: ++ case QPlatformTheme::TitleBarMenuButton: ++ case QPlatformTheme::TitleBarMinButton: ++ case QPlatformTheme::TitleBarMaxButton: ++ case QPlatformTheme::TitleBarCloseButton: ++ case QPlatformTheme::TitleBarNormalButton: ++ case QPlatformTheme::TitleBarShadeButton: ++ case QPlatformTheme::TitleBarUnshadeButton: ++ case QPlatformTheme::TitleBarContextHelpButton: ++ case QPlatformTheme::DockWidgetCloseButton: ++ case QPlatformTheme::DesktopIcon: ++ case QPlatformTheme::TrashIcon: ++ case QPlatformTheme::ComputerIcon: ++ case QPlatformTheme::DriveFDIcon: ++ case QPlatformTheme::DriveHDIcon: ++ case QPlatformTheme::DriveCDIcon: ++ case QPlatformTheme::DriveDVDIcon: ++ case QPlatformTheme::DriveNetIcon: ++ case QPlatformTheme::DirOpenIcon: ++ case QPlatformTheme::DirClosedIcon: ++ case QPlatformTheme::DirLinkIcon: ++ case QPlatformTheme::DirLinkOpenIcon: ++ case QPlatformTheme::FileIcon: ++ case QPlatformTheme::FileLinkIcon: ++ case QPlatformTheme::ToolBarHorizontalExtensionButton: ++ case QPlatformTheme::ToolBarVerticalExtensionButton: ++ case QPlatformTheme::FileDialogStart: ++ case QPlatformTheme::FileDialogEnd: ++ case QPlatformTheme::FileDialogToParent: ++ case QPlatformTheme::FileDialogNewFolder: ++ case QPlatformTheme::FileDialogDetailedView: ++ case QPlatformTheme::FileDialogInfoView: ++ case QPlatformTheme::FileDialogContentsView: ++ case QPlatformTheme::FileDialogListView: ++ case QPlatformTheme::FileDialogBack: ++ case QPlatformTheme::DirIcon: ++ case QPlatformTheme::DialogHelpButton: ++ case QPlatformTheme::DialogResetButton: ++ case QPlatformTheme::ArrowUp: ++ case QPlatformTheme::ArrowDown: ++ case QPlatformTheme::ArrowLeft: ++ case QPlatformTheme::ArrowRight: ++ case QPlatformTheme::ArrowBack: ++ case QPlatformTheme::ArrowForward: ++ case QPlatformTheme::DirHomeIcon: ++ case QPlatformTheme::CommandLink: ++ case QPlatformTheme::VistaShield: ++ case QPlatformTheme::BrowserReload: ++ case QPlatformTheme::BrowserStop: ++ case QPlatformTheme::MediaPlay: ++ case QPlatformTheme::MediaStop: ++ case QPlatformTheme::MediaPause: ++ case QPlatformTheme::MediaSkipForward: ++ case QPlatformTheme::MediaSkipBackward: ++ case QPlatformTheme::MediaSeekForward: ++ case QPlatformTheme::MediaSeekBackward: ++ case QPlatformTheme::MediaVolume: ++ case QPlatformTheme::MediaVolumeMuted: ++ case QPlatformTheme::LineEditClearButton: ++ case QPlatformTheme::DialogYesToAllButton: ++ case QPlatformTheme::DialogNoToAllButton: ++ case QPlatformTheme::DialogSaveAllButton: ++ case QPlatformTheme::DialogAbortButton: ++ case QPlatformTheme::DialogRetryButton: ++ case QPlatformTheme::DialogIgnoreButton: ++ case QPlatformTheme::RestoreDefaultsButton: ++ case QPlatformTheme::NStandardPixmap: ++ return QImage(); ++ } ++ Q_UNREACHABLE(); ++} ++ ++QImage QGtk3Interface::qt_gtk_get_icon(const char* iconName) const ++{ ++ GtkIconSet* iconSet = gtk_icon_factory_lookup_default (iconName); ++ GdkPixbuf* icon = gtk_icon_set_render_icon_pixbuf(iconSet, context(), GTK_ICON_SIZE_DIALOG); ++ return qt_convert_gdk_pixbuf(icon); ++} ++ ++QImage QGtk3Interface::qt_convert_gdk_pixbuf(GdkPixbuf *buf) const ++{ ++ if (!buf) ++ return QImage(); ++ ++ // Ability to convert GdkPixbuf to QImage relies on the assumptions, that ++ // - QImage uses uchar as a data container ++ // - the types guint8 and uchar are identical ++ const guint8 *gdata = gdk_pixbuf_read_pixels(buf); ++ static_assert(std::is_same::value, ++ "guint8 has diverted from uchar. Code needs fixing."); ++ Q_ASSUME(gdk_pixbuf_get_bits_per_sample(buf) == 8); ++ Q_ASSUME(gdk_pixbuf_get_n_channels(buf) == 4); ++ const uchar *data = static_cast(gdata); ++ ++ const int width = gdk_pixbuf_get_width(buf); ++ const int height = gdk_pixbuf_get_height(buf); ++ const int bpl = gdk_pixbuf_get_rowstride(buf); ++ QImage converted(data, width, height, bpl, QImage::Format_ARGB32); ++ return converted.copy(); // detatch to survive lifetime of buf ++} ++ ++GtkWidget *QGtk3Interface::qt_new_gtkWidget(QGtkWidget type) const ++{ ++#define CASE(Type)\ ++ case QGtkWidget::Type: return Type ##_new(); ++#define CASEN(Type)\ ++ case QGtkWidget::Type: return Type ##_new(nullptr); ++ ++ switch (type) { ++ CASE(gtk_menu_bar) ++ CASE(gtk_menu) ++ CASE(gtk_button) ++ case QGtkWidget::gtk_button_box: return gtk_button_box_new(GtkOrientation::GTK_ORIENTATION_HORIZONTAL); ++ CASE(gtk_check_button) ++ CASEN(gtk_radio_button) ++ CASEN(gtk_frame) ++ CASE(gtk_statusbar) ++ CASE(gtk_entry) ++ case QGtkWidget::gtk_popup: return gtk_window_new(GTK_WINDOW_POPUP); ++ CASE(gtk_notebook) ++ CASE(gtk_toolbar) ++ CASE(gtk_tree_view) ++ CASE(gtk_combo_box) ++ CASE(gtk_combo_box_text) ++ CASE(gtk_progress_bar) ++ CASE(gtk_fixed) ++ CASE(gtk_separator_menu_item) ++ CASE(gtk_offscreen_window) ++ case QGtkWidget::gtk_Default: return nullptr; ++ } ++#undef CASE ++#undef CASEN ++ Q_UNREACHABLE(); ++} ++ ++GdkRGBA QGtk3Interface::genericColor(GtkStyleContext *con, GtkStateFlags state, QGtkColorDefault def) const ++{ ++ GdkRGBA color; ++ ++#define CASE(def, call)\ ++ case QGtkColorDefault::def:\ ++ gtk_style_context_get_ ##call(con, state, &color);\ ++ break; ++ ++ switch (def) { ++ CASE(Foreground, color) ++ CASE(Background, background_color) ++ CASE(Border, border_color) ++ } ++ return color; ++#undef CASE ++} ++ ++// Deliver a QColor from a GTK widget, a source type and a GTK widget state ++// Fall back to the generic color getter of source/state if the property name does not exist ++// Fall back to a hard coded generic color getter of source/state are not mapped ++QColor QGtk3Interface::color(GtkWidget *widget, QGtkColorSource source, GtkStateFlags state) const ++{ ++ GdkRGBA col; ++ GtkStyleContext *con = context(widget); ++ ++#define CASE(src, def)\ ++ case QGtkColorSource::src: {\ ++ const ColorKey key = ColorKey({QGtkColorSource::src, state});\ ++ if (gtkColorMap.contains(key)) {\ ++ const ColorValue val = gtkColorMap.value(key);\ ++ if (!gtk_style_context_lookup_color(con, val.propertyName.toUtf8().constData(), &col)) {\ ++ col = genericColor(con, state, val.genericSource);\ ++ qCDebug(lcQGtk3Interface) << "Property name" << val.propertyName << "not found.\n"\ ++ << "Falling back to " << val.genericSource;\ ++ }\ ++ } else {\ ++ col = genericColor(con, state, QGtkColorDefault::def);\ ++ qCDebug(lcQGtk3Interface) << "No color source found for" << QGtkColorSource::src\ ++ << fromGtkState(state) << "\n Falling back to"\ ++ << QGtkColorDefault::def;\ ++ }\ ++ }\ ++ break; ++ ++ switch (source) { ++ CASE(Foreground, Foreground) ++ CASE(Background, Background) ++ CASE(Text, Foreground) ++ CASE(Base, Background) ++ CASE(Border, Border) ++ } ++ ++ return fromGdkColor(col); ++#undef CASE ++} ++ ++// Deliver a widget pointer ++GtkWidget *QGtk3Interface::widget(QGtkWidget type) const ++{ ++ if (type == QGtkWidget::gtk_Default) ++ return nullptr; ++ ++ // Return from cache ++ if (GtkWidget *w = cache.value(type)) ++ return w; ++ ++ // Create new item and cache it ++ GtkWidget *w = qt_new_gtkWidget(type); ++ cache.insert(type, w); ++ return w; ++} ++ ++// Return widget syle context or default style ++GtkStyleContext *QGtk3Interface::context(GtkWidget *w) const ++{ ++ if (w) ++ return gtk_widget_get_style_context(w); ++ ++ return gtk_widget_get_style_context(widget(QGtkWidget::gtk_entry)); ++} ++ ++// FIXME ++// Brush assets (e.g. 9-patches) can't be accessed by the GTK API. ++// => brush height and width from GTK will be ignored for the time being, ++// because it is unknown if they relate to a plain brush or an image brush. ++QBrush QGtk3Interface::brush(QGtkWidget wtype, QGtkColorSource source, GtkStateFlags state) const ++{ ++ return QBrush(color(widget(wtype), source, state)); ++} ++ ++const QString QGtk3Interface::themeName() const ++{ ++ gchar *theme_name; ++ GtkSettings *settings = gtk_settings_get_default(); ++ if (!settings) ++ return QString(); ++ ++ g_object_get(settings, "gtk-theme-name", &theme_name, nullptr); ++ return QLatin1String(theme_name); ++} ++ ++inline constexpr QGtk3Interface::QGtkWidget QGtk3Interface::toWidgetType(QPlatformTheme::Font type) ++{ ++ switch (type) { ++ case QPlatformTheme::SystemFont: return QGtkWidget::gtk_Default; ++ case QPlatformTheme::MenuFont: return QGtkWidget::gtk_menu; ++ case QPlatformTheme::MenuBarFont: return QGtkWidget::gtk_menu_bar; ++ case QPlatformTheme::MenuItemFont: return QGtkWidget::gtk_menu; ++ case QPlatformTheme::MessageBoxFont: return QGtkWidget::gtk_popup; ++ case QPlatformTheme::LabelFont: return QGtkWidget::gtk_popup; ++ case QPlatformTheme::TipLabelFont: return QGtkWidget::gtk_Default; ++ case QPlatformTheme::StatusBarFont: return QGtkWidget::gtk_statusbar; ++ case QPlatformTheme::TitleBarFont: return QGtkWidget::gtk_Default; ++ case QPlatformTheme::MdiSubWindowTitleFont: return QGtkWidget::gtk_Default; ++ case QPlatformTheme::DockWidgetTitleFont: return QGtkWidget::gtk_Default; ++ case QPlatformTheme::PushButtonFont: return QGtkWidget::gtk_button; ++ case QPlatformTheme::CheckBoxFont: return QGtkWidget::gtk_check_button; ++ case QPlatformTheme::RadioButtonFont: return QGtkWidget::gtk_radio_button; ++ case QPlatformTheme::ToolButtonFont: return QGtkWidget::gtk_button; ++ case QPlatformTheme::ItemViewFont: return QGtkWidget::gtk_entry; ++ case QPlatformTheme::ListViewFont: return QGtkWidget::gtk_tree_view; ++ case QPlatformTheme::HeaderViewFont: return QGtkWidget::gtk_fixed; ++ case QPlatformTheme::ListBoxFont: return QGtkWidget::gtk_Default; ++ case QPlatformTheme::ComboMenuItemFont: return QGtkWidget::gtk_combo_box; ++ case QPlatformTheme::ComboLineEditFont: return QGtkWidget::gtk_combo_box_text; ++ case QPlatformTheme::SmallFont: return QGtkWidget::gtk_Default; ++ case QPlatformTheme::MiniFont: return QGtkWidget::gtk_Default; ++ case QPlatformTheme::FixedFont: return QGtkWidget::gtk_fixed; ++ case QPlatformTheme::GroupBoxTitleFont: return QGtkWidget::gtk_Default; ++ case QPlatformTheme::TabButtonFont: return QGtkWidget::gtk_button; ++ case QPlatformTheme::EditorFont: return QGtkWidget::gtk_entry; ++ case QPlatformTheme::NFonts: return QGtkWidget::gtk_Default; ++ } ++ Q_UNREACHABLE(); ++} ++ ++inline constexpr QFont::Style QGtk3Interface::toFontStyle(PangoStyle style) ++{ ++ switch (style) { ++ case PANGO_STYLE_ITALIC: return QFont::StyleItalic; ++ case PANGO_STYLE_OBLIQUE: return QFont::StyleOblique; ++ case PANGO_STYLE_NORMAL: return QFont::StyleNormal; ++ } ++ // This is reached when GTK has introduced a new font style ++ Q_UNREACHABLE(); ++} ++ ++inline constexpr int QGtk3Interface::toFontWeight(PangoWeight weight) ++{ ++ // GTK PangoWeight can be directly converted to QFont::Weight ++ // unless one of the enums changes. ++ static_assert(PANGO_WEIGHT_THIN == 100 && PANGO_WEIGHT_ULTRAHEAVY == 1000, ++ "Pango font weight enum changed. Fix conversion."); ++ ++ return qBound(1, static_cast(weight), 1000); ++} ++ ++inline constexpr QFont::Weight QGtk3Interface::toQFontWeight(int weight) ++{ ++ if (weight <= 100) ++ return QFont::Thin; ++ else if (weight <= 200) ++ return QFont::ExtraLight; ++ else if (weight <= 300) ++ return QFont::Light; ++ else if (weight <= 400) ++ return QFont::Normal; ++ else if (weight <= 500) ++ return QFont::Medium; ++ else if (weight <= 600) ++ return QFont::DemiBold; ++ else if (weight <= 700) ++ return QFont::Bold; ++ else if (weight <= 800) ++ return QFont::ExtraBold; ++ else ++ return QFont::Black; ++} ++ ++QFont QGtk3Interface::font(QPlatformTheme::Font type) const ++{ ++ GtkStyleContext *con = context(widget(toWidgetType(type))); ++ if (!con) ++ return QFont(); ++ ++ const PangoFontDescription *gtkFont = gtk_style_context_get_font(con, GTK_STATE_FLAG_NORMAL); ++ if (!gtkFont) ++ return QFont(); ++ ++ const QString family = QString::fromLatin1(pango_font_description_get_family(gtkFont)); ++ if (family.isEmpty()) ++ return QFont(); ++ ++ const int weight = toFontWeight(pango_font_description_get_weight(gtkFont)); ++ ++ // Creating a QFont() creates a futex lockup on a theme change ++ // QFont doesn't have a constructor with float point size ++ // => create a dummy point size and set it later. ++ QFont font(family, 1, toQFontWeight(weight)); ++ font.setPointSizeF(static_cast(pango_font_description_get_size(gtkFont)/PANGO_SCALE)); ++ font.setStyle(toFontStyle(pango_font_description_get_style(gtkFont))); ++ ++ // fix pixel pitch if fixed font is requested ++ // NOTE: GTK allows to specify a non fixed font as the system's fixed font. ++ // => the returned font may still not be a fixed font. ++ if (type == QPlatformTheme::FixedFont) { ++ font.setFixedPitch(true); ++ if (!QFontInfo(font).fixedPitch()) { ++ qCDebug(lcQGtk3Interface) << "No fixed pitch font found in font family" ++ << font.family() << ". falling back to a default" ++ << "fixed pitch font"; ++ font.setFamily("monospace"); ++ } ++ } ++ return font; ++} ++ ++QIcon QGtk3Interface::fileIcon(const QFileInfo &fileInfo) const ++{ ++ GFile *file = g_file_new_for_path(fileInfo.absoluteFilePath().toLatin1().constData()); ++ if (!file) ++ return QIcon(); ++ ++ GFileInfo *info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, ++ G_FILE_QUERY_INFO_NONE, nullptr, nullptr); ++ if (!info) { ++ g_object_unref(file); ++ return QIcon(); ++ } ++ ++ GIcon *icon = g_file_info_get_icon(info); ++ if (!icon) { ++ g_object_unref(file); ++ g_object_unref(info); ++ return QIcon(); ++ } ++ ++ GtkIconTheme *theme = gtk_icon_theme_get_default(); ++ GtkIconInfo *iconInfo = gtk_icon_theme_lookup_by_gicon(theme, icon, GTK_ICON_SIZE_BUTTON, ++ GTK_ICON_LOOKUP_FORCE_SIZE); ++ if (!iconInfo) { ++ g_object_unref(file); ++ g_object_unref(info); ++ g_object_unref(icon); ++ return QIcon(); ++ } ++ ++ GdkPixbuf *buf = gtk_icon_info_load_icon(iconInfo, nullptr); ++ QImage image = qt_convert_gdk_pixbuf(buf); ++ g_object_unref(file); ++ g_object_unref(info); ++ g_object_unref(icon); ++ g_object_unref(buf); ++ return QIcon(QPixmap::fromImage(image)); ++} ++ ++QT_END_NAMESPACE +diff --git a/src/plugins/platformthemes/gtk3/qgtk3interface_p.h b/src/plugins/platformthemes/gtk3/qgtk3interface_p.h +new file mode 100644 +index 0000000000..8997a64e76 +--- /dev/null ++++ b/src/plugins/platformthemes/gtk3/qgtk3interface_p.h +@@ -0,0 +1,170 @@ ++// Copyright (C) 2022 The Qt Company Ltd. ++// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only ++ ++#ifndef QGTK3INTERFACE_H ++#define QGTK3INTERFACE_H ++ ++// ++// W A R N I N G ++// ------------- ++// ++// This file is not part of the Qt API. It exists purely as an ++// implementation detail. This header file may change from version to ++// version without notice, or even be removed. ++// ++// We mean it. ++// ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#undef signals // Collides with GTK symbols ++#include ++#include ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++Q_DECLARE_LOGGING_CATEGORY(lcQGtk3Interface); ++ ++class QGtk3Storage; ++class QGtk3Interface ++{ ++ Q_GADGET ++public: ++ QGtk3Interface(QGtk3Storage *); ++ ~QGtk3Interface(); ++ ++ // Enum representing GTK widget types ++ enum class QGtkWidget { ++ gtk_menu_bar, ++ gtk_menu, ++ gtk_button, ++ gtk_button_box, ++ gtk_check_button, ++ gtk_radio_button, ++ gtk_frame, ++ gtk_statusbar, ++ gtk_entry, ++ gtk_popup, ++ gtk_notebook, ++ gtk_toolbar, ++ gtk_tree_view, ++ gtk_combo_box, ++ gtk_combo_box_text, ++ gtk_progress_bar, ++ gtk_fixed, ++ gtk_separator_menu_item, ++ gtk_Default, ++ gtk_offscreen_window ++ }; ++ Q_ENUM(QGtkWidget) ++ ++ // Enum representing color sources of a GTK theme ++ enum class QGtkColorSource { ++ Foreground, ++ Background, ++ Text, ++ Base, ++ Border ++ }; ++ Q_ENUM(QGtkColorSource) ++ ++ // Enum for default color getter ++ enum class QGtkColorDefault { ++ Foreground, ++ Background, ++ Border ++ }; ++ Q_ENUM(QGtkColorDefault) ++ ++ // Create a brush from GTK widget type, color source and color state ++ QBrush brush(QGtkWidget wtype, QGtkColorSource source, GtkStateFlags state) const; ++ ++ // Font & icon getters ++ QImage standardPixmap(QPlatformTheme::StandardPixmap standardPixmap) const; ++ QFont font(QPlatformTheme::Font type) const; ++ QIcon fileIcon(const QFileInfo &fileInfo) const; ++ ++ // Return current GTK theme name ++ const QString themeName() const; ++ ++ // Convert GTK state to/from string ++ static int toGtkState(const QString &state); ++ static const QLatin1String fromGtkState(GtkStateFlags state); ++ ++private: ++ ++ // Map colors to GTK property names and default to generic color getters ++ struct ColorKey { ++ QGtkColorSource colorSource = QGtkColorSource::Background; ++ GtkStateFlags state = GTK_STATE_FLAG_NORMAL; ++ ++ // struct becomes key of a map, so operator< is needed ++ bool operator<(const ColorKey& other) const { ++ return std::tie(colorSource, state) < ++ std::tie(other.colorSource, other.state); ++ } ++ ++ QDebug operator<<(QDebug dbg) ++ { ++ return dbg << "QGtk3Interface::ColorKey(colorSource=" << colorSource << ", GTK state=" << fromGtkState(state) << ")"; ++ } ++ }; ++ ++ struct ColorValue { ++ QString propertyName = QString(); ++ QGtkColorDefault genericSource = QGtkColorDefault::Background; ++ ++ QDebug operator<<(QDebug dbg) ++ { ++ return dbg << "QGtk3Interface::ColorValue(propertyName=" << propertyName << ", genericSource=" << genericSource << ")"; ++ } ++ }; ++ ++ typedef QFlatMap ColorMap; ++ ColorMap gtkColorMap; ++ void initColorMap(); ++ ++ GdkRGBA genericColor(GtkStyleContext *con, GtkStateFlags state, QGtkColorDefault def) const; ++ ++ // Cache for GTK widgets ++ mutable QFlatMap cache; ++ ++ // Converters for GTK icon and GDK pixbuf ++ QImage qt_gtk_get_icon(const char *iconName) const; ++ QImage qt_convert_gdk_pixbuf(GdkPixbuf *buf) const; ++ ++ // Create new GTK widget object ++ GtkWidget *qt_new_gtkWidget(QGtkWidget type) const; ++ ++ // Deliver GTK Widget from cache or create new ++ GtkWidget *widget(QGtkWidget type) const; ++ ++ // Get a GTK widget's style context. Default settings style context if nullptr ++ GtkStyleContext *context(GtkWidget *widget = nullptr) const; ++ ++ // Convert GTK color into QColor ++ static inline QColor fromGdkColor (const GdkRGBA &c) ++ { return QColor::fromRgbF(c.red, c.green, c.blue, c.alpha); } ++ ++ // get a QColor of a GTK widget (default settings style if nullptr) ++ QColor color (GtkWidget *widget, QGtkColorSource source, GtkStateFlags state) const; ++ ++ // Mappings for GTK fonts ++ inline static constexpr QGtkWidget toWidgetType(QPlatformTheme::Font); ++ inline static constexpr QFont::Style toFontStyle(PangoStyle style); ++ inline static constexpr int toFontWeight(PangoWeight weight); ++ inline static constexpr QFont::Weight toQFontWeight(int weight); ++ ++}; ++QT_END_NAMESPACE ++#endif // QGTK3INTERFACE_H +diff --git a/src/plugins/platformthemes/gtk3/qgtk3json.cpp b/src/plugins/platformthemes/gtk3/qgtk3json.cpp +new file mode 100644 +index 0000000000..f4d5b50ec5 +--- /dev/null ++++ b/src/plugins/platformthemes/gtk3/qgtk3json.cpp +@@ -0,0 +1,475 @@ ++// Copyright (C) 2022 The Qt Company Ltd. ++// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only ++ ++// ++// W A R N I N G ++// ------------- ++// ++// This file is not part of the Qt API. It exists purely as an ++// implementation detail. This header file may change from version to ++// version without notice, or even be removed. ++// ++// We mean it. ++// ++ ++#include "qgtk3json_p.h" ++#include ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++QLatin1String QGtk3Json::fromPalette(QPlatformTheme::Palette palette) ++{ ++ switch (palette) { ++ case QPlatformTheme::SystemPalette: ++ return QLatin1String("SystemPalette"); ++ case QPlatformTheme::ToolTipPalette: ++ return QLatin1String("ToolTipPalette"); ++ case QPlatformTheme::ToolButtonPalette: ++ return QLatin1String("ToolButtonPalette"); ++ case QPlatformTheme::ButtonPalette: ++ return QLatin1String("ButtonPalette"); ++ case QPlatformTheme::CheckBoxPalette: ++ return QLatin1String("CheckBoxPalette"); ++ case QPlatformTheme::RadioButtonPalette: ++ return QLatin1String("RadioButtonPalette"); ++ case QPlatformTheme::HeaderPalette: ++ return QLatin1String("HeaderPalette"); ++ case QPlatformTheme::ComboBoxPalette: ++ return QLatin1String("ComboBoxPalette"); ++ case QPlatformTheme::ItemViewPalette: ++ return QLatin1String("ItemViewPalette"); ++ case QPlatformTheme::MessageBoxLabelPalette: ++ return QLatin1String("MessageBoxLabelPalette"); ++ case QPlatformTheme::TabBarPalette: ++ return QLatin1String("TabBarPalette"); ++ case QPlatformTheme::LabelPalette: ++ return QLatin1String("LabelPalette"); ++ case QPlatformTheme::GroupBoxPalette: ++ return QLatin1String("GroupBoxPalette"); ++ case QPlatformTheme::MenuPalette: ++ return QLatin1String("MenuPalette"); ++ case QPlatformTheme::MenuBarPalette: ++ return QLatin1String("MenuBarPalette"); ++ case QPlatformTheme::TextEditPalette: ++ return QLatin1String("TextEditPalette"); ++ case QPlatformTheme::TextLineEditPalette: ++ return QLatin1String("TextLineEditPalette"); ++ default: ++ return QLatin1String(); ++ } ++ return QLatin1String(); ++} ++ ++QLatin1String QGtk3Json::fromGtkState(GtkStateFlags state) ++{ ++ return QGtk3Interface::fromGtkState(state); ++} ++ ++QLatin1String fromColor(const QColor &color) ++{ ++ return QLatin1String(QByteArray(color.name(QColor::HexRgb).toLatin1())); ++} ++ ++QLatin1String QGtk3Json::fromColorRole(QPalette::ColorRole role) ++{ ++ return QLatin1String(QMetaEnum::fromType().valueToKey(static_cast(role))); ++} ++ ++QLatin1String QGtk3Json::fromColorGroup(QPalette::ColorGroup group) ++{ ++ return QLatin1String(QMetaEnum::fromType().valueToKey(static_cast(group))); ++} ++ ++QLatin1String QGtk3Json::fromGdkSource(QGtk3Interface::QGtkColorSource source) ++{ ++ return QLatin1String(QMetaEnum::fromType().valueToKey(static_cast(source))); ++} ++ ++QLatin1String QGtk3Json::fromWidgetType(QGtk3Interface::QGtkWidget widgetType) ++{ ++ return QLatin1String(QMetaEnum::fromType().valueToKey(static_cast(widgetType))); ++} ++ ++QLatin1String QGtk3Json::fromAppearance(Qt::Appearance app) ++{ ++ return QLatin1String(QMetaEnum::fromType().valueToKey(static_cast(app))); ++} ++ ++#define CONVERT(type, key, def)\ ++ bool ok;\ ++ const int intVal = QMetaEnum::fromType().keyToValue(key.toLatin1().constData(), &ok);\ ++ return ok ? static_cast(intVal) : type::def ++ ++Qt::Appearance QGtk3Json::toAppearance(const QString &appearance) ++{ ++ CONVERT(Qt::Appearance, appearance, Unknown); ++} ++ ++QPlatformTheme::Palette QGtk3Json::toPalette(const QString &palette) ++{ ++ if (palette == QLatin1String("SystemPalette")) ++ return QPlatformTheme::SystemPalette; ++ else if (palette == QLatin1String("ToolTipPalette")) ++ return QPlatformTheme::ToolTipPalette; ++ else if (palette == QLatin1String("ToolButtonPalette")) ++ return QPlatformTheme::ToolButtonPalette; ++ else if (palette == QLatin1String("ButtonPalette")) ++ return QPlatformTheme::ButtonPalette; ++ else if (palette == QLatin1String("CheckBoxPalette")) ++ return QPlatformTheme::CheckBoxPalette; ++ else if (palette == QLatin1String("RadioButtonPalette")) ++ return QPlatformTheme::RadioButtonPalette; ++ else if (palette == QLatin1String("HeaderPalette")) ++ return QPlatformTheme::HeaderPalette; ++ else if (palette == QLatin1String("ComboBoxPalette")) ++ return QPlatformTheme::ComboBoxPalette; ++ else if (palette == QLatin1String("ItemViewPalette")) ++ return QPlatformTheme::ItemViewPalette; ++ else if (palette == QLatin1String("MessageBoxLabelPelette")) ++ return QPlatformTheme::MessageBoxLabelPelette; ++ else if (palette == QLatin1String("TabBarPalette")) ++ return QPlatformTheme::TabBarPalette; ++ else if (palette == QLatin1String("LabelPalette")) ++ return QPlatformTheme::LabelPalette; ++ else if (palette == QLatin1String("GroupBoxPalette")) ++ return QPlatformTheme::GroupBoxPalette; ++ else if (palette == QLatin1String("MenuPalette")) ++ return QPlatformTheme::MenuPalette; ++ else if (palette == QLatin1String("MenuBarPalette")) ++ return QPlatformTheme::MenuBarPalette; ++ else if (palette == QLatin1String("TextEditPalette")) ++ return QPlatformTheme::TextEditPalette; ++ else if (palette == QLatin1String("TextLineEditPalette")) ++ return QPlatformTheme::TextLineEditPalette; ++ ++ return QPlatformTheme::NPalettes; ++} ++ ++GtkStateFlags QGtk3Json::toGtkState(const QString &type) ++{ ++ int i = QGtk3Interface::toGtkState(type); ++ if (i < 0) ++ return GTK_STATE_FLAG_NORMAL; ++ return static_cast(i); ++} ++ ++QColor toColor(const QStringView &color) ++{ ++ return QColor(color); ++} ++ ++QPalette::ColorRole QGtk3Json::toColorRole(const QString &role) ++{ ++ CONVERT(QPalette::ColorRole, role, NColorRoles); ++} ++ ++QPalette::ColorGroup QGtk3Json::toColorGroup(const QString &group) ++{ ++ CONVERT(QPalette::ColorGroup, group, NColorGroups); ++} ++ ++QGtk3Interface::QGtkColorSource QGtk3Json::toGdkSource(const QString &source) ++{ ++ CONVERT(QGtk3Interface::QGtkColorSource, source, Background); ++} ++ ++QLatin1String QGtk3Json::fromSourceType(QGtk3Storage::SourceType sourceType) ++{ ++ return QLatin1String(QMetaEnum::fromType().valueToKey(static_cast(sourceType))); ++} ++ ++QGtk3Storage::SourceType QGtk3Json::toSourceType(const QString &sourceType) ++{ ++ CONVERT(QGtk3Storage::SourceType, sourceType, Invalid); ++} ++ ++QGtk3Interface::QGtkWidget QGtk3Json::toWidgetType(const QString &widgetType) ++{ ++ CONVERT(QGtk3Interface::QGtkWidget, widgetType, gtk_offscreen_window); ++} ++ ++#undef CONVERT ++ ++bool QGtk3Json::save(const QGtk3Storage::PaletteMap &map, const QString &fileName, ++ QJsonDocument::JsonFormat format) ++{ ++ QJsonDocument doc = save(map); ++ if (doc.isEmpty()) { ++ qWarning() << "Nothing to save to" << fileName; ++ return false; ++ } ++ ++ QFile file(fileName); ++ if (!file.open(QIODevice::WriteOnly)) { ++ qWarning() << "Unable to open file" << fileName << "for writing."; ++ return false; ++ } ++ ++ if (!file.write(doc.toJson(format))) { ++ qWarning() << "Unable to serialize Json document."; ++ return false; ++ } ++ ++ file.close(); ++ qInfo() << "Saved mapping data to" << fileName; ++ return true; ++} ++ ++const QJsonDocument QGtk3Json::save(const QGtk3Storage::PaletteMap &map) ++{ ++ QJsonObject paletteObject; ++ for (auto paletteIterator = map.constBegin(); paletteIterator != map.constEnd(); ++ ++paletteIterator) { ++ const QGtk3Storage::BrushMap &bm = paletteIterator.value(); ++ QFlatMap brushMaps; ++ for (auto brushIterator = bm.constBegin(); brushIterator != bm.constEnd(); ++ ++brushIterator) { ++ const QPalette::ColorRole role = brushIterator.key().colorRole; ++ if (brushMaps.contains(role)) { ++ brushMaps.value(role).insert(brushIterator.key(), brushIterator.value()); ++ } else { ++ QGtk3Storage::BrushMap newMap; ++ newMap.insert(brushIterator.key(), brushIterator.value()); ++ brushMaps.insert(role, newMap); ++ } ++ } ++ ++ QJsonObject brushArrayObject; ++ for (auto brushMapIterator = brushMaps.constBegin(); ++ brushMapIterator != brushMaps.constEnd(); ++brushMapIterator) { ++ ++ QJsonArray brushArray; ++ int brushIndex = 0; ++ const QGtk3Storage::BrushMap &bm = brushMapIterator.value(); ++ for (auto brushIterator = bm.constBegin(); brushIterator != bm.constEnd(); ++ ++brushIterator) { ++ QJsonObject brushObject; ++ const QGtk3Storage::TargetBrush tb = brushIterator.key(); ++ QGtk3Storage::Source s = brushIterator.value(); ++ brushObject.insert(ceColorGroup, fromColorGroup(tb.colorGroup)); ++ brushObject.insert(ceAppearance, fromAppearance(tb.appearance)); ++ brushObject.insert(ceSourceType, fromSourceType(s.sourceType)); ++ ++ QJsonObject sourceObject; ++ switch (s.sourceType) { ++ case QGtk3Storage::SourceType::Gtk: { ++ sourceObject.insert(ceGtkWidget, fromWidgetType(s.gtk3.gtkWidgetType)); ++ sourceObject.insert(ceGdkSource, fromGdkSource(s.gtk3.source)); ++ sourceObject.insert(ceGtkState, fromGtkState(s.gtk3.state)); ++ sourceObject.insert(ceWidth, s.gtk3.width); ++ sourceObject.insert(ceHeight, s.gtk3.height); ++ } ++ break; ++ ++ case QGtk3Storage::SourceType::Fixed: { ++ QJsonObject fixedObject; ++ fixedObject.insert(ceColor, s.fix.fixedBrush.color().name()); ++ fixedObject.insert(ceWidth, s.fix.fixedBrush.texture().width()); ++ fixedObject.insert(ceHeight, s.fix.fixedBrush.texture().height()); ++ sourceObject.insert(ceBrush, fixedObject); ++ } ++ break; ++ ++ case QGtk3Storage::SourceType::Modified:{ ++ sourceObject.insert(ceColorGroup, fromColorGroup(s.rec.colorGroup)); ++ sourceObject.insert(ceColorRole, fromColorRole(s.rec.colorRole)); ++ sourceObject.insert(ceAppearance, fromAppearance(s.rec.appearance)); ++ sourceObject.insert(ceRed, s.rec.deltaRed); ++ sourceObject.insert(ceGreen, s.rec.deltaGreen); ++ sourceObject.insert(ceBlue, s.rec.deltaBlue); ++ sourceObject.insert(ceWidth, s.rec.width); ++ sourceObject.insert(ceHeight, s.rec.height); ++ sourceObject.insert(ceLighter, s.rec.lighter); ++ } ++ break; ++ ++ case QGtk3Storage::SourceType::Invalid: ++ break; ++ } ++ ++ brushObject.insert(ceData, sourceObject); ++ brushArray.insert(brushIndex, brushObject); ++ ++brushIndex; ++ } ++ brushArrayObject.insert(fromColorRole(brushMapIterator.key()), brushArray); ++ } ++ paletteObject.insert(fromPalette(paletteIterator.key()), brushArrayObject); ++ } ++ ++ QJsonObject top; ++ top.insert(cePalettes, paletteObject); ++ return paletteObject.keys().isEmpty() ? QJsonDocument() : QJsonDocument(top); ++} ++ ++bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QString &fileName) ++{ ++ QFile file(fileName); ++ if (!file.open(QIODevice::ReadOnly)) { ++ qCWarning(lcQGtk3Interface) << "Unable to open file:" << fileName; ++ return false; ++ } ++ ++ QJsonParseError err; ++ QJsonDocument doc = QJsonDocument::fromJson(file.readAll(), &err); ++ if (err.error != QJsonParseError::NoError) { ++ qWarning(lcQGtk3Interface) << "Unable to parse Json document from" << fileName ++ << err.error << err.errorString(); ++ return false; ++ } ++ ++ if (Q_LIKELY(load(map, doc))) { ++ qInfo() << "GTK mapping successfully imported from" << fileName; ++ return true; ++ } ++ ++ qWarning() << "File" << fileName << "could not be loaded."; ++ return false; ++} ++ ++bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) ++{ ++#define GETSTR(obj, key)\ ++ if (!obj.contains(key)) {\ ++ qCDebug(lcQGtk3Interface) << key << "missing for palette" << paletteName\ ++ << ", Brush" << colorRoleName;\ ++ return false;\ ++ }\ ++ value = obj[key].toString() ++ ++#define GETINT(obj, key, var) GETSTR(obj, key);\ ++ if (!obj[key].isDouble()) {\ ++ qCDebug(lcQGtk3Interface) << key << "type mismatch" << value\ ++ << "is not an integer!"\ ++ << "(Palette" << paletteName << "), Brush" << colorRoleName;\ ++ return false;\ ++ }\ ++ const int var = obj[key].toInt() ++ ++ map.clear(); ++ const QJsonObject top(doc.object()); ++ if (doc.isEmpty() || top.isEmpty() || !top.contains(cePalettes)) { ++ qCDebug(lcQGtk3Interface) << "Document does not contain Palettes."; ++ return false; ++ } ++ ++ const QStringList &paletteList = top[cePalettes].toObject().keys(); ++ for (const QString &paletteName : paletteList) { ++ bool ok; ++ const QPlatformTheme::Palette paletteType = toPalette(paletteName); ++ if (paletteType == QPlatformTheme::NPalettes) { ++ qCDebug(lcQGtk3Interface) << "Invalid Palette name:" << paletteName; ++ return false; ++ } ++ const QJsonObject &paletteObject = top[cePalettes][paletteName].toObject(); ++ const QStringList &brushList = paletteObject.keys(); ++ if (brushList.isEmpty()) { ++ qCDebug(lcQGtk3Interface) << "Palette" << paletteName << "does not contain brushes"; ++ return false; ++ } ++ ++ QGtk3Storage::BrushMap brushes; ++ const QStringList &colorRoles = paletteObject.keys(); ++ for (const QString &colorRoleName : colorRoles) { ++ const int intVal = QMetaEnum::fromType().keyToValue(colorRoleName ++ .toLatin1().constData(), &ok); ++ if (!ok) { ++ qCDebug(lcQGtk3Interface) << "Palette" << paletteName ++ << "contains invalid color role" << colorRoleName; ++ return false; ++ } ++ const QPalette::ColorRole colorRole = static_cast(intVal); ++ const QJsonArray &brushArray = paletteObject[colorRoleName].toArray(); ++ for (int brushIndex = 0; brushIndex < brushArray.size(); ++brushIndex) { ++ const QJsonObject brushObject = brushArray.at(brushIndex).toObject(); ++ if (brushObject.isEmpty()) { ++ qCDebug(lcQGtk3Interface) << "Brush specification missing at for palette" ++ << paletteName << ", Brush" << colorRoleName; ++ return false; ++ } ++ ++ QString value; ++ GETSTR(brushObject, ceSourceType); ++ const QGtk3Storage::SourceType sourceType = toSourceType(value); ++ GETSTR(brushObject, ceColorGroup); ++ const QPalette::ColorGroup colorGroup = toColorGroup(value); ++ GETSTR(brushObject, ceAppearance); ++ const Qt::Appearance appearance = toAppearance(value); ++ QGtk3Storage::TargetBrush tb(colorGroup, colorRole, appearance); ++ QGtk3Storage::Source s; ++ ++ if (!brushObject.contains(ceData) || !brushObject[ceData].isObject()) { ++ qCDebug(lcQGtk3Interface) << "Source specification missing for palette" << paletteName ++ << "Brush" << colorRoleName; ++ return false; ++ } ++ const QJsonObject &sourceObject = brushObject[ceData].toObject(); ++ ++ switch (sourceType) { ++ case QGtk3Storage::SourceType::Gtk: { ++ GETSTR(sourceObject, ceGdkSource); ++ const QGtk3Interface::QGtkColorSource gtkSource = toGdkSource(value); ++ GETSTR(sourceObject, ceGtkState); ++ const GtkStateFlags gtkState = toGtkState(value); ++ GETSTR(sourceObject, ceGtkWidget); ++ const QGtk3Interface::QGtkWidget widgetType = toWidgetType(value); ++ GETINT(sourceObject, ceHeight, height); ++ GETINT(sourceObject, ceWidth, width); ++ s = QGtk3Storage::Source(widgetType, gtkSource, gtkState, width, height); ++ } ++ break; ++ ++ case QGtk3Storage::SourceType::Fixed: { ++ if (!sourceObject.contains(ceBrush)) { ++ qCDebug(lcQGtk3Interface) << "Fixed brush specification missing for palette" << paletteName ++ << "Brush" << colorRoleName; ++ return false; ++ } ++ const QJsonObject &fixedSource = sourceObject[ceBrush].toObject(); ++ GETINT(fixedSource, ceWidth, width); ++ GETINT(fixedSource, ceHeight, height); ++ GETSTR(fixedSource, ceColor); ++ const QColor color(value); ++ if (!color.isValid()) { ++ qCDebug(lcQGtk3Interface) << "Color" << value << "can't be parsed for:" << paletteName ++ << "Brush" << colorRoleName; ++ return false; ++ } ++ const QBrush fixedBrush = (width < 0 && height < 0) ++ ? QBrush(color, QPixmap(width, height)) ++ : QBrush(color); ++ s = QGtk3Storage::Source(fixedBrush); ++ } ++ break; ++ ++ case QGtk3Storage::SourceType::Modified: { ++ GETSTR(sourceObject, ceColorGroup); ++ const QPalette::ColorGroup colorGroup = toColorGroup(value); ++ GETSTR(sourceObject, ceColorRole); ++ const QPalette::ColorRole colorRole = toColorRole(value); ++ GETSTR(sourceObject, ceAppearance); ++ const Qt::Appearance appearance = toAppearance(value); ++ GETINT(sourceObject, ceLighter, lighter); ++ GETINT(sourceObject, ceRed, red); ++ GETINT(sourceObject, ceBlue, blue); ++ GETINT(sourceObject, ceGreen, green); ++ s = QGtk3Storage::Source(colorGroup, colorRole, appearance, ++ lighter, red, green, blue); ++ } ++ break; ++ ++ case QGtk3Storage::SourceType::Invalid: ++ qCDebug(lcQGtk3Interface) << "Invalid source type for palette" << paletteName ++ << "Brush." << colorRoleName; ++ return false; ++ } ++ brushes.insert(tb, s); ++ } ++ } ++ map.insert(paletteType, brushes); ++ } ++ return true; ++} ++ ++QT_END_NAMESPACE ++ +diff --git a/src/plugins/platformthemes/gtk3/qgtk3json_p.h b/src/plugins/platformthemes/gtk3/qgtk3json_p.h +new file mode 100644 +index 0000000000..b3680eb7dc +--- /dev/null ++++ b/src/plugins/platformthemes/gtk3/qgtk3json_p.h +@@ -0,0 +1,102 @@ ++// Copyright (C) 2022 The Qt Company Ltd. ++// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only ++#ifndef QGTK3JSON_P_H ++#define QGTK3JSON_P_H ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include "qgtk3interface_p.h" ++#include "qgtk3storage_p.h" ++ ++#undef signals // Collides with GTK symbols ++#include ++#include ++#include ++ ++// ++// W A R N I N G ++// ------------- ++// ++// This file is not part of the Qt API. It exists purely as an ++// implementation detail. This header file may change from version to ++// version without notice, or even be removed. ++// ++// We mean it. ++// ++ ++QT_BEGIN_NAMESPACE ++ ++class QGtk3Json ++{ ++ Q_GADGET ++private: ++ QGtk3Json(){}; ++ ++public: ++ // Convert enums to strings ++ static QLatin1String fromPalette(QPlatformTheme::Palette palette); ++ static QLatin1String fromGtkState(GtkStateFlags type); ++ static QLatin1String fromColor(const QColor &Color); ++ static QLatin1String fromColorRole(QPalette::ColorRole role); ++ static QLatin1String fromColorGroup(QPalette::ColorGroup group); ++ static QLatin1String fromGdkSource(QGtk3Interface::QGtkColorSource source); ++ static QLatin1String fromSourceType(QGtk3Storage::SourceType sourceType); ++ static QLatin1String fromWidgetType(QGtk3Interface::QGtkWidget widgetType); ++ static QLatin1String fromAppearance(Qt::Appearance app); ++ ++ // Convert strings to enums ++ static QPlatformTheme::Palette toPalette(const QString &palette); ++ static GtkStateFlags toGtkState(const QString &type); ++ static QColor toColor(const QString &Color); ++ static QPalette::ColorRole toColorRole(const QString &role); ++ static QPalette::ColorGroup toColorGroup(const QString &group); ++ static QGtk3Interface::QGtkColorSource toGdkSource(const QString &source); ++ static QGtk3Storage::SourceType toSourceType(const QString &sourceType); ++ static QGtk3Interface::QGtkWidget toWidgetType(const QString &widgetType); ++ static Qt::Appearance toAppearance(const QString &appearance); ++ ++ // Json keys ++ static constexpr QStringView cePalettes = u"QtGtk3Palettes"; ++ static constexpr QStringView cePalette = u"PaletteType"; ++ static constexpr QStringView ceGtkState = u"GtkStateType"; ++ static constexpr QStringView ceGtkWidget = u"GtkWidgetType"; ++ static constexpr QStringView ceColor = u"Color"; ++ static constexpr QStringView ceColorRole = u"ColorRole"; ++ static constexpr QStringView ceColorGroup = u"ColorGroup"; ++ static constexpr QStringView ceGdkSource = u"GdkSource"; ++ static constexpr QStringView ceSourceType = u"SourceType"; ++ static constexpr QStringView ceLighter = u"Lighter"; ++ static constexpr QStringView ceRed = u"DeltaRed"; ++ static constexpr QStringView ceGreen = u"DeltaGreen"; ++ static constexpr QStringView ceBlue = u"DeltaBlue"; ++ static constexpr QStringView ceWidth = u"Width"; ++ static constexpr QStringView ceHeight = u"Height"; ++ static constexpr QStringView ceBrush = u"FixedBrush"; ++ static constexpr QStringView ceData = u"SourceData"; ++ static constexpr QStringView ceBrushes = u"Brushes"; ++ static constexpr QStringView ceAppearance = u"Appearance"; ++ ++ // Save to a file ++ static bool save(const QGtk3Storage::PaletteMap &map, const QString &fileName, ++ QJsonDocument::JsonFormat format = QJsonDocument::Indented); ++ ++ // Save to a Json document ++ static const QJsonDocument save(const QGtk3Storage::PaletteMap &map); ++ ++ // Load from a file ++ static bool load(QGtk3Storage::PaletteMap &map, const QString &fileName); ++ ++ // Load from a Json document ++ static bool load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc); ++}; ++ ++QT_END_NAMESPACE ++#endif // QGTK3JSON_P_H +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +new file mode 100644 +index 0000000000..0a1fa6ef97 +--- /dev/null ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +@@ -0,0 +1,470 @@ ++// Copyright (C) 2022 The Qt Company Ltd. ++// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only ++ ++// ++// W A R N I N G ++// ------------- ++// ++// This file is not part of the Qt API. It exists purely as an ++// implementation detail. This header file may change from version to ++// version without notice, or even be removed. ++// ++// We mean it. ++// ++ ++#include "qgtk3json_p.h" ++#include "qgtk3storage_p.h" ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++QGtk3Storage::QGtk3Storage() ++{ ++ m_interface.reset(new QGtk3Interface(this)); ++ populateMap(); ++} ++ ++// Set a brush from a source and resolve recursions ++QBrush QGtk3Storage::brush(const Source &source, const BrushMap &map) const ++{ ++ switch (source.sourceType) { ++ case SourceType::Gtk: ++ return m_interface ? QBrush(m_interface->brush(source.gtk3.gtkWidgetType, ++ source.gtk3.source, source.gtk3.state)) ++ : QBrush(); ++ ++ case SourceType::Modified: { ++ // don't loop through modified sources, break if modified source not found ++ Source recSource = brush(TargetBrush(source.rec.colorGroup, source.rec.colorRole, ++ source.rec.appearance), map); ++ ++ if (!recSource.isValid() || (recSource.sourceType == SourceType::Modified)) ++ return QBrush(); ++ ++ // Set brush and alter color ++ QBrush b = brush(recSource, map); ++ if (source.rec.width > 0 && source.rec.height > 0) ++ b.setTexture(QPixmap(source.rec.width, source.rec.height)); ++ QColor c = b.color().lighter(source.rec.lighter); ++ c = QColor((c.red() + source.rec.deltaRed), ++ (c.green() + source.rec.deltaGreen), ++ (c.blue() + source.rec.deltaBlue)); ++ b.setColor(c); ++ return b; ++ } ++ ++ case SourceType::Fixed: ++ return source.fix.fixedBrush; ++ ++ case SourceType::Invalid: ++ return QBrush(); ++ } ++ ++ // needed because of the scope after recursive ++ Q_UNREACHABLE(); ++} ++ ++// Find source for a recursion and take dark/light/unknown into consideration ++QGtk3Storage::Source QGtk3Storage::brush(const TargetBrush &b, const BrushMap &map) const ++{ ++#define FIND(brush) if (map.contains(brush))\ ++ return map.value(brush) ++ ++ // Return exact match ++ FIND(b); ++ ++ // unknown appearance can find anything ++ if (b.appearance == Qt::Appearance::Unknown) { ++ FIND(TargetBrush(b, Qt::Appearance::Dark)); ++ FIND(TargetBrush(b, Qt::Appearance::Light)); ++ } ++ ++ // Color group All can always be found ++ if (b.colorGroup != QPalette::All) ++ return brush(TargetBrush(QPalette::All, b.colorRole, b.appearance), map); ++ ++ // Brush not found ++ return Source(); ++#undef FIND ++} ++ ++// Create a simple standard palette ++QPalette QGtk3Storage::standardPalette() ++{ ++ QColor backgroundColor(0xd4, 0xd0, 0xc8); ++ QColor lightColor(backgroundColor.lighter()); ++ QColor darkColor(backgroundColor.darker()); ++ const QBrush darkBrush(darkColor); ++ QColor midColor(Qt::gray); ++ QPalette palette(Qt::black, backgroundColor, lightColor, darkColor, ++ midColor, Qt::black, Qt::white); ++ palette.setBrush(QPalette::Disabled, QPalette::WindowText, darkBrush); ++ palette.setBrush(QPalette::Disabled, QPalette::Text, darkBrush); ++ palette.setBrush(QPalette::Disabled, QPalette::ButtonText, darkBrush); ++ palette.setBrush(QPalette::Disabled, QPalette::Base, QBrush(backgroundColor)); ++ return palette; ++} ++ ++// Deliver a palette styled according to the current GTK Theme ++const QPalette *QGtk3Storage::palette(QPlatformTheme::Palette type) const ++{ ++ if (type >= QPlatformTheme::NPalettes) ++ return nullptr; ++ ++ if (m_paletteCache[type].has_value()) { ++ qCDebug(lcQGtk3Interface) << "Returning palette from cache:" ++ << QGtk3Json::fromPalette(type); ++ ++ return &m_paletteCache[type].value(); ++ } ++ ++ // Read system palette as a baseline first ++ if (!m_paletteCache[QPlatformTheme::SystemPalette].has_value() && type != QPlatformTheme::SystemPalette) ++ palette(); ++ ++ // Fall back to system palette for unknown types ++ if (!m_palettes.contains(type) && type != QPlatformTheme::SystemPalette) { ++ qCDebug(lcQGtk3Interface) << "Returning system palette for unknown type" ++ << QGtk3Json::fromPalette(type); ++ return palette(); ++ } ++ ++ BrushMap brushes = m_palettes.value(type); ++ ++ // Standard palette is base for system palette. System palette is base for all others. ++ QPalette p = QPalette( type == QPlatformTheme::SystemPalette ? standardPalette() ++ : m_paletteCache[QPlatformTheme::SystemPalette].value()); ++ ++ qCDebug(lcQGtk3Interface) << "Creating palette:" << QGtk3Json::fromPalette(type); ++ for (auto i = brushes.begin(); i != brushes.end(); ++i) { ++ Source source = i.value(); ++ ++ // Brush is set if ++ // - theme and source appearance match ++ // - or either of them is unknown ++ const auto appSource = i.key().appearance; ++ const auto appTheme = appearance(); ++ const bool setBrush = (appSource == appTheme) || ++ (appSource == Qt::Appearance::Unknown) || ++ (appTheme == Qt::Appearance::Unknown); ++ ++ if (setBrush) { ++ p.setBrush(i.key().colorGroup, i.key().colorRole, brush(source, brushes)); ++ } ++ } ++ ++ m_paletteCache[type].emplace(p); ++ if (type == QPlatformTheme::SystemPalette) ++ qCDebug(lcQGtk3Interface) << "System Palette defined" << themeName() << appearance() << p; ++ ++ return &m_paletteCache[type].value(); ++} ++ ++const QFont *QGtk3Storage::font(QPlatformTheme::Font type) const ++{ ++ if (m_fontCache[type].has_value()) ++ return &m_fontCache[type].value(); ++ ++ m_fontCache[type].emplace(m_interface->font(type)); ++ return &m_fontCache[type].value(); ++} ++ ++QPixmap QGtk3Storage::standardPixmap(QPlatformTheme::StandardPixmap standardPixmap, ++ const QSizeF &size) const ++{ ++ if (m_pixmapCache.contains(standardPixmap)) ++ return QPixmap::fromImage(m_pixmapCache.object(standardPixmap)->scaled(size.toSize())); ++ ++ if (!m_interface) ++ return QPixmap(); ++ ++ QImage image = m_interface->standardPixmap(standardPixmap); ++ if (image.isNull()) ++ return QPixmap(); ++ ++ m_pixmapCache.insert(standardPixmap, new QImage(image)); ++ return QPixmap::fromImage(image.scaled(size.toSize())); ++} ++ ++QIcon QGtk3Storage::fileIcon(const QFileInfo &fileInfo) const ++{ ++ return m_interface ? m_interface->fileIcon(fileInfo) : QIcon(); ++} ++ ++void QGtk3Storage::clear() ++{ ++ m_appearance = Qt::Appearance::Unknown; ++ m_palettes.clear(); ++ for (auto &cache : m_paletteCache) ++ cache.reset(); ++ ++ for (auto &cache : m_fontCache) ++ cache.reset(); ++} ++ ++void QGtk3Storage::handleThemeChange() ++{ ++ clear(); ++ populateMap(); ++ QWindowSystemInterface::handleThemeChange(nullptr); ++} ++ ++void QGtk3Storage::populateMap() ++{ ++ static QString m_themeName; ++ ++ // Distiguish initialization, theme change or call without theme change ++ const QString newThemeName = themeName(); ++ if (m_themeName == newThemeName) ++ return; ++ ++ clear(); ++ ++ // Derive appearance from theme name ++ m_appearance = newThemeName.contains("dark", Qt::CaseInsensitive) ++ ? Qt::Appearance::Dark : Qt::Appearance::Light; ++ ++ if (m_themeName.isEmpty()) { ++ qCDebug(lcQGtk3Interface) << "GTK theme initialized:" << newThemeName << m_appearance; ++ } else { ++ qCDebug(lcQGtk3Interface) << "GTK theme changed to:" << newThemeName << m_appearance; ++ } ++ m_themeName = newThemeName; ++ ++ // create standard mapping or load from Json file? ++ const QString jsonInput = qEnvironmentVariable("QT_GUI_GTK_JSON"); ++ if (!jsonInput.isEmpty()) { ++ if (load(jsonInput)) { ++ return; ++ } else { ++ qWarning() << "Falling back to standard GTK mapping."; ++ } ++ } ++ ++ createMapping(); ++ ++ const QString jsonOutput = qEnvironmentVariable("QT_GUI_GTK_JSON_SAVE"); ++ if (!jsonOutput.isEmpty() && !save(jsonOutput)) ++ qWarning() << "File" << jsonOutput << "could not be saved.\n"; ++} ++ ++const QGtk3Storage::PaletteMap QGtk3Storage::savePalettes() const ++{ ++ const QString hard = qEnvironmentVariable("QT_GUI_GTK_JSON_HARDCODED"); ++ if (!hard.contains("true", Qt::CaseInsensitive)) ++ return m_palettes; ++ ++ // Json output is supposed to be readable without GTK connection ++ // convert palette map into hard coded brushes ++ PaletteMap map = m_palettes; ++ for (auto paletteIterator = map.begin(); paletteIterator != map.end(); ++ ++paletteIterator) { ++ QGtk3Storage::BrushMap &bm = paletteIterator.value(); ++ for (auto brushIterator = bm.begin(); brushIterator != bm.end(); ++ ++brushIterator) { ++ QGtk3Storage::Source &s = brushIterator.value(); ++ switch (s.sourceType) { ++ ++ // Read the brush and convert it into a fixed brush ++ case SourceType::Gtk: { ++ const QBrush fixedBrush = brush(s, bm); ++ s.fix.fixedBrush = fixedBrush; ++ s.sourceType = SourceType::Fixed; ++ } ++ break; ++ case SourceType::Fixed: ++ case SourceType::Modified: ++ case SourceType::Invalid: ++ break; ++ } ++ } ++ } ++ return map; ++} ++ ++bool QGtk3Storage::save(const QString &filename, QJsonDocument::JsonFormat f) const ++{ ++ return QGtk3Json::save(savePalettes(), filename, f); ++} ++ ++QJsonDocument QGtk3Storage::save() const ++{ ++ return QGtk3Json::save(savePalettes()); ++} ++ ++bool QGtk3Storage::load(const QString &filename) ++{ ++ return QGtk3Json::load(m_palettes, filename); ++} ++ ++void QGtk3Storage::createMapping() ++{ ++ // Hard code standard mapping ++ BrushMap map; ++ Source source; ++ ++ // Define a GTK source ++#define GTK(wtype, colorSource, state)\ ++ source = Source(QGtk3Interface::QGtkWidget::gtk_ ##wtype,\ ++ QGtk3Interface::QGtkColorSource::colorSource, GTK_STATE_FLAG_ ##state) ++ ++ // Define a modified source ++#define LIGHTER(group, role, lighter)\ ++ source = Source(QPalette::group, QPalette::role,\ ++ Qt::Appearance::Unknown, lighter) ++#define MODIFY(group, role, red, green, blue)\ ++ source = Source(QPalette::group, QPalette::role,\ ++ Qt::Appearance::Unknown, red, green, blue) ++ ++ // Define fixed source ++#define FIX(color) source = FixedSource(color); ++ ++ // Add the source to a target brush ++ // Use default Qt::Appearance::Unknown, if no appearance was specified ++#define ADD_2(group, role) map.insert(TargetBrush(QPalette::group, QPalette::role), source); ++#define ADD_3(group, role, app) map.insert(TargetBrush(QPalette::group, QPalette::role,\ ++ Qt::Appearance::app), source); ++#define ADD_X(x, group, role, app, FUNC, ...) FUNC ++#define ADD(...) ADD_X(,##__VA_ARGS__, ADD_3(__VA_ARGS__), ADD_2(__VA_ARGS__)) ++ // Save target brushes to a palette type ++#define SAVE(palette) m_palettes.insert(QPlatformTheme::palette, map) ++ // Clear brushes to start next palette ++#define CLEAR map.clear() ++ ++ /* ++ * Macro ussage: ++ * ++ * 1. Define a source ++ * ++ * GTK(QGtkWidget, QGtkColorSource, GTK_STATE_FLAG) ++ * Fetch the color from a GtkWidget, related to a source and a state. ++ * ++ * LIGHTER(ColorGroup, ColorROle, lighter) ++ * Use a color of the same QPalette related to ColorGroup and ColorRole. ++ * Make the color lighter (if lighter >100) or darker (if lighter < 100) ++ * ++ * MODIFY(ColorGroup, ColorRole, red, green, blue) ++ * Use a color of the same QPalette related to ColorGroup and ColorRole. ++ * Modify it by adding red, green, blue. ++ * ++ * FIX(const QBrush &) ++ * Use a fixed brush without querying GTK ++ * ++ * 2. Define the target ++ * ++ * Use ADD(ColorGroup, ColorRole) to use the defined source for the ++ * color group / role in the current palette. ++ * ++ * Use ADD(ColorGroup, ColorRole, Appearance) to use the defined source ++ * only for a specific appearance ++ * ++ * 3. Save mapping ++ * Save the defined mappings for a specific palette. ++ * If a mapping entry does not cover all color groups and roles of a palette, ++ * the system palette will be used for the remaining values. ++ * If the system palette does not have all combination of color groups and roles, ++ * the remaining ones will be populated by a hard coded fusion-style like palette. ++ * ++ * 4. Clear mapping ++ * Use CLEAR to clear the mapping and begin a new one. ++ */ ++ ++ ++ // System palette ++ // background color and calculate derivates ++ GTK(Default, Background, INSENSITIVE); ++ ADD(Normal, Window); ++ ADD(Normal, Button); ++ ADD(Normal, Base); ++ ADD(Inactive, Base); ++ ADD(Normal, Window); // redundant ++ ADD(Inactive, Window); ++ LIGHTER(Normal, Window, 125); ++ ADD(Normal, Light); ++ LIGHTER(Normal, Window, 70); ++ ADD(Normal, Shadow); ++ LIGHTER(Normal, Window, 80); ++ ADD(Normal, Dark); ++ GTK(button, Foreground, ACTIVE); ++ ADD(Normal, WindowText); ++ ADD(Inactive, WindowText); ++ LIGHTER(Normal, WindowText, 50); ++ ADD(Disabled, Text); ++ ADD(Disabled, WindowText); ++ //ADD(Normal, ButtonText); ++ ADD(Inactive, ButtonText); ++ GTK(button, Text, NORMAL); ++ ADD(Disabled, ButtonText); ++ // special background colors ++ GTK(Default, Background, SELECTED); ++ ADD(Disabled, Highlight); ++ ADD(Normal, Highlight); ++ GTK(entry, Foreground, SELECTED); ++ ADD(Normal, HighlightedText); ++ GTK(entry, Background, ACTIVE); ++ ADD(Inactive, HighlightedText); ++ // text color and friends ++ GTK(entry, Text, NORMAL); ++ ADD(Normal, ButtonText); ++ ADD(Normal, WindowText); ++ ADD(Disabled, WindowText); ++ ADD(Disabled, HighlightedText); ++ GTK(Default, Text, NORMAL); ++ ADD(Normal, Text); ++ ADD(Inactive, Text); ++ ADD(Normal, HighlightedText); ++ LIGHTER(Normal, Base, 93); ++ ADD(All, AlternateBase); ++ GTK(Default, Foreground, NORMAL); ++ ADD(All, ToolTipText); ++ MODIFY(Normal, Text, 100, 100, 100); ++ ADD(All, PlaceholderText, Light); ++ MODIFY(Normal, Text, -100, -100, -100); ++ ADD(All, PlaceholderText, Dark); ++ SAVE(SystemPalette); ++ CLEAR; ++ ++ // Checkbox and Radio Button ++ GTK(button, Text, ACTIVE); ++ ADD(Normal, Base, Dark); ++ GTK(button, Text, NORMAL); ++ ADD(Normal, Base, Light); ++ SAVE(CheckBoxPalette); ++ SAVE(RadioButtonPalette); ++ CLEAR; ++ ++ // ComboBox, GroupBox, Frame ++ GTK(combo_box, Text, NORMAL); ++ ADD(Normal, ButtonText, Dark); ++ ADD(Normal, Text, Dark); ++ GTK(combo_box, Text, ACTIVE); ++ ADD(Normal, ButtonText, Light); ++ ADD(Normal, Text, Light); ++ SAVE(ComboBoxPalette); ++ SAVE(GroupBoxPalette); ++ CLEAR; ++ ++ // Menu bar ++ GTK(Default, Text, ACTIVE); ++ ADD(Normal, ButtonText); ++ SAVE(MenuPalette); ++ CLEAR; ++ ++ // LineEdit ++ GTK(Default, Background, NORMAL); ++ ADD(All, Base); ++ SAVE(TextLineEditPalette); ++ CLEAR; ++ ++#undef GTK ++#undef REC ++#undef FIX ++#undef ADD ++#undef ADD_2 ++#undef ADD_3 ++#undef ADD_X ++#undef SAVE ++#undef LOAD ++} ++ ++QT_END_NAMESPACE +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage_p.h b/src/plugins/platformthemes/gtk3/qgtk3storage_p.h +new file mode 100644 +index 0000000000..57f6aeea96 +--- /dev/null ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage_p.h +@@ -0,0 +1,234 @@ ++// Copyright (C) 2022 The Qt Company Ltd. ++// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only ++ ++#ifndef QGTK3STORAGE_P_H ++#define QGTK3STORAGE_P_H ++ ++// ++// W A R N I N G ++// ------------- ++// ++// This file is not part of the Qt API. It exists purely as an ++// implementation detail. This header file may change from version to ++// version without notice, or even be removed. ++// ++// We mean it. ++// ++ ++#include "qgtk3interface_p.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++QT_BEGIN_NAMESPACE ++class QGtk3Storage ++{ ++ Q_GADGET ++public: ++ QGtk3Storage(); ++ ++ enum class SourceType { ++ Gtk, ++ Fixed, ++ Modified, ++ Invalid ++ }; ++ Q_ENUM(SourceType) ++ ++ // Standard GTK source: Populate a brush from GTK ++ struct Gtk3Source { ++ QGtk3Interface::QGtkWidget gtkWidgetType; ++ QGtk3Interface::QGtkColorSource source; ++ GtkStateFlags state; ++ int width = -1; ++ int height = -1; ++ QDebug operator<<(QDebug dbg) ++ { ++ return dbg << "QGtkStorage::Gtk3Source(gtkwidgetType=" << gtkWidgetType << ", source=" ++ << source << ", state=" << state << ", width=" << width << ", height=" ++ << height << ")"; ++ } ++ }; ++ ++ // Recursive source: Populate a brush by altering another source ++ struct RecursiveSource { ++ QPalette::ColorGroup colorGroup; ++ QPalette::ColorRole colorRole; ++ Qt::Appearance appearance; ++ int lighter = 100; ++ int deltaRed = 0; ++ int deltaGreen = 0; ++ int deltaBlue = 0; ++ int width = -1; ++ int height = -1; ++ QDebug operator<<(QDebug dbg) ++ { ++ return dbg << "QGtkStorage::RecursiceSource(colorGroup=" << colorGroup << ", colorRole=" ++ << colorRole << ", appearance=" << appearance << ", lighter=" << lighter ++ << ", deltaRed="<< deltaRed << "deltaBlue =" << deltaBlue << "deltaGreen=" ++ << deltaGreen << ", width=" << width << ", height=" << height << ")"; ++ } ++ }; ++ ++ // Fixed source: Populate a brush with fixed values rather than reading GTK ++ struct FixedSource { ++ QBrush fixedBrush; ++ QDebug operator<<(QDebug dbg) ++ { ++ return dbg << "QGtkStorage::FixedSource(" << fixedBrush << ")"; ++ } ++ }; ++ ++ // Data source for brushes ++ struct Source { ++ SourceType sourceType = SourceType::Invalid; ++ Gtk3Source gtk3; ++ RecursiveSource rec; ++ FixedSource fix; ++ ++ // GTK constructor ++ Source(QGtk3Interface::QGtkWidget wtype, QGtk3Interface::QGtkColorSource csource, ++ GtkStateFlags cstate, int bwidth = -1, int bheight = -1) : sourceType(SourceType::Gtk) ++ { ++ gtk3.gtkWidgetType = wtype; ++ gtk3.source = csource; ++ gtk3.state = cstate; ++ gtk3.width = bwidth; ++ gtk3.height = bheight; ++ } ++ ++ // Recursive constructor for darker/lighter colors ++ Source(QPalette::ColorGroup group, QPalette::ColorRole role, ++ Qt::Appearance app, int p_lighter = 100) ++ : sourceType(SourceType::Modified) ++ { ++ rec.colorGroup = group; ++ rec.colorRole = role; ++ rec.appearance = app; ++ rec.lighter = p_lighter; ++ } ++ ++ // Recursive ocnstructor for color modification ++ Source(QPalette::ColorGroup group, QPalette::ColorRole role, ++ Qt::Appearance app, int p_red, int p_green, int p_blue) ++ : sourceType(SourceType::Modified) ++ { ++ rec.colorGroup = group; ++ rec.colorRole = role; ++ rec.appearance = app; ++ rec.deltaRed = p_red; ++ rec.deltaGreen = p_green; ++ rec.deltaBlue = p_blue; ++ } ++ ++ // Recursive constructor for all: color modification and darker/lighter ++ Source(QPalette::ColorGroup group, QPalette::ColorRole role, ++ Qt::Appearance app, int p_lighter, ++ int p_red, int p_green, int p_blue) : sourceType(SourceType::Modified) ++ { ++ rec.colorGroup = group; ++ rec.colorRole = role; ++ rec.appearance = app; ++ rec.lighter = p_lighter; ++ rec.deltaRed = p_red; ++ rec.deltaGreen = p_green; ++ rec.deltaBlue = p_blue; ++ } ++ ++ // Fixed Source constructor ++ Source(const QBrush &brush) : sourceType(SourceType::Fixed) ++ { ++ fix.fixedBrush = brush; ++ }; ++ ++ // Invalid constructor and getter ++ Source() : sourceType(SourceType::Invalid) {}; ++ bool isValid() const { return sourceType != SourceType::Invalid; } ++ ++ // Debug ++ QDebug operator<<(QDebug dbg) ++ { ++ return dbg << "QGtk3Storage::Source(sourceType=" << sourceType << ")"; ++ } ++ }; ++ ++ // Struct with key attributes to identify a brush: color group, color role and appearance ++ struct TargetBrush { ++ QPalette::ColorGroup colorGroup; ++ QPalette::ColorRole colorRole; ++ Qt::Appearance appearance; ++ ++ // Generic constructor ++ TargetBrush(QPalette::ColorGroup group, QPalette::ColorRole role, ++ Qt::Appearance app = Qt::Appearance::Unknown) : ++ colorGroup(group), colorRole(role), appearance(app) {}; ++ ++ // Copy constructor with appearance modifier for dark/light aware search ++ TargetBrush(const TargetBrush &other, Qt::Appearance app) : ++ colorGroup(other.colorGroup), colorRole(other.colorRole), appearance(app) {}; ++ ++ // struct becomes key of a map, so operator< is needed ++ bool operator<(const TargetBrush& other) const { ++ return std::tie(colorGroup, colorRole, appearance) < ++ std::tie(other.colorGroup, other.colorRole, other.appearance); ++ } ++ }; ++ ++ // Mapping a palette's brushes to their GTK sources ++ typedef QFlatMap BrushMap; ++ ++ // Storage of palettes and their GTK sources ++ typedef QFlatMap PaletteMap; ++ ++ // Public getters ++ const QPalette *palette(QPlatformTheme::Palette = QPlatformTheme::SystemPalette) const; ++ QPixmap standardPixmap(QPlatformTheme::StandardPixmap standardPixmap, const QSizeF &size) const; ++ Qt::Appearance appearance() const { return m_appearance; }; ++ static QPalette standardPalette(); ++ const QString themeName() const { return m_interface ? m_interface->themeName() : QString(); }; ++ const QFont *font(QPlatformTheme::Font type) const; ++ QIcon fileIcon(const QFileInfo &fileInfo) const; ++ ++ // Initialization ++ void populateMap(); ++ void handleThemeChange(); ++ ++private: ++ // Storage for palettes and their brushes ++ PaletteMap m_palettes; ++ ++ std::unique_ptr m_interface; ++ ++ ++ Qt::Appearance m_appearance = Qt::Appearance::Unknown; ++ ++ // Caches for Pixmaps, fonts and palettes ++ mutable QCache m_pixmapCache; ++ mutable std::array, QPlatformTheme::Palette::NPalettes> m_paletteCache; ++ mutable std::array, QPlatformTheme::NFonts> m_fontCache; ++ ++ // Search brush with a given GTK3 source ++ QBrush brush(const Source &source, const BrushMap &map) const; ++ ++ // Get GTK3 source for a target brush ++ Source brush (const TargetBrush &brush, const BrushMap &map) const; ++ ++ // clear cache, palettes and appearance ++ void clear(); ++ ++ // Data creation, import & export ++ void createMapping (); ++ const PaletteMap savePalettes() const; ++ bool save(const QString &filename, const QJsonDocument::JsonFormat f = QJsonDocument::Indented) const; ++ QJsonDocument save() const; ++ bool load(const QString &filename); ++}; ++ ++QT_END_NAMESPACE ++#endif // QGTK3STORAGE_H +diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp +index aceacda4b8..ee6e0f3dd9 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp +@@ -135,6 +135,8 @@ QGtk3Theme::QGtk3Theme() + qputenv("XCURSOR_THEME", cursorTheme.toUtf8()); + } + } ++ ++ m_storage.reset(new QGtk3Storage); + } + + static inline QVariant gtkGetLongPressTime() +@@ -235,4 +237,25 @@ bool QGtk3Theme::useNativeFileDialog() + return gtk_check_version(3, 15, 5) == nullptr; + } + ++const QPalette *QGtk3Theme::palette(Palette type) const ++{ ++ return m_storage ? m_storage->palette(type) : QPlatformTheme::palette(type); ++} ++ ++QPixmap QGtk3Theme::standardPixmap(StandardPixmap sp, const QSizeF &size) const ++{ ++ return m_storage ? m_storage->standardPixmap(sp, size) : QPlatformTheme::standardPixmap(sp, size); ++} ++ ++const QFont *QGtk3Theme::font(Font type) const ++{ ++ return m_storage ? m_storage->font(type) : QGnomeTheme::font(type); ++} ++ ++QIcon QGtk3Theme::fileIcon(const QFileInfo &fileInfo, ++ QPlatformTheme::IconOptions iconOptions) const ++{ ++ return m_storage ? m_storage->fileIcon(fileInfo) : QGnomeTheme::fileIcon(fileInfo, iconOptions); ++} ++ + QT_END_NAMESPACE +diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.h b/src/plugins/platformthemes/gtk3/qgtk3theme.h +index 54296d2ff1..99e896c020 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3theme.h ++++ b/src/plugins/platformthemes/gtk3/qgtk3theme.h +@@ -41,6 +41,7 @@ + #define QGTK3THEME_H + + #include ++#include "qgtk3storage_p.h" + + QT_BEGIN_NAMESPACE + +@@ -58,9 +59,16 @@ public: + QPlatformMenu* createPlatformMenu() const override; + QPlatformMenuItem* createPlatformMenuItem() const override; + ++ const QPalette *palette(Palette type = SystemPalette) const override; ++ const QFont *font(Font type = SystemFont) const override; ++ QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override; ++ QIcon fileIcon(const QFileInfo &fileInfo, ++ QPlatformTheme::IconOptions iconOptions = { }) const override; ++ + static const char *name; + private: + static bool useNativeFileDialog(); ++ std::unique_ptr m_storage; + }; + + QT_END_NAMESPACE +-- +2.41.0 + diff --git a/SOURCES/0008-Fix-checkbox-and-radiobutton-background-in-QGtk3Them.patch b/SOURCES/0008-Fix-checkbox-and-radiobutton-background-in-QGtk3Them.patch new file mode 100644 index 0000000..97f5161 --- /dev/null +++ b/SOURCES/0008-Fix-checkbox-and-radiobutton-background-in-QGtk3Them.patch @@ -0,0 +1,48 @@ +From 99fd51406053e789b9e02dd5fdbf63d79cb4d7ff Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 27 Jul 2023 12:36:14 +0200 +Subject: [PATCH 08/15] Fix checkbox and radiobutton background in QGtk3Theme + +The background color for radio buttons and checkboxes was not +correctly read from the current GTK3 theme in light mode. +This has lead to identical colors for indicators and background of +radio buttons and checkboxes for certain GTK themes (e.g. Breeze). + +This patch sets the GTK default foreground color to the base color of +palettes for checkboxes and radio buttons. +--- + src/plugins/platformthemes/gtk3/qgtk3storage.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +index 0a1fa6ef97..d5d0e2c8e6 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +@@ -377,7 +377,6 @@ void QGtk3Storage::createMapping() + ADD(Normal, Button); + ADD(Normal, Base); + ADD(Inactive, Base); +- ADD(Normal, Window); // redundant + ADD(Inactive, Window); + LIGHTER(Normal, Window, 125); + ADD(Normal, Light); +@@ -391,7 +390,6 @@ void QGtk3Storage::createMapping() + LIGHTER(Normal, WindowText, 50); + ADD(Disabled, Text); + ADD(Disabled, WindowText); +- //ADD(Normal, ButtonText); + ADD(Inactive, ButtonText); + GTK(button, Text, NORMAL); + ADD(Disabled, ButtonText); +@@ -427,6 +425,8 @@ void QGtk3Storage::createMapping() + // Checkbox and Radio Button + GTK(button, Text, ACTIVE); + ADD(Normal, Base, Dark); ++ GTK(Default, Background, NORMAL); ++ ADD(All, Base); + GTK(button, Text, NORMAL); + ADD(Normal, Base, Light); + SAVE(CheckBoxPalette); +-- +2.41.0 + diff --git a/SOURCES/0009-Cleanup-QGtk3Theme.patch b/SOURCES/0009-Cleanup-QGtk3Theme.patch new file mode 100644 index 0000000..a88377c --- /dev/null +++ b/SOURCES/0009-Cleanup-QGtk3Theme.patch @@ -0,0 +1,51 @@ +From 41d23f13c9aede66a6c9044869b0ef5f52f7d71d Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 27 Jul 2023 12:38:53 +0200 +Subject: [PATCH 09/15] Cleanup QGtk3Theme + +1. Remove unused include. +2. Replace unnecessary null checks with asserts. +3. Remove dead code after the cleanup. +--- + src/plugins/platformthemes/gtk3/qgtk3theme.cpp | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp +index 5f5fee4f3b..0de9dd3866 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp +@@ -239,23 +239,27 @@ bool QGtk3Theme::useNativeFileDialog() + + const QPalette *QGtk3Theme::palette(Palette type) const + { +- return m_storage ? m_storage->palette(type) : QPlatformTheme::palette(type); ++ Q_ASSERT(m_storage); ++ return m_storage->palette(type); + } + + QPixmap QGtk3Theme::standardPixmap(StandardPixmap sp, const QSizeF &size) const + { +- return m_storage ? m_storage->standardPixmap(sp, size) : QPlatformTheme::standardPixmap(sp, size); ++ Q_ASSERT(m_storage); ++ return m_storage->standardPixmap(sp, size); + } + + const QFont *QGtk3Theme::font(Font type) const + { +- return m_storage ? m_storage->font(type) : QGnomeTheme::font(type); ++ Q_ASSERT(m_storage); ++ return m_storage->font(type); + } + + QIcon QGtk3Theme::fileIcon(const QFileInfo &fileInfo, + QPlatformTheme::IconOptions iconOptions) const + { +- return m_storage ? m_storage->fileIcon(fileInfo) : QGnomeTheme::fileIcon(fileInfo, iconOptions); ++ Q_ASSERT(m_storage); ++ return m_storage->fileIcon(fileInfo); + } + + QT_END_NAMESPACE +-- +2.41.0 + diff --git a/SOURCES/0010-Detect-appearance-by-colors-unless-GTK-theme-name-co.patch b/SOURCES/0010-Detect-appearance-by-colors-unless-GTK-theme-name-co.patch new file mode 100644 index 0000000..06a158e --- /dev/null +++ b/SOURCES/0010-Detect-appearance-by-colors-unless-GTK-theme-name-co.patch @@ -0,0 +1,85 @@ +From f0117fa2110e8b6d71c82272fda1d264e7921a24 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 27 Jul 2023 12:40:32 +0200 +Subject: [PATCH 10/15] Detect appearance by colors unless GTK theme name + contains "dark" + +QGtk3Theme detects the appearance property by theme name: If the name +contains the keyword "dark", the theme is considered to be dark and +otherwise light. + +This detection logic fails, when the GTK theme is dark without +containing the "dark" keyword, e.g. the dark theme "Adapta-Nokto". +While QGtk3Theme imports the right colors in that case, it wrongly +identifies a light theme. + +This patch adapts the detection logic: If the theme name contains the +"dark" keyword, it is considered a dark theme without further checks. +If it doesn't, the current GTK3 theme's default background and +foreground colors will be read. If the foreground is lighter than the +background, the theme is considered dark. If the background is lighter +than the foreground, the theme is considered light. If both colors are +identical, the appearance will be Qt::Appearance::Unknown. +--- + .../platformthemes/gtk3/qgtk3interface.cpp | 16 ++++++++++++++++ + .../platformthemes/gtk3/qgtk3interface_p.h | 3 +++ + src/plugins/platformthemes/gtk3/qgtk3storage.cpp | 2 +- + 3 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3interface.cpp b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +index d932b250a5..e2444197da 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3interface.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +@@ -400,6 +400,22 @@ const QString QGtk3Interface::themeName() const + return QLatin1String(theme_name); + } + ++Qt::Appearance QGtk3Interface::appearanceByColors() const ++{ ++ const QColor background = color(widget(QGtkWidget::gtk_Default), ++ QGtkColorSource::Background, ++ GTK_STATE_FLAG_ACTIVE); ++ const QColor foreground = color(widget(QGtkWidget::gtk_Default), ++ QGtkColorSource::Foreground, ++ GTK_STATE_FLAG_ACTIVE); ++ ++ if (foreground.lightness() > background.lightness()) ++ return Qt::Appearance::Dark; ++ if (foreground.lightness() < background.lightness()) ++ return Qt::Appearance::Light; ++ return Qt::Appearance::Unknown; ++} ++ + inline constexpr QGtk3Interface::QGtkWidget QGtk3Interface::toWidgetType(QPlatformTheme::Font type) + { + switch (type) { +diff --git a/src/plugins/platformthemes/gtk3/qgtk3interface_p.h b/src/plugins/platformthemes/gtk3/qgtk3interface_p.h +index 8997a64e76..e04025923d 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3interface_p.h ++++ b/src/plugins/platformthemes/gtk3/qgtk3interface_p.h +@@ -97,6 +97,9 @@ public: + // Return current GTK theme name + const QString themeName() const; + ++ // Derive appearance from default colors ++ Qt::Appearance appearanceByColors() const; ++ + // Convert GTK state to/from string + static int toGtkState(const QString &state); + static const QLatin1String fromGtkState(GtkStateFlags state); +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +index d5d0e2c8e6..0b6b8e8523 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +@@ -222,7 +222,7 @@ void QGtk3Storage::populateMap() + + // Derive appearance from theme name + m_appearance = newThemeName.contains("dark", Qt::CaseInsensitive) +- ? Qt::Appearance::Dark : Qt::Appearance::Light; ++ ? Qt::Appearance::Dark : m_interface->appearanceByColors(); + + if (m_themeName.isEmpty()) { + qCDebug(lcQGtk3Interface) << "GTK theme initialized:" << newThemeName << m_appearance; +-- +2.41.0 + diff --git a/SOURCES/0011-Change-parsing-log-output-in-QGtk3Json-from-qCDebug-.patch b/SOURCES/0011-Change-parsing-log-output-in-QGtk3Json-from-qCDebug-.patch new file mode 100644 index 0000000..74ded40 --- /dev/null +++ b/SOURCES/0011-Change-parsing-log-output-in-QGtk3Json-from-qCDebug-.patch @@ -0,0 +1,120 @@ +From 85d72b8bf0db7349dafce252d18ce17677eef46e Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 27 Jul 2023 12:41:06 +0200 +Subject: [PATCH 11/15] Change parsing log output in QGtk3Json from qCDebug to + qCInfo + +When a palette mapping is imported from a Json file, parsing errors are +logged with qCDebug. This prevents errors from being logged in release +builds. + +This patch replaces qCDebug with qCInfo for Json parsing to make errors +visible when the logging category qt.qpa.gtk is activated. +--- + src/plugins/platformthemes/gtk3/qgtk3json.cpp | 23 +++++++++---------- + 1 file changed, 11 insertions(+), 12 deletions(-) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3json.cpp b/src/plugins/platformthemes/gtk3/qgtk3json.cpp +index f4d5b50ec5..9db1ea3d20 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3json.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3json.cpp +@@ -331,7 +331,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + { + #define GETSTR(obj, key)\ + if (!obj.contains(key)) {\ +- qCDebug(lcQGtk3Interface) << key << "missing for palette" << paletteName\ ++ qCInfo(lcQGtk3Interface) << key << "missing for palette" << paletteName\ + << ", Brush" << colorRoleName;\ + return false;\ + }\ +@@ -339,7 +339,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + + #define GETINT(obj, key, var) GETSTR(obj, key);\ + if (!obj[key].isDouble()) {\ +- qCDebug(lcQGtk3Interface) << key << "type mismatch" << value\ ++ qCInfo(lcQGtk3Interface) << key << "type mismatch" << value\ + << "is not an integer!"\ + << "(Palette" << paletteName << "), Brush" << colorRoleName;\ + return false;\ +@@ -349,7 +349,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + map.clear(); + const QJsonObject top(doc.object()); + if (doc.isEmpty() || top.isEmpty() || !top.contains(cePalettes)) { +- qCDebug(lcQGtk3Interface) << "Document does not contain Palettes."; ++ qCInfo(lcQGtk3Interface) << "Document does not contain Palettes."; + return false; + } + +@@ -358,13 +358,12 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + bool ok; + const QPlatformTheme::Palette paletteType = toPalette(paletteName); + if (paletteType == QPlatformTheme::NPalettes) { +- qCDebug(lcQGtk3Interface) << "Invalid Palette name:" << paletteName; +- return false; ++ qCInfo(lcQGtk3Interface) << "Invalid Palette name:" << paletteName; + } + const QJsonObject &paletteObject = top[cePalettes][paletteName].toObject(); + const QStringList &brushList = paletteObject.keys(); + if (brushList.isEmpty()) { +- qCDebug(lcQGtk3Interface) << "Palette" << paletteName << "does not contain brushes"; ++ qCInfo(lcQGtk3Interface) << "Palette" << paletteName << "does not contain brushes"; + return false; + } + +@@ -374,7 +373,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + const int intVal = QMetaEnum::fromType().keyToValue(colorRoleName + .toLatin1().constData(), &ok); + if (!ok) { +- qCDebug(lcQGtk3Interface) << "Palette" << paletteName ++ qCInfo(lcQGtk3Interface) << "Palette" << paletteName + << "contains invalid color role" << colorRoleName; + return false; + } +@@ -383,7 +382,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + for (int brushIndex = 0; brushIndex < brushArray.size(); ++brushIndex) { + const QJsonObject brushObject = brushArray.at(brushIndex).toObject(); + if (brushObject.isEmpty()) { +- qCDebug(lcQGtk3Interface) << "Brush specification missing at for palette" ++ qCInfo(lcQGtk3Interface) << "Brush specification missing at for palette" + << paletteName << ", Brush" << colorRoleName; + return false; + } +@@ -399,7 +398,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + QGtk3Storage::Source s; + + if (!brushObject.contains(ceData) || !brushObject[ceData].isObject()) { +- qCDebug(lcQGtk3Interface) << "Source specification missing for palette" << paletteName ++ qCInfo(lcQGtk3Interface) << "Source specification missing for palette" << paletteName + << "Brush" << colorRoleName; + return false; + } +@@ -421,7 +420,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + + case QGtk3Storage::SourceType::Fixed: { + if (!sourceObject.contains(ceBrush)) { +- qCDebug(lcQGtk3Interface) << "Fixed brush specification missing for palette" << paletteName ++ qCInfo(lcQGtk3Interface) << "Fixed brush specification missing for palette" << paletteName + << "Brush" << colorRoleName; + return false; + } +@@ -431,7 +430,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + GETSTR(fixedSource, ceColor); + const QColor color(value); + if (!color.isValid()) { +- qCDebug(lcQGtk3Interface) << "Color" << value << "can't be parsed for:" << paletteName ++ qCInfo(lcQGtk3Interface) << "Color" << value << "can't be parsed for:" << paletteName + << "Brush" << colorRoleName; + return false; + } +@@ -459,7 +458,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc) + break; + + case QGtk3Storage::SourceType::Invalid: +- qCDebug(lcQGtk3Interface) << "Invalid source type for palette" << paletteName ++ qInfo(lcQGtk3Interface) << "Invalid source type for palette" << paletteName + << "Brush." << colorRoleName; + return false; + } +-- +2.41.0 + diff --git a/SOURCES/0012-Document-QGtk3Interface.patch b/SOURCES/0012-Document-QGtk3Interface.patch new file mode 100644 index 0000000..566ffc4 --- /dev/null +++ b/SOURCES/0012-Document-QGtk3Interface.patch @@ -0,0 +1,400 @@ +From a2c6ba19ea2aafd1ec92fdd150ac14fe2424a394 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 27 Jul 2023 12:42:04 +0200 +Subject: [PATCH 12/15] Document QGtk3Interface + +Add internal documentation to header and implementation of +QGtk3Interface +--- + .../platformthemes/gtk3/qgtk3interface.cpp | 161 ++++++++++++++++-- + .../platformthemes/gtk3/qgtk3interface_p.h | 43 ++++- + 2 files changed, 183 insertions(+), 21 deletions(-) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3interface.cpp b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +index e2444197da..0fab1220b4 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3interface.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +@@ -65,6 +65,14 @@ QGtk3Interface::~QGtk3Interface() + gtk_widget_destroy(v.second); + } + ++/*! ++ \internal ++ \brief Converts a string into the GtkStateFlags enum. ++ ++ Converts a string formatted GTK color \param state into an enum value. ++ Returns an integer corresponding to GtkStateFlags. ++ Returns -1 if \param state does not correspond to a valid enum key. ++ */ + int QGtk3Interface::toGtkState(const QString &state) + { + #define CASE(x) \ +@@ -92,6 +100,10 @@ int QGtk3Interface::toGtkState(const QString &state) + #undef CASE + } + ++/*! ++ \internal ++ \brief Returns \param state converted into a string. ++ */ + const QLatin1String QGtk3Interface::fromGtkState(GtkStateFlags state) + { + #define CASE(x) case GTK_STATE_FLAG_ ##x: return QLatin1String(#x) +@@ -103,9 +115,12 @@ const QLatin1String QGtk3Interface::fromGtkState(GtkStateFlags state) + #undef CONVERT + } + ++/*! ++ \internal ++ \brief Populates the internal map used to find a GTK color's source and fallback generic color. ++ */ + void QGtk3Interface::initColorMap() + { +- // Populate map with default values + #define SAVE(src, state, prop, def)\ + {ColorKey({QGtkColorSource::src, GTK_STATE_FLAG_ ##state}), ColorValue({#prop, QGtkColorDefault::def})} + +@@ -132,8 +147,17 @@ void QGtk3Interface::initColorMap() + qCDebug(lcQGtk3Interface) << "Color map populated from defaults."; + } + +-// Return an image rather than an icon or a pixmap: +-// Image can be cached and re-scaled to different sizes if requested multiple times ++/*! ++ \internal ++ \brief Returns a QImage corresponding to \param standardPixmap. ++ ++ A QImage (not a QPixmap) is returned so it can be cached and re-scaled in case the pixmap is ++ requested multiple times with different resolutions. ++ ++ \note Rather than defaulting to a QImage(), all QPlatformTheme::StandardPixmap enum values have ++ been mentioned explicitly. ++ That way they can be covered more easily in case additional icons are provided by GTK. ++ */ + QImage QGtk3Interface::standardPixmap(QPlatformTheme::StandardPixmap standardPixmap) const + { + switch (standardPixmap) { +@@ -235,6 +259,10 @@ QImage QGtk3Interface::standardPixmap(QPlatformTheme::StandardPixmap standardPix + Q_UNREACHABLE(); + } + ++/*! ++ \internal ++ \brief Returns a QImage for a given GTK \param iconName. ++ */ + QImage QGtk3Interface::qt_gtk_get_icon(const char* iconName) const + { + GtkIconSet* iconSet = gtk_icon_factory_lookup_default (iconName); +@@ -242,14 +270,23 @@ QImage QGtk3Interface::qt_gtk_get_icon(const char* iconName) const + return qt_convert_gdk_pixbuf(icon); + } + ++/*! ++ \internal ++ \brief Returns a QImage converted from the GDK pixel buffer \param buf. ++ ++ The ability to convert GdkPixbuf to QImage relies on the following assumptions: ++ \list ++ \li QImage uses uchar as a data container (unasserted) ++ \li the types guint8 and uchar are identical (statically asserted) ++ \li GDK pixel buffer uses 8 bits per sample (assumed at runtime) ++ \li GDK pixel buffer has 4 channels (assumed at runtime) ++ \endlist ++ */ + QImage QGtk3Interface::qt_convert_gdk_pixbuf(GdkPixbuf *buf) const + { + if (!buf) + return QImage(); + +- // Ability to convert GdkPixbuf to QImage relies on the assumptions, that +- // - QImage uses uchar as a data container +- // - the types guint8 and uchar are identical + const guint8 *gdata = gdk_pixbuf_read_pixels(buf); + static_assert(std::is_same::value, + "guint8 has diverted from uchar. Code needs fixing."); +@@ -264,6 +301,13 @@ QImage QGtk3Interface::qt_convert_gdk_pixbuf(GdkPixbuf *buf) const + return converted.copy(); // detatch to survive lifetime of buf + } + ++/*! ++ \internal ++ \brief Instantiate a new GTK widget. ++ ++ Returns a pointer to a new GTK widget of \param type, allocated on the heap. ++ Returns nullptr of gtk_Default has is passed. ++ */ + GtkWidget *QGtk3Interface::qt_new_gtkWidget(QGtkWidget type) const + { + #define CASE(Type)\ +@@ -298,6 +342,14 @@ GtkWidget *QGtk3Interface::qt_new_gtkWidget(QGtkWidget type) const + Q_UNREACHABLE(); + } + ++/*! ++ \internal ++ \brief Read a GTK widget's color from a generic color getter. ++ ++ This method returns a generic color of \param con, a given GTK style context. ++ The requested color is defined by \param def and the GTK color-state \param state. ++ The return type is GDK color in RGBA format. ++ */ + GdkRGBA QGtk3Interface::genericColor(GtkStyleContext *con, GtkStateFlags state, QGtkColorDefault def) const + { + GdkRGBA color; +@@ -316,9 +368,16 @@ GdkRGBA QGtk3Interface::genericColor(GtkStyleContext *con, GtkStateFlags state, + #undef CASE + } + +-// Deliver a QColor from a GTK widget, a source type and a GTK widget state +-// Fall back to the generic color getter of source/state if the property name does not exist +-// Fall back to a hard coded generic color getter of source/state are not mapped ++/*! ++ \internal ++ \brief Read a GTK widget's color from a property. ++ ++ Returns a color of GTK-widget \param widget, defined by \param source and \param state. ++ The return type is GDK color in RGBA format. ++ ++ \note If no corresponding property can be found for \param source, the method falls back to a ++ suitable generic color. ++ */ + QColor QGtk3Interface::color(GtkWidget *widget, QGtkColorSource source, GtkStateFlags state) const + { + GdkRGBA col; +@@ -355,7 +414,15 @@ QColor QGtk3Interface::color(GtkWidget *widget, QGtkColorSource source, GtkState + #undef CASE + } + +-// Deliver a widget pointer ++/*! ++ \internal ++ \brief Get pointer to a GTK widget by \param type. ++ ++ Returns the pointer to a GTK widget, specified by \param type. ++ GTK widgets are cached, so that only one instance of each type is created. ++ \note ++ The method returns nullptr for the enum value gtk_Default. ++ */ + GtkWidget *QGtk3Interface::widget(QGtkWidget type) const + { + if (type == QGtkWidget::gtk_Default) +@@ -371,7 +438,14 @@ GtkWidget *QGtk3Interface::widget(QGtkWidget type) const + return w; + } + +-// Return widget syle context or default style ++/*! ++ \internal ++ \brief Access a GTK widget's style context. ++ ++ Returns the pointer to the style context of GTK widget \param w. ++ ++ \note If \param w is nullptr, the GTK default style context (entry style) is returned. ++ */ + GtkStyleContext *QGtk3Interface::context(GtkWidget *w) const + { + if (w) +@@ -380,15 +454,28 @@ GtkStyleContext *QGtk3Interface::context(GtkWidget *w) const + return gtk_widget_get_style_context(widget(QGtkWidget::gtk_entry)); + } + +-// FIXME +-// Brush assets (e.g. 9-patches) can't be accessed by the GTK API. +-// => brush height and width from GTK will be ignored for the time being, +-// because it is unknown if they relate to a plain brush or an image brush. ++/*! ++ \internal ++ \brief Create a QBrush from a GTK widget. ++ ++ Returns a QBrush corresponding to GTK widget type \param wtype, \param source and \param state. ++ ++ Brush height and width is ignored in GTK3, because brush assets (e.g. 9-patches) ++ can't be accessed by the GTK3 API. It's therefore unknown, if the brush relates only to colors, ++ or to a pixmap based style. ++ ++ */ + QBrush QGtk3Interface::brush(QGtkWidget wtype, QGtkColorSource source, GtkStateFlags state) const + { ++ // FIXME: When a color's pixmap can be accessed via the GTK API, ++ // read it and set it in the brush. + return QBrush(color(widget(wtype), source, state)); + } + ++/*! ++ \internal ++ \brief Returns the name of the current GTK theme. ++ */ + const QString QGtk3Interface::themeName() const + { + gchar *theme_name; +@@ -400,6 +487,15 @@ const QString QGtk3Interface::themeName() const + return QLatin1String(theme_name); + } + ++/*! ++ \internal ++ \brief Determine appearance by colors. ++ ++ Returns the appearance of the current GTK theme, heuristically determined by the ++ lightness difference between default background and foreground colors. ++ ++ \note Returns Unknown in the unlikely case that both colors have the same lightness. ++ */ + Qt::Appearance QGtk3Interface::appearanceByColors() const + { + const QColor background = color(widget(QGtkWidget::gtk_Default), +@@ -416,6 +512,12 @@ Qt::Appearance QGtk3Interface::appearanceByColors() const + return Qt::Appearance::Unknown; + } + ++/*! ++ \internal ++ \brief Map font type to GTK widget type. ++ ++ Returns the GTK widget type corresponding to the given QPlatformTheme::Font \param type. ++ */ + inline constexpr QGtk3Interface::QGtkWidget QGtk3Interface::toWidgetType(QPlatformTheme::Font type) + { + switch (type) { +@@ -451,6 +553,10 @@ inline constexpr QGtk3Interface::QGtkWidget QGtk3Interface::toWidgetType(QPlatfo + Q_UNREACHABLE(); + } + ++/*! ++ \internal ++ \brief Convert pango \param style to QFont::Style. ++ */ + inline constexpr QFont::Style QGtk3Interface::toFontStyle(PangoStyle style) + { + switch (style) { +@@ -462,6 +568,13 @@ inline constexpr QFont::Style QGtk3Interface::toFontStyle(PangoStyle style) + Q_UNREACHABLE(); + } + ++/*! ++ \internal ++ \brief Convert pango font \param weight to an int, representing font weight in Qt. ++ ++ Compatibility of PangoWeight is statically asserted. ++ The minimum (1) and maximum (1000) weight in Qt is respeced. ++ */ + inline constexpr int QGtk3Interface::toFontWeight(PangoWeight weight) + { + // GTK PangoWeight can be directly converted to QFont::Weight +@@ -494,6 +607,17 @@ inline constexpr QFont::Weight QGtk3Interface::toQFontWeight(int weight) + return QFont::Black; + } + ++/*! ++ \internal ++ \brief Return a GTK styled font. ++ ++ Returns the QFont corresponding to \param type by reading the corresponding ++ GTK widget type's font. ++ ++ \note GTK allows to specify a non fixed font as the system's fixed font. ++ If a fixed font is requested, the method fixes the pitch and falls back to monospace, ++ unless a suitable fixed pitch font is found. ++ */ + QFont QGtk3Interface::font(QPlatformTheme::Font type) const + { + GtkStyleContext *con = context(widget(toWidgetType(type))); +@@ -517,9 +641,6 @@ QFont QGtk3Interface::font(QPlatformTheme::Font type) const + font.setPointSizeF(static_cast(pango_font_description_get_size(gtkFont)/PANGO_SCALE)); + font.setStyle(toFontStyle(pango_font_description_get_style(gtkFont))); + +- // fix pixel pitch if fixed font is requested +- // NOTE: GTK allows to specify a non fixed font as the system's fixed font. +- // => the returned font may still not be a fixed font. + if (type == QPlatformTheme::FixedFont) { + font.setFixedPitch(true); + if (!QFontInfo(font).fixedPitch()) { +@@ -532,6 +653,10 @@ QFont QGtk3Interface::font(QPlatformTheme::Font type) const + return font; + } + ++/*! ++ \internal ++ \brief Returns a GTK styled file icon for \param fileInfo. ++ */ + QIcon QGtk3Interface::fileIcon(const QFileInfo &fileInfo) const + { + GFile *file = g_file_new_for_path(fileInfo.absoluteFilePath().toLatin1().constData()); +diff --git a/src/plugins/platformthemes/gtk3/qgtk3interface_p.h b/src/plugins/platformthemes/gtk3/qgtk3interface_p.h +index e04025923d..42643e72ef 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3interface_p.h ++++ b/src/plugins/platformthemes/gtk3/qgtk3interface_p.h +@@ -36,6 +36,18 @@ QT_BEGIN_NAMESPACE + Q_DECLARE_LOGGING_CATEGORY(lcQGtk3Interface); + + class QGtk3Storage; ++ ++/*! ++ \internal ++ \brief The QGtk3Interface class centralizes communication with the GTK3 library. ++ ++ By encapsulating all GTK version specific syntax and conversions, it makes Qt's GTK theme ++ independent from GTK versions. ++ ++ \note ++ Including GTK3 headers requires #undef signals, which disables Qt signal/slot handling. ++ */ ++ + class QGtk3Interface + { + Q_GADGET +@@ -43,7 +55,13 @@ public: + QGtk3Interface(QGtk3Storage *); + ~QGtk3Interface(); + +- // Enum representing GTK widget types ++ /*! ++ * \internal ++ \enum QGtk3Interface::QGtkWidget ++ \brief Represents GTK widget types used to obtain color information. ++ ++ \note The enum value gtk_Default refers to the GTK default style, rather than to a specific widget. ++ */ + enum class QGtkWidget { + gtk_menu_bar, + gtk_menu, +@@ -68,7 +86,15 @@ public: + }; + Q_ENUM(QGtkWidget) + +- // Enum representing color sources of a GTK theme ++ /*! ++ \internal ++ \enum QGtk3Interface::QGtkColorSource ++ \brief The QGtkColorSource enum represents the source of a color within a GTK widgets style context. ++ ++ If the current GTK theme provides such a color for a given widget, the color can be read ++ from the style context by passing the enum's key as a property name to the GTK method ++ gtk_style_context_lookup_color. The method will return false, if no color has been found. ++ */ + enum class QGtkColorSource { + Foreground, + Background, +@@ -78,7 +104,18 @@ public: + }; + Q_ENUM(QGtkColorSource) + +- // Enum for default color getter ++ /*! ++ \internal ++ \enum QGtk3Interface::QGtkColorDefault ++ \brief The QGtkColorDefault enum represents generic GTK colors. ++ ++ The GTK3 methods gtk_style_context_get_color, gtk_style_context_get_background_color, and ++ gtk_style_context_get_foreground_color always return the respective colors with a widget's ++ style context. Unless set as a property by the current GTK theme, GTK's default colors will ++ be returned. ++ These generic default colors, represented by the GtkColorDefault enum, are used as a ++ back, if a specific color property is requested but not defined in the current GTK theme. ++ */ + enum class QGtkColorDefault { + Foreground, + Background, +-- +2.41.0 + diff --git a/SOURCES/0013-Document-QGtk3Storage.patch b/SOURCES/0013-Document-QGtk3Storage.patch new file mode 100644 index 0000000..a1d4bec --- /dev/null +++ b/SOURCES/0013-Document-QGtk3Storage.patch @@ -0,0 +1,366 @@ +From f5e74db1b5245814d5993b6b16d58274ca8b89ab Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 27 Jul 2023 12:42:49 +0200 +Subject: [PATCH 13/15] Document QGtk3Storage + +Add internal documentation to header and implementation of +QGtk3Storage +--- + .../platformthemes/gtk3/qgtk3storage.cpp | 231 +++++++++++++++--- + .../platformthemes/gtk3/qgtk3storage_p.h | 1 + + 2 files changed, 193 insertions(+), 39 deletions(-) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +index 0b6b8e8523..7775ac66e4 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +@@ -24,7 +24,26 @@ QGtk3Storage::QGtk3Storage() + populateMap(); + } + +-// Set a brush from a source and resolve recursions ++/*! ++ \internal ++ \enum QGtk3Storage::SourceType ++ \brief This enum represents the type of a color source. ++ ++ \value Gtk Color is read from a GTK widget ++ \value Fixed A fixed brush is specified ++ \value Modified The color is a modification of another color (fixed or read from GTK) ++ \omitvalue Invalid ++ */ ++ ++/*! ++ \internal ++ \brief Find a brush from a source. ++ ++ Returns a QBrush from a given \param source and a \param map of available brushes ++ to search from. ++ ++ A null QBrush is returned, if no brush corresponding to the source has been found. ++ */ + QBrush QGtk3Storage::brush(const Source &source, const BrushMap &map) const + { + switch (source.sourceType) { +@@ -64,7 +83,14 @@ QBrush QGtk3Storage::brush(const Source &source, const BrushMap &map) const + Q_UNREACHABLE(); + } + +-// Find source for a recursion and take dark/light/unknown into consideration ++/*! ++ \internal ++ \brief Recurse to find a source brush for modification. ++ ++ Returns the source specified by the target brush \param b in the \param map of brushes. ++ Takes dark/light/unknown into consideration. ++ Returns an empty brush if no suitable one can be found. ++ */ + QGtk3Storage::Source QGtk3Storage::brush(const TargetBrush &b, const BrushMap &map) const + { + #define FIND(brush) if (map.contains(brush))\ +@@ -88,7 +114,16 @@ QGtk3Storage::Source QGtk3Storage::brush(const TargetBrush &b, const BrushMap &m + #undef FIND + } + +-// Create a simple standard palette ++/*! ++ \internal ++ \brief Returns a simple, hard coded base palette. ++ ++ Create a hard coded palette with default colors as a fallback for any color that can't be ++ obtained from GTK. ++ ++ \note This palette will be used as a default baseline for the system palette, which then ++ will be used as a default baseline for any other palette type. ++ */ + QPalette QGtk3Storage::standardPalette() + { + QColor backgroundColor(0xd4, 0xd0, 0xc8); +@@ -105,7 +140,13 @@ QPalette QGtk3Storage::standardPalette() + return palette; + } + +-// Deliver a palette styled according to the current GTK Theme ++/*! ++ \internal ++ \brief Return a GTK styled QPalette. ++ ++ Returns the pointer to a (cached) QPalette for \param type, with its brushes ++ populated according to the current GTK theme. ++ */ + const QPalette *QGtk3Storage::palette(QPlatformTheme::Palette type) const + { + if (type >= QPlatformTheme::NPalettes) +@@ -160,6 +201,12 @@ const QPalette *QGtk3Storage::palette(QPlatformTheme::Palette type) const + return &m_paletteCache[type].value(); + } + ++/*! ++ \internal ++ \brief Return a GTK styled font. ++ ++ Returns a QFont of \param type, styled according to the current GTK theme. ++*/ + const QFont *QGtk3Storage::font(QPlatformTheme::Font type) const + { + if (m_fontCache[type].has_value()) +@@ -169,6 +216,13 @@ const QFont *QGtk3Storage::font(QPlatformTheme::Font type) const + return &m_fontCache[type].value(); + } + ++/*! ++ \internal ++ \brief Return a GTK styled standard pixmap if available. ++ ++ Returns a pixmap specified by \param standardPixmap and \param size. ++ Returns an empty pixmap if GTK doesn't support the requested one. ++ */ + QPixmap QGtk3Storage::standardPixmap(QPlatformTheme::StandardPixmap standardPixmap, + const QSizeF &size) const + { +@@ -186,11 +240,19 @@ QPixmap QGtk3Storage::standardPixmap(QPlatformTheme::StandardPixmap standardPixm + return QPixmap::fromImage(image.scaled(size.toSize())); + } + ++/*! ++ \internal ++ \brief Returns a GTK styled file icon corresponding to \param fileInfo. ++ */ + QIcon QGtk3Storage::fileIcon(const QFileInfo &fileInfo) const + { + return m_interface ? m_interface->fileIcon(fileInfo) : QIcon(); + } + ++/*! ++ \internal ++ \brief Clears all caches. ++ */ + void QGtk3Storage::clear() + { + m_appearance = Qt::Appearance::Unknown; +@@ -202,6 +264,13 @@ void QGtk3Storage::clear() + cache.reset(); + } + ++/*! ++ \internal ++ \brief Handles a theme change at runtime. ++ ++ Clear all caches, re-populate with current GTK theme and notify the window system interface. ++ This method is a callback for the theme change signal sent from GTK. ++ */ + void QGtk3Storage::handleThemeChange() + { + clear(); +@@ -209,6 +278,54 @@ void QGtk3Storage::handleThemeChange() + QWindowSystemInterface::handleThemeChange(nullptr); + } + ++/*! ++ \internal ++ \brief Populates a map with information about how to locate colors in GTK. ++ ++ This method creates a data structure to locate color information for each brush of a QPalette ++ within GTK. The structure can hold mapping information for each QPlatformTheme::Palette ++ enum value. If no specific mapping is stored for an enum value, the system palette is returned ++ instead of a specific one. If no mapping is stored for the system palette, it will fall back to ++ QGtk3Storage::standardPalette. ++ ++ The method will populate the data structure with a standard mapping, covering the following ++ palette types: ++ \list ++ \li QPlatformTheme::SystemPalette ++ \li QPlatformTheme::CheckBoxPalette ++ \li QPlatformTheme::RadioButtonPalette ++ \li QPlatformTheme::ComboBoxPalette ++ \li QPlatformTheme::GroupBoxPalette ++ \li QPlatformTheme::MenuPalette ++ \li QPlatformTheme::TextLineEditPalette ++ \endlist ++ ++ The method will check the environment variable {{QT_GUI_GTK_JSON_SAVE}}. If it points to a ++ valid path with write access, it will write the standard mapping into a Json file. ++ That Json file can be modified and/or extended. ++ The Json syntax is ++ - "QGtk3Palettes" (top level value) ++ - QPlatformTheme::Palette ++ - QPalette::ColorRole ++ - Qt::Appearance ++ - Qt::ColorGroup ++ - Source data ++ - Source Type ++ - [source data] ++ ++ If the environment variable {{QT_GUI_GTK_JSON_HARDCODED}} contains the keyword \c true, ++ all sources are converted to fixed sources. In that case, they contain the hard coded HexRGBA ++ values read from GTK. ++ ++ The method will also check the environment variable {{QT_GUI_GTK_JSON}}. If it points to a valid ++ Json file with read access, it will be parsed instead of creating a standard mapping. ++ Parsing errors will be printed out with qCInfo if the logging category {{qt.qpa.gtk}} is activated. ++ In case of a parsing error, the method will fall back to creating a standard mapping. ++ ++ \note ++ If a Json file contains only fixed brushes (e.g. exported with {{QT_GUI_GTK_JSON_HARDCODED=true}}), ++ no colors will be imported from GTK. ++ */ + void QGtk3Storage::populateMap() + { + static QString m_themeName; +@@ -248,6 +365,15 @@ void QGtk3Storage::populateMap() + qWarning() << "File" << jsonOutput << "could not be saved.\n"; + } + ++/*! ++ \internal ++ \brief Return a palette map for saving. ++ ++ This method returns the existing palette map, if the environment variable ++ {{QT_GUI_GTK_JSON_HARDCODED}} is not set or does not contain the keyword \c true. ++ If it contains the keyword \c true, it returns a palette map with all brush ++ sources converted to fixed sources. ++ */ + const QGtk3Storage::PaletteMap QGtk3Storage::savePalettes() const + { + const QString hard = qEnvironmentVariable("QT_GUI_GTK_JSON_HARDCODED"); +@@ -282,21 +408,50 @@ const QGtk3Storage::PaletteMap QGtk3Storage::savePalettes() const + return map; + } + ++/*! ++ \internal ++ \brief Saves current palette mapping to a \param filename with Json format \param f. ++ ++ Saves the current palette mapping into a QJson file, ++ taking {{QT_GUI_GTK_JSON_HARDCODED}} into consideration. ++ Returns \c true if saving was successful and \c false otherwise. ++ */ + bool QGtk3Storage::save(const QString &filename, QJsonDocument::JsonFormat f) const + { + return QGtk3Json::save(savePalettes(), filename, f); + } + ++/*! ++ \internal ++ \brief Returns a QJsonDocument with current palette mapping. ++ ++ Saves the current palette mapping into a QJsonDocument, ++ taking {{QT_GUI_GTK_JSON_HARDCODED}} into consideration. ++ Returns \c true if saving was successful and \c false otherwise. ++ */ + QJsonDocument QGtk3Storage::save() const + { + return QGtk3Json::save(savePalettes()); + } + ++/*! ++ \internal ++ \brief Loads palette mapping from Json file \param filename. ++ ++ Returns \c true if the file was successfully parsed and \c false otherwise. ++ */ + bool QGtk3Storage::load(const QString &filename) + { + return QGtk3Json::load(m_palettes, filename); + } + ++/*! ++ \internal ++ \brief Creates a standard palette mapping. ++ ++ The method creates a hard coded standard mapping, used if no external Json file ++ containing a valid mapping has been specified in the environment variable {{QT_GUI_GTK_JSON}}. ++ */ + void QGtk3Storage::createMapping() + { + // Hard code standard mapping +@@ -332,41 +487,39 @@ void QGtk3Storage::createMapping() + #define CLEAR map.clear() + + /* +- * Macro ussage: +- * +- * 1. Define a source +- * +- * GTK(QGtkWidget, QGtkColorSource, GTK_STATE_FLAG) +- * Fetch the color from a GtkWidget, related to a source and a state. +- * +- * LIGHTER(ColorGroup, ColorROle, lighter) +- * Use a color of the same QPalette related to ColorGroup and ColorRole. +- * Make the color lighter (if lighter >100) or darker (if lighter < 100) +- * +- * MODIFY(ColorGroup, ColorRole, red, green, blue) +- * Use a color of the same QPalette related to ColorGroup and ColorRole. +- * Modify it by adding red, green, blue. +- * +- * FIX(const QBrush &) +- * Use a fixed brush without querying GTK +- * +- * 2. Define the target +- * +- * Use ADD(ColorGroup, ColorRole) to use the defined source for the +- * color group / role in the current palette. +- * +- * Use ADD(ColorGroup, ColorRole, Appearance) to use the defined source +- * only for a specific appearance +- * +- * 3. Save mapping +- * Save the defined mappings for a specific palette. +- * If a mapping entry does not cover all color groups and roles of a palette, +- * the system palette will be used for the remaining values. +- * If the system palette does not have all combination of color groups and roles, +- * the remaining ones will be populated by a hard coded fusion-style like palette. +- * +- * 4. Clear mapping +- * Use CLEAR to clear the mapping and begin a new one. ++ Macro usage: ++ ++ 1. Define a source ++ GTK(QGtkWidget, QGtkColorSource, GTK_STATE_FLAG) ++ Fetch the color from a GtkWidget, related to a source and a state. ++ ++ LIGHTER(ColorGroup, ColorROle, lighter) ++ Use a color of the same QPalette related to ColorGroup and ColorRole. ++ Make the color lighter (if lighter >100) or darker (if lighter < 100) ++ ++ MODIFY(ColorGroup, ColorRole, red, green, blue) ++ Use a color of the same QPalette related to ColorGroup and ColorRole. ++ Modify it by adding red, green, blue. ++ ++ FIX(const QBrush &) ++ Use a fixed brush without querying GTK ++ ++ 2. Define the target ++ Use ADD(ColorGroup, ColorRole) to use the defined source for the ++ color group / role in the current palette. ++ ++ Use ADD(ColorGroup, ColorRole, Appearance) to use the defined source ++ only for a specific appearance ++ ++ 3. Save mapping ++ Save the defined mappings for a specific palette. ++ If a mapping entry does not cover all color groups and roles of a palette, ++ the system palette will be used for the remaining values. ++ If the system palette does not have all combination of color groups and roles, ++ the remaining ones will be populated by a hard coded fusion-style like palette. ++ ++ 4. Clear mapping ++ Use CLEAR to clear the mapping and begin a new one. + */ + + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage_p.h b/src/plugins/platformthemes/gtk3/qgtk3storage_p.h +index 57f6aeea96..af628d49ff 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3storage_p.h ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage_p.h +@@ -33,6 +33,7 @@ class QGtk3Storage + public: + QGtk3Storage(); + ++ // Enum documented in cpp file. Please keep it in line with updates made here. + enum class SourceType { + Gtk, + Fixed, +-- +2.41.0 + diff --git a/SOURCES/0014-QGtk3Theme-Improve-fixed-font-delivery.patch b/SOURCES/0014-QGtk3Theme-Improve-fixed-font-delivery.patch new file mode 100644 index 0000000..fe8dd91 --- /dev/null +++ b/SOURCES/0014-QGtk3Theme-Improve-fixed-font-delivery.patch @@ -0,0 +1,84 @@ +From 9628ad303ad924255a224fdcc113ff8264172fc7 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 27 Jul 2023 12:44:11 +0200 +Subject: [PATCH 14/15] QGtk3Theme: Improve fixed font delivery + +The gtk_fixed widget was used as a reference to obtain a fixed font +and HeaderViewFont. + +This is a mistake, because the gtk_fixed widget is a container for +other widgets with fixed geometries and no layouting. + +This patch makes the default style being used for a fixed font and, as +a drive-by, the combo box as a reference for a header view font. +A monospace based css provider as explicitly added to the style +context, in case a fixed font is requested. The provider is removed +afterwards. +--- + .../platformthemes/gtk3/qgtk3interface.cpp | 24 +++++++++++++++++-- + 1 file changed, 22 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3interface.cpp b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +index 0fab1220b4..21abea81cf 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3interface.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -538,13 +539,13 @@ inline constexpr QGtk3Interface::QGtkWidget QGtk3Interface::toWidgetType(QPlatfo + case QPlatformTheme::ToolButtonFont: return QGtkWidget::gtk_button; + case QPlatformTheme::ItemViewFont: return QGtkWidget::gtk_entry; + case QPlatformTheme::ListViewFont: return QGtkWidget::gtk_tree_view; +- case QPlatformTheme::HeaderViewFont: return QGtkWidget::gtk_fixed; ++ case QPlatformTheme::HeaderViewFont: return QGtkWidget::gtk_combo_box; + case QPlatformTheme::ListBoxFont: return QGtkWidget::gtk_Default; + case QPlatformTheme::ComboMenuItemFont: return QGtkWidget::gtk_combo_box; + case QPlatformTheme::ComboLineEditFont: return QGtkWidget::gtk_combo_box_text; + case QPlatformTheme::SmallFont: return QGtkWidget::gtk_Default; + case QPlatformTheme::MiniFont: return QGtkWidget::gtk_Default; +- case QPlatformTheme::FixedFont: return QGtkWidget::gtk_fixed; ++ case QPlatformTheme::FixedFont: return QGtkWidget::gtk_Default; + case QPlatformTheme::GroupBoxTitleFont: return QGtkWidget::gtk_Default; + case QPlatformTheme::TabButtonFont: return QGtkWidget::gtk_button; + case QPlatformTheme::EditorFont: return QGtkWidget::gtk_entry; +@@ -624,6 +625,24 @@ QFont QGtk3Interface::font(QPlatformTheme::Font type) const + if (!con) + return QFont(); + ++ // explicitly add provider for fixed font ++ GtkCssProvider *cssProvider = nullptr; ++ if (type == QPlatformTheme::FixedFont) { ++ cssProvider = gtk_css_provider_new(); ++ const char *fontSpec = "{font-family: monospace;}"; ++ gtk_css_provider_load_from_data(cssProvider, fontSpec, -1, NULL); ++ gtk_style_context_add_provider(con, GTK_STYLE_PROVIDER(cssProvider), ++ GTK_STYLE_PROVIDER_PRIORITY_USER); ++ } ++ ++ // remove monospace provider from style context and unref it ++ QScopeGuard guard([&](){ ++ if (cssProvider) { ++ gtk_style_context_remove_provider(con, GTK_STYLE_PROVIDER(cssProvider)); ++ g_object_unref(cssProvider); ++ } ++ }); ++ + const PangoFontDescription *gtkFont = gtk_style_context_get_font(con, GTK_STATE_FLAG_NORMAL); + if (!gtkFont) + return QFont(); +@@ -650,6 +669,7 @@ QFont QGtk3Interface::font(QPlatformTheme::Font type) const + font.setFamily("monospace"); + } + } ++ + return font; + } + +-- +2.41.0 + diff --git a/SOURCES/0015-QGtk3Theme-Do-not-default-Active-WindowText-to-butto.patch b/SOURCES/0015-QGtk3Theme-Do-not-default-Active-WindowText-to-butto.patch new file mode 100644 index 0000000..8702313 --- /dev/null +++ b/SOURCES/0015-QGtk3Theme-Do-not-default-Active-WindowText-to-butto.patch @@ -0,0 +1,56 @@ +From 6a9a896ae86a69a3c8bcbaaf7e2e2fd2105723a4 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 27 Jul 2023 12:44:31 +0200 +Subject: [PATCH 15/15] QGtk3Theme: Do not default Active WindowText to button + foreground + +QGtk3Theme uses the GTK button foreground as a default for the +WindowText color role. When a GTK3 theme has no specific color for the +entry text, this can lead to text on certain assets looking darker +and thus disabled. + +This discontinues usage of the button foreground for the window text. + +Finding the WindowText color role in QPlatformTheme::SystemPalette now +follows the following logic: +(1) GTK normal entry text is used if specified. This is the preferred +option, copying GTK behavior. +(2) If (1) is not specified, the GTK default text color is used, making +WindowText equal to Text. +(3) If neither (1), nor (2) are specified, the WindowText color role is +taken from qt_fusionPalette, where it is also equal to Text. + +The SystemPalette is used as a default template for all other control +or widget speicific palettes. The rules above therefor apply to all +screen assets (unless they use a JSON file to specify a their +individual WindowText). + +[ChangeLog][QGtk3Theme][SystemPalette][WindowText] Default to GTK +Entry Text / Normal Text / qt_fusionPalette +--- + src/plugins/platformthemes/gtk3/qgtk3storage.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +index 7775ac66e4..fb4069ba3c 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +@@ -538,7 +538,6 @@ void QGtk3Storage::createMapping() + LIGHTER(Normal, Window, 80); + ADD(Normal, Dark); + GTK(button, Foreground, ACTIVE); +- ADD(Normal, WindowText); + ADD(Inactive, WindowText); + LIGHTER(Normal, WindowText, 50); + ADD(Disabled, Text); +@@ -562,6 +561,7 @@ void QGtk3Storage::createMapping() + ADD(Disabled, HighlightedText); + GTK(Default, Text, NORMAL); + ADD(Normal, Text); ++ ADD(Normal, WindowText); + ADD(Inactive, Text); + ADD(Normal, HighlightedText); + LIGHTER(Normal, Base, 93); +-- +2.41.0 + diff --git a/SOURCES/0016-Fix-memory-leak-in-QGtk3Interface-themename.patch b/SOURCES/0016-Fix-memory-leak-in-QGtk3Interface-themename.patch new file mode 100644 index 0000000..d656e8b --- /dev/null +++ b/SOURCES/0016-Fix-memory-leak-in-QGtk3Interface-themename.patch @@ -0,0 +1,52 @@ +From 233e7e6be35a5a455b6ecd7c15de8c9cfc70ca10 Mon Sep 17 00:00:00 2001 +From: Thorbjørn Lindeijer +Date: Thu, 3 Aug 2023 16:09:49 +0200 +Subject: Fix memory leak in QGtk3Interface::themeName + +Pick-to: 6.6 6.5 +Change-Id: Ib8c90f7ef66c095f0c1fc04f4cc72bf5eea72ddb +Reviewed-by: Axel Spoerl + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3interface.cpp b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +index 21abea81..8e8fefb6 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3interface.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3interface.cpp +@@ -477,15 +477,18 @@ QBrush QGtk3Interface::brush(QGtkWidget wtype, QGtkColorSource source, GtkStateF + \internal + \brief Returns the name of the current GTK theme. + */ +-const QString QGtk3Interface::themeName() const ++QString QGtk3Interface::themeName() const + { +- gchar *theme_name; +- GtkSettings *settings = gtk_settings_get_default(); +- if (!settings) +- return QString(); ++ QString name; ++ ++ if (GtkSettings *settings = gtk_settings_get_default()) { ++ gchar *theme_name; ++ g_object_get(settings, "gtk-theme-name", &theme_name, nullptr); ++ name = QLatin1String(theme_name); ++ g_free(theme_name); ++ } + +- g_object_get(settings, "gtk-theme-name", &theme_name, nullptr); +- return QLatin1String(theme_name); ++ return name; + } + + /*! +diff --git a/src/plugins/platformthemes/gtk3/qgtk3interface_p.h b/src/plugins/platformthemes/gtk3/qgtk3interface_p.h +index 42643e72..d9bf5c32 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3interface_p.h ++++ b/src/plugins/platformthemes/gtk3/qgtk3interface_p.h +@@ -132,7 +132,7 @@ public: + QIcon fileIcon(const QFileInfo &fileInfo) const; + + // Return current GTK theme name +- const QString themeName() const; ++ QString themeName() const; + + // Derive appearance from default colors + Qt::Appearance appearanceByColors() const; diff --git a/SOURCES/0017-Fix-disabled-button-color-in-Linux-x11-wayland.patch b/SOURCES/0017-Fix-disabled-button-color-in-Linux-x11-wayland.patch new file mode 100644 index 0000000..38311f0 --- /dev/null +++ b/SOURCES/0017-Fix-disabled-button-color-in-Linux-x11-wayland.patch @@ -0,0 +1,40 @@ +From 4cffb3b5fbbad24fed26690c3e10c0332cb0b33f Mon Sep 17 00:00:00 2001 +From: Santhosh Kumar +Date: Mon, 9 Oct 2023 13:17:19 +0200 +Subject: Fix disabled button color in Linux (X11/Wayland) + +The palette mapping table (as read from gtk widget) maintained in +QGtk3Storage misses information of QPalette::Button and +QPalette::ButtonText role for QPalette::Disabled color group. This +cause disabled button widget to be rendered with incorrect palette +(such as in dark color scheme, light palette had been used). + +This patch fixes this issue by extending palette mapping in +QGtk3Storage for disabled color group of button role. + +Fixes: QTBUG-113486 +Pick-to: 6.6.0 6.6 6.5 +Change-Id: Ied4b2650c92cc1cda58be69257945991013b276f +Reviewed-by: Axel Spoerl + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +index 1952ce278c..0017f55a45 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +@@ -531,6 +531,8 @@ void QGtk3Storage::createMapping() + ADD(Normal, Base); + ADD(Inactive, Base); + ADD(Inactive, Window); ++ ADD(Disabled, Button); ++ ADD(Disabled, Window); + LIGHTER(Normal, Window, 125); + ADD(Normal, Light); + LIGHTER(Normal, Window, 70); +@@ -543,6 +545,7 @@ void QGtk3Storage::createMapping() + ADD(Disabled, Text); + ADD(Disabled, WindowText); + ADD(Inactive, ButtonText); ++ ADD(Disabled, ButtonText); + GTK(button, Text, NORMAL); + ADD(Disabled, ButtonText); + // special background colors diff --git a/SOURCES/0018-Fix-inactive-palette-in-gtk3-theme.patch b/SOURCES/0018-Fix-inactive-palette-in-gtk3-theme.patch new file mode 100644 index 0000000..47635d4 --- /dev/null +++ b/SOURCES/0018-Fix-inactive-palette-in-gtk3-theme.patch @@ -0,0 +1,241 @@ +From a608a7c29886fd95ea8569776036673e6c7639f2 Mon Sep 17 00:00:00 2001 +From: Santhosh Kumar +Date: Tue, 10 Oct 2023 16:07:07 +0200 +Subject: Fix inactive palette in gtk3 theme + +In gtk3 theme, the inactive color group had been set with incorrect +palette or not been set for some cases, which leads to glitch when +moving application window. This is because inactive group palettes were +applied during window movement and its expected to be set with correct +palettes. + +This patch fixes this issue by setting correct palette for inactive +color group. + +Fixes: QTBUG-112879 +Pick-to: 6.6 6.5 +Change-Id: I6658843626f322fee0ef99dfafb550956e3e0aee +Reviewed-by: Jonas Karlsson +Reviewed-by: Axel Spoerl + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +index 0017f55a45..bbc70c39a2 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +@@ -524,93 +524,129 @@ void QGtk3Storage::createMapping() + + + // System palette +- // background color and calculate derivates +- GTK(Default, Background, INSENSITIVE); +- ADD(Normal, Window); +- ADD(Normal, Button); +- ADD(Normal, Base); +- ADD(Inactive, Base); +- ADD(Inactive, Window); +- ADD(Disabled, Button); +- ADD(Disabled, Window); +- LIGHTER(Normal, Window, 125); +- ADD(Normal, Light); +- LIGHTER(Normal, Window, 70); +- ADD(Normal, Shadow); +- LIGHTER(Normal, Window, 80); +- ADD(Normal, Dark); +- GTK(button, Foreground, ACTIVE); +- ADD(Inactive, WindowText); +- LIGHTER(Normal, WindowText, 50); +- ADD(Disabled, Text); +- ADD(Disabled, WindowText); +- ADD(Inactive, ButtonText); +- ADD(Disabled, ButtonText); +- GTK(button, Text, NORMAL); +- ADD(Disabled, ButtonText); +- // special background colors +- GTK(Default, Background, SELECTED); +- ADD(Disabled, Highlight); +- ADD(Normal, Highlight); +- GTK(entry, Foreground, SELECTED); +- ADD(Normal, HighlightedText); +- GTK(entry, Background, ACTIVE); +- ADD(Inactive, HighlightedText); +- // text color and friends +- GTK(entry, Text, NORMAL); +- ADD(Normal, ButtonText); +- ADD(Normal, WindowText); +- ADD(Disabled, WindowText); +- ADD(Disabled, HighlightedText); +- GTK(Default, Text, NORMAL); +- ADD(Normal, Text); +- ADD(Normal, WindowText); +- ADD(Inactive, Text); +- ADD(Normal, HighlightedText); +- LIGHTER(Normal, Base, 93); +- ADD(All, AlternateBase); +- GTK(Default, Foreground, NORMAL); +- ADD(All, ToolTipText); +- MODIFY(Normal, Text, 100, 100, 100); +- ADD(All, PlaceholderText, Light); +- MODIFY(Normal, Text, -100, -100, -100); +- ADD(All, PlaceholderText, Dark); +- SAVE(SystemPalette); +- CLEAR; +- +- // Checkbox and Radio Button +- GTK(button, Text, ACTIVE); +- ADD(Normal, Base, Dark); +- GTK(Default, Background, NORMAL); +- ADD(All, Base); +- GTK(button, Text, NORMAL); +- ADD(Normal, Base, Light); +- SAVE(CheckBoxPalette); +- SAVE(RadioButtonPalette); +- CLEAR; +- +- // ComboBox, GroupBox, Frame +- GTK(combo_box, Text, NORMAL); +- ADD(Normal, ButtonText, Dark); +- ADD(Normal, Text, Dark); +- GTK(combo_box, Text, ACTIVE); +- ADD(Normal, ButtonText, Light); +- ADD(Normal, Text, Light); +- SAVE(ComboBoxPalette); +- SAVE(GroupBoxPalette); +- CLEAR; +- +- // Menu bar +- GTK(Default, Text, ACTIVE); +- ADD(Normal, ButtonText); +- SAVE(MenuPalette); +- CLEAR; +- +- // LineEdit +- GTK(Default, Background, NORMAL); +- ADD(All, Base); +- SAVE(TextLineEditPalette); +- CLEAR; ++ { ++ // background color and calculate derivates ++ GTK(Default, Background, INSENSITIVE); ++ ADD(All, Window); ++ ADD(All, Button); ++ ADD(All, Base); ++ LIGHTER(Normal, Window, 125); ++ ADD(Normal, Light); ++ ADD(Inactive, Light); ++ LIGHTER(Normal, Window, 70); ++ ADD(Normal, Shadow); ++ LIGHTER(Normal, Window, 80); ++ ADD(Normal, Dark); ++ ADD(Inactive, Dark) ++ ++ GTK(button, Foreground, ACTIVE); ++ ADD(Inactive, WindowText); ++ LIGHTER(Normal, WindowText, 50); ++ ADD(Disabled, Text); ++ ADD(Disabled, WindowText); ++ ADD(Disabled, ButtonText); ++ ++ GTK(button, Text, NORMAL); ++ ADD(Inactive, ButtonText); ++ ++ // special background colors ++ GTK(Default, Background, SELECTED); ++ ADD(Disabled, Highlight); ++ ADD(Normal, Highlight); ++ ADD(Inactive, Highlight); ++ ++ GTK(entry, Foreground, SELECTED); ++ ADD(Normal, HighlightedText); ++ ADD(Inactive, HighlightedText); ++ ++ // text color and friends ++ GTK(entry, Text, NORMAL); ++ ADD(Normal, ButtonText); ++ ADD(Normal, WindowText); ++ ADD(Disabled, HighlightedText); ++ ++ GTK(Default, Text, NORMAL); ++ ADD(Normal, Text); ++ ADD(Inactive, Text); ++ ADD(Normal, HighlightedText); ++ LIGHTER(Normal, Base, 93); ++ ADD(All, AlternateBase); ++ ++ GTK(Default, Foreground, NORMAL); ++ ADD(All, ToolTipText); ++ MODIFY(Normal, Text, 100, 100, 100); ++ ADD(All, PlaceholderText, Light); ++ MODIFY(Normal, Text, -100, -100, -100); ++ ADD(All, PlaceholderText, Dark); ++ ++ SAVE(SystemPalette); ++ CLEAR; ++ } ++ ++ // Label and TabBar Palette ++ { ++ GTK(entry, Text, NORMAL); ++ ADD(Normal, WindowText); ++ ADD(Inactive, WindowText); ++ ++ SAVE(LabelPalette); ++ SAVE(TabBarPalette); ++ CLEAR; ++ } ++ ++ // Checkbox and RadioButton Palette ++ { ++ GTK(button, Text, ACTIVE); ++ ADD(Normal, Base, Dark); ++ ADD(Inactive, WindowText, Dark); ++ ++ GTK(Default, Foreground, NORMAL); ++ ADD(All, Text); ++ ++ GTK(Default, Background, NORMAL); ++ ADD(All, Base); ++ ++ GTK(button, Text, NORMAL); ++ ADD(Normal, Base, Light); ++ ADD(Inactive, WindowText, Light); ++ ++ SAVE(CheckBoxPalette); ++ SAVE(RadioButtonPalette); ++ CLEAR; ++ } ++ ++ // ComboBox, GroupBox & Frame Palette ++ { ++ GTK(combo_box, Text, NORMAL); ++ ADD(Normal, ButtonText, Dark); ++ ADD(Normal, Text, Dark); ++ ADD(Inactive, WindowText, Dark); ++ ++ GTK(combo_box, Text, ACTIVE); ++ ADD(Normal, ButtonText, Light); ++ ADD(Normal, Text, Light); ++ ADD(Inactive, WindowText, Light); ++ ++ SAVE(ComboBoxPalette); ++ SAVE(GroupBoxPalette); ++ CLEAR; ++ } ++ ++ // MenuBar Palette ++ { ++ GTK(Default, Text, ACTIVE); ++ ADD(Normal, ButtonText); ++ SAVE(MenuPalette); ++ CLEAR; ++ } ++ ++ // LineEdit Palette ++ { ++ GTK(Default, Background, NORMAL); ++ ADD(All, Base); ++ SAVE(TextLineEditPalette); ++ CLEAR; ++ } + + #undef GTK + #undef REC diff --git a/SOURCES/0019-Fix-tooltip-palette-issue-in-gtk3-theme.patch b/SOURCES/0019-Fix-tooltip-palette-issue-in-gtk3-theme.patch new file mode 100644 index 0000000..890bdc0 --- /dev/null +++ b/SOURCES/0019-Fix-tooltip-palette-issue-in-gtk3-theme.patch @@ -0,0 +1,27 @@ +From 756857b5d05fe85ea93851111fafc430944dbe61 Mon Sep 17 00:00:00 2001 +From: Santhosh Kumar +Date: Wed, 18 Oct 2023 11:23:20 +0200 +Subject: Fix tooltip palette issue in gtk3 theme + +The tooltip text doesn't show with right palette when application runs +in dark mode using gtk3 theme. + +This patchset removes explicitly setting ToolTipText palette in +gtk3theme. + +Pick-to: 6.6 6.5 +Change-Id: Id90626a377733814c3f32f0bf7e5539097b76dd6 +Reviewed-by: Axel Spoerl + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +index bbc70c39a2..22cfabb843 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +@@ -573,7 +573,6 @@ void QGtk3Storage::createMapping() + ADD(All, AlternateBase); + + GTK(Default, Foreground, NORMAL); +- ADD(All, ToolTipText); + MODIFY(Normal, Text, 100, 100, 100); + ADD(All, PlaceholderText, Light); + MODIFY(Normal, Text, -100, -100, -100); diff --git a/SOURCES/0020-QGtk3Theme-define-light-midlight-mid-dark-shadow-colors.patch b/SOURCES/0020-QGtk3Theme-define-light-midlight-mid-dark-shadow-colors.patch new file mode 100644 index 0000000..384603f --- /dev/null +++ b/SOURCES/0020-QGtk3Theme-define-light-midlight-mid-dark-shadow-colors.patch @@ -0,0 +1,40 @@ +From fd09519bbd4e7ea89b898c7496e7e06980ee9672 Mon Sep 17 00:00:00 2001 +From: Axel Spoerl +Date: Thu, 19 Oct 2023 15:19:12 +0200 +Subject: QGtk3Theme: define light, midlight, mid, dark and shadow colors +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Define color groups used for shading and in order to render specific +inactive texts, e.g. menu item text. + +Found-by: Piotr Wierciński +Pick-to: 6.6 6.5 +Change-Id: I736f5aff1ff5379ce3f78b53e547b0b5f552779f +Reviewed-by: Santhosh Kumar +Reviewed-by: Piotr Wierciński + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +index 22cfabb843..90c0282651 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +@@ -578,6 +578,18 @@ void QGtk3Storage::createMapping() + MODIFY(Normal, Text, -100, -100, -100); + ADD(All, PlaceholderText, Dark); + ++ // Light, midlight, dark, mid, shadow colors ++ LIGHTER(Normal, Button, 125); ++ ADD(All, Light) ++ LIGHTER(Normal, Button, 113); ++ ADD(All, Midlight) ++ LIGHTER(Normal, Button, 113); ++ ADD(All, Mid) ++ LIGHTER(Normal, Button, 87); ++ ADD(All, Dark) ++ LIGHTER(Normal, Button, 5); ++ ADD(All, Shadow) ++ + SAVE(SystemPalette); + CLEAR; + } diff --git a/SOURCES/10-qt5-check-opengl2.sh b/SOURCES/10-qt5-check-opengl2.sh new file mode 100755 index 0000000..57071d4 --- /dev/null +++ b/SOURCES/10-qt5-check-opengl2.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ -z "$QT_XCB_FORCE_SOFTWARE_OPENGL" ]; then + +QT5_CHECK_OPENGL_VERSION=`LANG=C glxinfo 2> /dev/null | grep '^OpenGL version string: ' | head -n 1 | sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g'` ||: + +if [ "$QT5_CHECK_OPENGL_VERSION" == "1" ]; then + QT_XCB_FORCE_SOFTWARE_OPENGL=1 + export QT_XCB_FORCE_SOFTWARE_OPENGL +fi + +unset QT5_CHECK_OPENGL_VERSION + +fi diff --git a/SOURCES/macros.qt5-qtbase b/SOURCES/macros.qt5-qtbase new file mode 100644 index 0000000..836471f --- /dev/null +++ b/SOURCES/macros.qt5-qtbase @@ -0,0 +1,4 @@ +%_qt5 @@NAME@@ +%_qt5_epoch @@EPOCH@@ +%_qt5_version @@VERSION@@ +%_qt5_evr @@EVR@@ diff --git a/SOURCES/qconfig-multilib.h b/SOURCES/qconfig-multilib.h new file mode 100644 index 0000000..a104c37 --- /dev/null +++ b/SOURCES/qconfig-multilib.h @@ -0,0 +1,23 @@ +/* qconfig.h */ +/* This file is here to prevent a file conflict on multiarch systems. A + * conflict will occur because qconfig.h has arch-specific definitions. + * + * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */ + +#ifndef QCONFIG_MULTILIB_H +#define QCONFIG_MULTILIB_H + +#ifndef __WORDSIZE +#include +#endif + +#if __WORDSIZE == 32 +#include "QtCore/qconfig-32.h" +#elif __WORDSIZE == 64 +#include "QtCore/qconfig-64.h" +#else +#error "unexpected value for __WORDSIZE macro" +#endif + +#endif + diff --git a/SOURCES/qt5-qtbase-5.12.1-firebird-4.0.0.patch b/SOURCES/qt5-qtbase-5.12.1-firebird-4.0.0.patch new file mode 100644 index 0000000..9c09161 --- /dev/null +++ b/SOURCES/qt5-qtbase-5.12.1-firebird-4.0.0.patch @@ -0,0 +1,17 @@ +diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json +--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird 2019-01-28 11:11:52.000000000 -0600 ++++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json 2019-02-03 13:41:27.392305128 -0600 +@@ -49,10 +49,11 @@ + "ibase": { + "label": "InterBase", + "test": {}, +- "headers": "ibase.h", ++ "headers": "ibase.h", + "sources": [ + { "libs": "-lgds32_ms", "condition": "config.win32" }, +- { "libs": "-lgds", "condition": "!config.win32" } ++ { "libs": "-lgds", "condition": "!config.win32" }, ++ { "libs": "-lfbclient", "condition": "!config.win32" } + ] + }, + "mysql": { diff --git a/SOURCES/qt5-qtbase-5.12.1-firebird.patch b/SOURCES/qt5-qtbase-5.12.1-firebird.patch new file mode 100644 index 0000000..674a5b5 --- /dev/null +++ b/SOURCES/qt5-qtbase-5.12.1-firebird.patch @@ -0,0 +1,29 @@ +diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json +--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird 2019-01-28 11:11:52.000000000 -0600 ++++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json 2019-02-03 13:41:27.392305128 -0600 +@@ -49,10 +49,11 @@ + "ibase": { + "label": "InterBase", + "test": {}, +- "headers": "ibase.h", ++ "headers": "firebird/ibase.h", + "sources": [ + { "libs": "-lgds32_ms", "condition": "config.win32" }, +- { "libs": "-lgds", "condition": "!config.win32" } ++ { "libs": "-lgds", "condition": "!config.win32" }, ++ { "libs": "-lfbclient", "condition": "!config.win32" } + ] + }, + "mysql": { +diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h +--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h.firebird 2019-01-28 11:11:52.000000000 -0600 ++++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h 2019-02-03 13:27:30.683142996 -0600 +@@ -52,7 +52,7 @@ + // + + #include +-#include ++#include + + #ifdef QT_PLUGIN + #define Q_EXPORT_SQLDRIVER_IBASE diff --git a/SOURCES/qt5-qtbase-cxxflag.patch b/SOURCES/qt5-qtbase-cxxflag.patch new file mode 100644 index 0000000..321f051 --- /dev/null +++ b/SOURCES/qt5-qtbase-cxxflag.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf +index e7e6ee1..ff2a939 100644 +--- a/mkspecs/common/gcc-base.conf ++++ b/mkspecs/common/gcc-base.conf +@@ -32,7 +32,7 @@ + # + + QMAKE_CFLAGS_OPTIMIZE = -O2 +-QMAKE_CFLAGS_OPTIMIZE_FULL = -O3 ++QMAKE_CFLAGS_OPTIMIZE_FULL = -O2 + QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og + QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os + diff --git a/SOURCES/qt5-qtbase-gcc11.patch b/SOURCES/qt5-qtbase-gcc11.patch new file mode 100644 index 0000000..1fd765a --- /dev/null +++ b/SOURCES/qt5-qtbase-gcc11.patch @@ -0,0 +1,171 @@ +diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp +index 06fd88da..dbff3239 100644 +--- a/src/corelib/codecs/qtextcodec.cpp ++++ b/src/corelib/codecs/qtextcodec.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qplatformdefs.h" + + #include "qtextcodec.h" +diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp +index 8561f908..8128d3cf 100644 +--- a/src/corelib/codecs/qutfcodec.cpp ++++ b/src/corelib/codecs/qutfcodec.cpp +@@ -38,6 +38,8 @@ + ** + ****************************************************************************/ + ++#include ++ + #include "qutfcodec_p.h" + #include "qlist.h" + #include "qendian.h" +diff --git a/src/corelib/global/qendian.cpp b/src/corelib/global/qendian.cpp +index eb08b2f8..6b41b3dd 100644 +--- a/src/corelib/global/qendian.cpp ++++ b/src/corelib/global/qendian.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qendian.h" + + #include "qalgorithms.h" +diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp +index c9733174..c62a1972 100644 +--- a/src/corelib/global/qfloat16.cpp ++++ b/src/corelib/global/qfloat16.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qfloat16.h" + #include "private/qsimd_p.h" + #include // for fpclassify()'s return values +diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp +index 0f040997..e1189683 100644 +--- a/src/corelib/global/qrandom.cpp ++++ b/src/corelib/global/qrandom.cpp +@@ -40,6 +40,7 @@ + // for rand_s + #define _CRT_RAND_S + ++#include + #include "qrandom.h" + #include "qrandom_p.h" + #include +diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp +index 13eee353..9e7a7a41 100644 +--- a/src/corelib/plugin/qelfparser_p.cpp ++++ b/src/corelib/plugin/qelfparser_p.cpp +@@ -37,6 +37,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qelfparser_p.h" + + #if defined (Q_OF_ELF) && defined(Q_CC_GNU) +diff --git a/src/corelib/plugin/qmachparser.cpp b/src/corelib/plugin/qmachparser.cpp +index 11670caf..39f5596b 100644 +--- a/src/corelib/plugin/qmachparser.cpp ++++ b/src/corelib/plugin/qmachparser.cpp +@@ -37,6 +37,8 @@ + ** + ****************************************************************************/ + ++#include ++ + #include "qmachparser_p.h" + + #if defined(Q_OF_MACH_O) +diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp +index 83873edf..5aafb4e5 100644 +--- a/src/corelib/plugin/quuid.cpp ++++ b/src/corelib/plugin/quuid.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "quuid.h" + + #include "qcryptographichash.h" +diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp +index 314c32e1..1e3b1703 100644 +--- a/src/corelib/serialization/qdatastream.cpp ++++ b/src/corelib/serialization/qdatastream.cpp +@@ -40,6 +40,8 @@ + #include "qdatastream.h" + #include "qdatastream_p.h" + ++#include ++ + #if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED) + #include "qbuffer.h" + #include "qfloat16.h" +diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp +index 817191ab..96afe1a5 100644 +--- a/src/corelib/text/qbytearray.cpp ++++ b/src/corelib/text/qbytearray.cpp +@@ -39,6 +39,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qbytearray.h" + #include "qbytearraymatcher.h" + #include "private/qtools_p.h" +diff --git a/src/corelib/text/qbytearraymatcher.cpp b/src/corelib/text/qbytearraymatcher.cpp +index 72e09226..80511cb5 100644 +--- a/src/corelib/text/qbytearraymatcher.cpp ++++ b/src/corelib/text/qbytearraymatcher.cpp +@@ -37,6 +37,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qbytearraymatcher.h" + + #include +diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp +index ab3054d5..22efb3a0 100644 +--- a/src/corelib/tools/qbitarray.cpp ++++ b/src/corelib/tools/qbitarray.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qbitarray.h" + #include + #include +diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp +index b46bbeb4..02a0f56c 100644 +--- a/src/corelib/tools/qcryptographichash.cpp ++++ b/src/corelib/tools/qcryptographichash.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include + #include + #include +diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp +index e00f9d05..917ab5f9 100644 +--- a/src/gui/text/qfontengine_qpf2.cpp ++++ b/src/gui/text/qfontengine_qpf2.cpp +@@ -37,6 +37,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qfontengine_qpf2_p.h" + + #include diff --git a/SOURCES/qtbase-5.15.10-fix-missing-qtsan-include.patch b/SOURCES/qtbase-5.15.10-fix-missing-qtsan-include.patch new file mode 100644 index 0000000..342af27 --- /dev/null +++ b/SOURCES/qtbase-5.15.10-fix-missing-qtsan-include.patch @@ -0,0 +1,34 @@ +diff --git a/include/QtCore/headers.pri b/include/QtCore/headers.pri +index 791c9599..fc27afc5 100644 +--- a/include/QtCore/headers.pri ++++ b/include/QtCore/headers.pri +@@ -1,6 +1,6 @@ +-SYNCQT.HEADER_FILES = animation/qabstractanimation.h animation/qanimationgroup.h animation/qparallelanimationgroup.h animation/qpauseanimation.h animation/qpropertyanimation.h animation/qsequentialanimationgroup.h animation/qvariantanimation.h codecs/qtextcodec.h global/qcompilerdetection.h global/qconfig-bootstrapped.h global/qendian.h global/qflags.h global/qfloat16.h global/qglobal.h global/qglobalstatic.h global/qisenum.h global/qlibraryinfo.h global/qlogging.h global/qnamespace.h global/qnumeric.h global/qoperatingsystemversion.h global/qprocessordetection.h global/qrandom.h global/qsysinfo.h global/qsystemdetection.h global/qt_windows.h global/qtypeinfo.h global/qtypetraits.h global/qversiontagging.h io/qbuffer.h io/qdebug.h io/qdir.h io/qdiriterator.h io/qfile.h io/qfiledevice.h io/qfileinfo.h io/qfileselector.h io/qfilesystemwatcher.h io/qiodevice.h io/qlockfile.h io/qloggingcategory.h io/qprocess.h io/qresource.h io/qsavefile.h io/qsettings.h io/qstandardpaths.h io/qstorageinfo.h io/qtemporarydir.h io/qtemporaryfile.h io/qurl.h io/qurlquery.h itemmodels/qabstractitemmodel.h itemmodels/qabstractproxymodel.h itemmodels/qconcatenatetablesproxymodel.h itemmodels/qidentityproxymodel.h itemmodels/qitemselectionmodel.h itemmodels/qsortfilterproxymodel.h itemmodels/qstringlistmodel.h itemmodels/qtransposeproxymodel.h kernel/qabstracteventdispatcher.h kernel/qabstractnativeeventfilter.h kernel/qbasictimer.h kernel/qcoreapplication.h kernel/qcoreevent.h kernel/qdeadlinetimer.h kernel/qelapsedtimer.h kernel/qeventloop.h kernel/qfunctions_nacl.h kernel/qfunctions_vxworks.h kernel/qfunctions_winrt.h kernel/qmath.h kernel/qmetaobject.h kernel/qmetatype.h kernel/qmimedata.h kernel/qobject.h kernel/qobject_impl.h kernel/qobjectcleanuphandler.h kernel/qobjectdefs.h kernel/qobjectdefs_impl.h kernel/qpointer.h kernel/qsharedmemory.h kernel/qsignalmapper.h kernel/qsocketnotifier.h kernel/qsystemsemaphore.h kernel/qtestsupport_core.h kernel/qtimer.h kernel/qtranslator.h kernel/qvariant.h kernel/qwineventnotifier.h mimetypes/qmimedatabase.h mimetypes/qmimetype.h plugin/qfactoryinterface.h plugin/qlibrary.h plugin/qplugin.h plugin/qpluginloader.h plugin/quuid.h serialization/qcborarray.h serialization/qcborcommon.h serialization/qcbormap.h serialization/qcborstream.h serialization/qcborstreamreader.h serialization/qcborstreamwriter.h serialization/qcborvalue.h serialization/qdatastream.h serialization/qjsonarray.h serialization/qjsondocument.h serialization/qjsonobject.h serialization/qjsonvalue.h serialization/qtextstream.h serialization/qxmlstream.h statemachine/qabstractstate.h statemachine/qabstracttransition.h statemachine/qeventtransition.h statemachine/qfinalstate.h statemachine/qhistorystate.h statemachine/qsignaltransition.h statemachine/qstate.h statemachine/qstatemachine.h text/qbytearray.h text/qbytearraylist.h text/qbytearraymatcher.h text/qchar.h text/qcollator.h text/qlocale.h text/qregexp.h text/qregularexpression.h text/qstring.h text/qstringalgorithms.h text/qstringbuilder.h text/qstringlist.h text/qstringliteral.h text/qstringmatcher.h text/qstringview.h text/qtextboundaryfinder.h thread/qatomic.h thread/qatomic_bootstrap.h thread/qatomic_cxx11.h thread/qatomic_msvc.h thread/qbasicatomic.h thread/qexception.h thread/qfuture.h thread/qfutureinterface.h thread/qfuturesynchronizer.h thread/qfuturewatcher.h thread/qgenericatomic.h thread/qmutex.h thread/qreadwritelock.h thread/qresultstore.h thread/qrunnable.h thread/qsemaphore.h thread/qthread.h thread/qthreadpool.h thread/qthreadstorage.h thread/qwaitcondition.h time/qcalendar.h time/qdatetime.h time/qtimezone.h tools/qalgorithms.h tools/qarraydata.h tools/qarraydataops.h tools/qarraydatapointer.h tools/qbitarray.h tools/qcache.h tools/qcommandlineoption.h tools/qcommandlineparser.h tools/qcontainerfwd.h tools/qcontainertools_impl.h tools/qcontiguouscache.h tools/qcryptographichash.h tools/qeasingcurve.h tools/qhash.h tools/qhashfunctions.h tools/qiterator.h tools/qline.h tools/qlinkedlist.h tools/qlist.h tools/qmap.h tools/qmargins.h tools/qmessageauthenticationcode.h tools/qpair.h tools/qpoint.h tools/qqueue.h tools/qrect.h tools/qrefcount.h tools/qscopedpointer.h tools/qscopedvaluerollback.h tools/qscopeguard.h tools/qset.h tools/qshareddata.h tools/qsharedpointer.h tools/qsharedpointer_impl.h tools/qsize.h tools/qstack.h tools/qtimeline.h tools/qvarlengtharray.h tools/qvector.h tools/qversionnumber.h ++SYNCQT.HEADER_FILES = animation/qabstractanimation.h animation/qanimationgroup.h animation/qparallelanimationgroup.h animation/qpauseanimation.h animation/qpropertyanimation.h animation/qsequentialanimationgroup.h animation/qvariantanimation.h codecs/qtextcodec.h global/qcompilerdetection.h global/qconfig-bootstrapped.h global/qendian.h global/qflags.h global/qfloat16.h global/qglobal.h global/qglobalstatic.h global/qisenum.h global/qlibraryinfo.h global/qlogging.h global/qnamespace.h global/qnumeric.h global/qoperatingsystemversion.h global/qprocessordetection.h global/qrandom.h global/qsysinfo.h global/qsystemdetection.h global/qt_windows.h global/qtypeinfo.h global/qtypetraits.h global/qversiontagging.h io/qbuffer.h io/qdebug.h io/qdir.h io/qdiriterator.h io/qfile.h io/qfiledevice.h io/qfileinfo.h io/qfileselector.h io/qfilesystemwatcher.h io/qiodevice.h io/qlockfile.h io/qloggingcategory.h io/qprocess.h io/qresource.h io/qsavefile.h io/qsettings.h io/qstandardpaths.h io/qstorageinfo.h io/qtemporarydir.h io/qtemporaryfile.h io/qurl.h io/qurlquery.h itemmodels/qabstractitemmodel.h itemmodels/qabstractproxymodel.h itemmodels/qconcatenatetablesproxymodel.h itemmodels/qidentityproxymodel.h itemmodels/qitemselectionmodel.h itemmodels/qsortfilterproxymodel.h itemmodels/qstringlistmodel.h itemmodels/qtransposeproxymodel.h kernel/qabstracteventdispatcher.h kernel/qabstractnativeeventfilter.h kernel/qbasictimer.h kernel/qcoreapplication.h kernel/qcoreevent.h kernel/qdeadlinetimer.h kernel/qelapsedtimer.h kernel/qeventloop.h kernel/qfunctions_nacl.h kernel/qfunctions_vxworks.h kernel/qfunctions_winrt.h kernel/qmath.h kernel/qmetaobject.h kernel/qmetatype.h kernel/qmimedata.h kernel/qobject.h kernel/qobject_impl.h kernel/qobjectcleanuphandler.h kernel/qobjectdefs.h kernel/qobjectdefs_impl.h kernel/qpointer.h kernel/qsharedmemory.h kernel/qsignalmapper.h kernel/qsocketnotifier.h kernel/qsystemsemaphore.h kernel/qtestsupport_core.h kernel/qtimer.h kernel/qtranslator.h kernel/qvariant.h kernel/qwineventnotifier.h mimetypes/qmimedatabase.h mimetypes/qmimetype.h plugin/qfactoryinterface.h plugin/qlibrary.h plugin/qplugin.h plugin/qpluginloader.h plugin/quuid.h serialization/qcborarray.h serialization/qcborcommon.h serialization/qcbormap.h serialization/qcborstream.h serialization/qcborstreamreader.h serialization/qcborstreamwriter.h serialization/qcborvalue.h serialization/qdatastream.h serialization/qjsonarray.h serialization/qjsondocument.h serialization/qjsonobject.h serialization/qjsonvalue.h serialization/qtextstream.h serialization/qxmlstream.h statemachine/qabstractstate.h statemachine/qabstracttransition.h statemachine/qeventtransition.h statemachine/qfinalstate.h statemachine/qhistorystate.h statemachine/qsignaltransition.h statemachine/qstate.h statemachine/qstatemachine.h text/qbytearray.h text/qbytearraylist.h text/qbytearraymatcher.h text/qchar.h text/qcollator.h text/qlocale.h text/qregexp.h text/qregularexpression.h text/qstring.h text/qstringalgorithms.h text/qstringbuilder.h text/qstringlist.h text/qstringliteral.h text/qstringmatcher.h text/qstringview.h text/qtextboundaryfinder.h thread/qatomic.h thread/qatomic_bootstrap.h thread/qatomic_cxx11.h thread/qatomic_msvc.h thread/qbasicatomic.h thread/qexception.h thread/qfuture.h thread/qfutureinterface.h thread/qfuturesynchronizer.h thread/qfuturewatcher.h thread/qgenericatomic.h thread/qmutex.h thread/qreadwritelock.h thread/qresultstore.h thread/qrunnable.h thread/qsemaphore.h thread/qthread.h thread/qthreadpool.h thread/qthreadstorage.h thread/qwaitcondition.h thread/qtsan_impl.h time/qcalendar.h time/qdatetime.h time/qtimezone.h tools/qalgorithms.h tools/qarraydata.h tools/qarraydataops.h tools/qarraydatapointer.h tools/qbitarray.h tools/qcache.h tools/qcommandlineoption.h tools/qcommandlineparser.h tools/qcontainerfwd.h tools/qcontainertools_impl.h tools/qcontiguouscache.h tools/qcryptographichash.h tools/qeasingcurve.h tools/qhash.h tools/qhashfunctions.h tools/qiterator.h tools/qline.h tools/qlinkedlist.h tools/qlist.h tools/qmap.h tools/qmargins.h tools/qmessageauthenticationcode.h tools/qpair.h tools/qpoint.h tools/qqueue.h tools/qrect.h tools/qrefcount.h tools/qscopedpointer.h tools/qscopedvaluerollback.h tools/qscopeguard.h tools/qset.h tools/qshareddata.h tools/qsharedpointer.h tools/qsharedpointer_impl.h tools/qsize.h tools/qstack.h tools/qtimeline.h tools/qvarlengtharray.h tools/qvector.h tools/qversionnumber.h + SYNCQT.GENERATED_HEADER_FILES = QAbstractAnimation QAnimationDriver QAnimationGroup QParallelAnimationGroup QPauseAnimation QPropertyAnimation QSequentialAnimationGroup QVariantAnimation QTextCodec QTextEncoder QTextDecoder QSpecialInteger QLittleEndianStorageType QBigEndianStorageType QLEInteger QBEInteger QtEndian QFlag QIncompatibleFlag QFlags QFloat16 QIntegerForSize QFunctionPointer QNonConstOverload QConstOverload QtGlobal QGlobalStatic QLibraryInfo QMessageLogContext QMessageLogger QtMsgHandler QtMessageHandler QInternal Qt QtNumeric QOperatingSystemVersion QRandomGenerator QRandomGenerator64 QSysInfo QTypeInfo QTypeInfoQuery QTypeInfoMerger QBuffer QDebug QDebugStateSaver QNoDebug QtDebug QDir QDirIterator QFile QFileDevice QFileInfo QFileInfoList QFileSelector QFileSystemWatcher QIODevice QLockFile QLoggingCategory Q_SECURITY_ATTRIBUTES Q_STARTUPINFO Q_PID QProcessEnvironment QProcess QResource QSaveFile QSettings QStandardPaths QStorageInfo QTemporaryDir QTemporaryFile QUrlTwoFlags QUrl QUrlQuery QModelIndex QPersistentModelIndex QModelIndexList QAbstractItemModel QAbstractTableModel QAbstractListModel QAbstractProxyModel QConcatenateTablesProxyModel QIdentityProxyModel QItemSelectionRange QItemSelectionModel QItemSelection QSortFilterProxyModel QStringListModel QTransposeProxyModel QAbstractEventDispatcher QAbstractNativeEventFilter QBasicTimer QCoreApplication QtCleanUpFunction QEvent QTimerEvent QChildEvent QDynamicPropertyChangeEvent QDeferredDeleteEvent QDeadlineTimer QElapsedTimer QEventLoop QEventLoopLocker QtMath QMetaMethod QMetaEnum QMetaProperty QMetaClassInfo QMetaType QMimeData QObjectList QObjectData QObject QObjectUserData QSignalBlocker QObjectCleanupHandler QByteArrayData QGenericArgument QGenericReturnArgument QArgument QReturnArgument QMetaObject QPointer QSharedMemory QSignalMapper QSocketNotifier QSocketDescriptor QSystemSemaphore QTimer QTranslator QVariant QVariantComparisonHelper QSequentialIterable QAssociativeIterable QVariantHash QVariantList QVariantMap QWinEventNotifier QMimeDatabase QMimeType QFactoryInterface QLibrary QtPluginInstanceFunction QtPluginMetaDataFunction QPluginMetaData QStaticPlugin QtPlugin QPluginLoader QUuid QCborArray QtCborCommon QCborError QCborMap QCborStreamReader QCborStreamWriter QCborParserError QCborValue QCborValueRef QDataStream QJsonArray QJsonParseError QJsonDocument QJsonObject QJsonValue QJsonValueRef QJsonValuePtr QJsonValueRefPtr QTextStream QTextStreamFunction QTextStreamManipulator QXmlStreamStringRef QXmlStreamAttribute QXmlStreamAttributes QXmlStreamNamespaceDeclaration QXmlStreamNamespaceDeclarations QXmlStreamNotationDeclaration QXmlStreamNotationDeclarations QXmlStreamEntityDeclaration QXmlStreamEntityDeclarations QXmlStreamEntityResolver QXmlStreamReader QXmlStreamWriter QAbstractState QAbstractTransition QEventTransition QFinalState QHistoryState QSignalTransition QState QStateMachine QStaticByteArrayData QByteArrayDataPtr QByteArray QByteRef QByteArrayListIterator QMutableByteArrayListIterator QByteArrayList QByteArrayMatcher QStaticByteArrayMatcherBase QLatin1Char QChar QCollatorSortKey QCollator QLocale QRegExp QRegularExpression QRegularExpressionMatch QRegularExpressionMatchIterator QLatin1String QLatin1Literal QString QCharRef QStringRef QStringAlgorithms QStringBuilder QStringListIterator QMutableStringListIterator QStringList QStringLiteral QStringData QStaticStringData QStringDataPtr QStringMatcher QStringView QTextBoundaryFinder QAtomicInteger QAtomicInt QAtomicPointer QException QUnhandledException QFuture QFutureIterator QMutableFutureIterator QFutureInterfaceBase QFutureInterface QFutureSynchronizer QFutureWatcherBase QFutureWatcher QBasicMutex QMutex QRecursiveMutex QMutexLocker QReadWriteLock QReadLocker QWriteLocker QRunnable QSemaphore QSemaphoreReleaser QThread QThreadPool QThreadStorageData QThreadStorage QWaitCondition QCalendar QDate QTime QDateTime QTimeZone QtAlgorithms QArrayData QStaticArrayData QArrayDataPointerRef QArrayDataPointer QBitArray QBitRef QCache QCommandLineOption QCommandLineParser QtContainerFwd QContiguousCacheData QContiguousCacheTypedData QContiguousCache QCryptographicHash QEasingCurve QHashData QHashDummyValue QHashNode QHash QMultiHash QHashIterator QMutableHashIterator QHashFunctions QKeyValueIterator QLine QLineF QLinkedList QLinkedListData QLinkedListNode QLinkedListIterator QMutableLinkedListIterator QListSpecialMethods QListData QList QListIterator QMutableListIterator QMapNodeBase QMapNode QMapDataBase QMapData QMap QMultiMap QMapIterator QMutableMapIterator QMargins QMarginsF QMessageAuthenticationCode QPair QPoint QPointF QQueue QRect QRectF QScopedPointerDeleter QScopedPointerArrayDeleter QScopedPointerPodDeleter QScopedPointerObjectDeleteLater QScopedPointerDeleteLater QScopedPointer QScopedArrayPointer QScopedValueRollback QScopeGuard QSet QSetIterator QMutableSetIterator QSharedData QSharedDataPointer QExplicitlySharedDataPointer QSharedPointer QWeakPointer QEnableSharedFromThis QSize QSizeF QStack QTimeLine QVarLengthArray QVector QVectorIterator QMutableVectorIterator QVersionNumber qtcoreversion.h QtCoreVersion QtCore + SYNCQT.PRIVATE_HEADER_FILES = animation/qabstractanimation_p.h animation/qanimationgroup_p.h animation/qparallelanimationgroup_p.h animation/qpropertyanimation_p.h animation/qsequentialanimationgroup_p.h animation/qvariantanimation_p.h codecs/cp949codetbl_p.h codecs/qbig5codec_p.h codecs/qeucjpcodec_p.h codecs/qeuckrcodec_p.h codecs/qgb18030codec_p.h codecs/qiconvcodec_p.h codecs/qicucodec_p.h codecs/qisciicodec_p.h codecs/qjiscodec_p.h codecs/qjpunicode_p.h codecs/qlatincodec_p.h codecs/qsimplecodec_p.h codecs/qsjiscodec_p.h codecs/qtextcodec_p.h codecs/qtsciicodec_p.h codecs/qutfcodec_p.h codecs/qwindowscodec_p.h global/minimum-linux_p.h global/qendian_p.h global/qglobal_p.h global/qhooks_p.h global/qlogging_p.h global/qmemory_p.h global/qnumeric_p.h global/qoperatingsystemversion_p.h global/qoperatingsystemversion_win_p.h global/qrandom_p.h global/qt_pch.h global/qtrace_p.h io/qabstractfileengine_p.h io/qdataurl_p.h io/qdebug_p.h io/qdir_p.h io/qfile_p.h io/qfiledevice_p.h io/qfileinfo_p.h io/qfileselector_p.h io/qfilesystemengine_p.h io/qfilesystementry_p.h io/qfilesystemiterator_p.h io/qfilesystemmetadata_p.h io/qfilesystemwatcher_fsevents_p.h io/qfilesystemwatcher_inotify_p.h io/qfilesystemwatcher_kqueue_p.h io/qfilesystemwatcher_p.h io/qfilesystemwatcher_polling_p.h io/qfilesystemwatcher_win_p.h io/qfsfileengine_iterator_p.h io/qfsfileengine_p.h io/qiodevice_p.h io/qipaddress_p.h io/qlockfile_p.h io/qloggingregistry_p.h io/qnoncontiguousbytedevice_p.h io/qprocess_p.h io/qresource_iterator_p.h io/qresource_p.h io/qsavefile_p.h io/qsettings_p.h io/qstorageinfo_p.h io/qtemporaryfile_p.h io/qtldurl_p.h io/qurl_p.h io/qurltlds_p.h io/qwindowspipereader_p.h io/qwindowspipewriter_p.h itemmodels/qabstractitemmodel_p.h itemmodels/qabstractproxymodel_p.h itemmodels/qitemselectionmodel_p.h itemmodels/qtransposeproxymodel_p.h kernel/qabstracteventdispatcher_p.h kernel/qcfsocketnotifier_p.h kernel/qcore_mac_p.h kernel/qcore_unix_p.h kernel/qcoreapplication_p.h kernel/qcorecmdlineargs_p.h kernel/qcoreglobaldata_p.h kernel/qdeadlinetimer_p.h kernel/qeventdispatcher_cf_p.h kernel/qeventdispatcher_glib_p.h kernel/qeventdispatcher_unix_p.h kernel/qeventdispatcher_win_p.h kernel/qeventdispatcher_winrt_p.h kernel/qeventloop_p.h kernel/qfunctions_fake_env_p.h kernel/qfunctions_p.h kernel/qjni_p.h kernel/qjnihelpers_p.h kernel/qmetaobject_moc_p.h kernel/qmetaobject_p.h kernel/qmetaobjectbuilder_p.h kernel/qmetatype_p.h kernel/qmetatypeswitcher_p.h kernel/qobject_p.h kernel/qpoll_p.h kernel/qppsattribute_p.h kernel/qppsattributeprivate_p.h kernel/qppsobject_p.h kernel/qppsobjectprivate_p.h kernel/qsharedmemory_p.h kernel/qsystemerror_p.h kernel/qsystemsemaphore_p.h kernel/qtimerinfo_unix_p.h kernel/qtranslator_p.h kernel/qvariant_p.h kernel/qwineventnotifier_p.h kernel/qwinregistry_p.h mimetypes/qmimedatabase_p.h mimetypes/qmimeglobpattern_p.h mimetypes/qmimemagicrule_p.h mimetypes/qmimemagicrulematcher_p.h mimetypes/qmimeprovider_p.h mimetypes/qmimetype_p.h mimetypes/qmimetypeparser_p.h plugin/qelfparser_p.h plugin/qfactoryloader_p.h plugin/qlibrary_p.h plugin/qmachparser_p.h plugin/qplugin_p.h plugin/qsystemlibrary_p.h serialization/qbinaryjson_p.h serialization/qbinaryjsonarray_p.h serialization/qbinaryjsonobject_p.h serialization/qbinaryjsonvalue_p.h serialization/qcborcommon_p.h serialization/qcborvalue_p.h serialization/qdatastream_p.h serialization/qjson_p.h serialization/qjsonparser_p.h serialization/qjsonwriter_p.h serialization/qtextstream_p.h serialization/qxmlstream_p.h serialization/qxmlutils_p.h statemachine/qabstractstate_p.h statemachine/qabstracttransition_p.h statemachine/qeventtransition_p.h statemachine/qfinalstate_p.h statemachine/qhistorystate_p.h statemachine/qsignaleventgenerator_p.h statemachine/qsignaltransition_p.h statemachine/qstate_p.h statemachine/qstatemachine_p.h text/qbytearray_p.h text/qbytedata_p.h text/qcollator_p.h text/qdoublescanprint_p.h text/qharfbuzz_p.h text/qlocale_data_p.h text/qlocale_p.h text/qlocale_tools_p.h text/qstringalgorithms_p.h text/qstringiterator_p.h text/qunicodetables_p.h text/qunicodetools_p.h thread/qfutex_p.h thread/qfutureinterface_p.h thread/qfuturewatcher_p.h thread/qlocking_p.h thread/qmutex_p.h thread/qorderedmutexlocker_p.h thread/qreadwritelock_p.h thread/qthread_p.h thread/qthreadpool_p.h thread/qwaitcondition_p.h time/qcalendarbackend_p.h time/qcalendarmath_p.h time/qdatetime_p.h time/qdatetimeparser_p.h time/qgregoriancalendar_p.h time/qhijricalendar_data_p.h time/qhijricalendar_p.h time/qislamiccivilcalendar_p.h time/qjalalicalendar_data_p.h time/qjalalicalendar_p.h time/qjuliancalendar_p.h time/qmilankoviccalendar_p.h time/qromancalendar_data_p.h time/qromancalendar_p.h time/qtimezoneprivate_data_p.h time/qtimezoneprivate_p.h tools/qduplicatetracker_p.h tools/qfreelist_p.h tools/qmakearray_p.h tools/qoffsetstringarray_p.h tools/qringbuffer_p.h tools/qscopedpointer_p.h tools/qsimd_p.h tools/qsimd_x86_p.h tools/qtools_p.h platform/wasm/qstdweb_p.h + SYNCQT.QPA_HEADER_FILES = +-SYNCQT.CLEAN_HEADER_FILES = animation/qabstractanimation.h:animation animation/qanimationgroup.h:animation animation/qparallelanimationgroup.h:animation animation/qpauseanimation.h:animation animation/qpropertyanimation.h:animation animation/qsequentialanimationgroup.h:animation animation/qvariantanimation.h:animation codecs/qtextcodec.h:textcodec global/qcompilerdetection.h global/qendian.h global/qflags.h global/qfloat16.h global/qglobal.h global/qglobalstatic.h global/qisenum.h global/qlibraryinfo.h global/qlogging.h global/qnamespace.h global/qnumeric.h global/qoperatingsystemversion.h global/qprocessordetection.h global/qrandom.h global/qsysinfo.h global/qsystemdetection.h global/qtypeinfo.h global/qtypetraits.h global/qversiontagging.h io/qbuffer.h io/qdebug.h io/qdir.h io/qdiriterator.h io/qfile.h io/qfiledevice.h io/qfileinfo.h io/qfileselector.h io/qfilesystemwatcher.h:filesystemwatcher io/qiodevice.h io/qlockfile.h io/qloggingcategory.h io/qprocess.h:processenvironment io/qresource.h io/qsavefile.h io/qsettings.h:settings io/qstandardpaths.h io/qstorageinfo.h io/qtemporarydir.h io/qtemporaryfile.h io/qurl.h io/qurlquery.h itemmodels/qabstractitemmodel.h:itemmodel itemmodels/qabstractproxymodel.h:proxymodel itemmodels/qconcatenatetablesproxymodel.h:concatenatetablesproxymodel itemmodels/qidentityproxymodel.h:identityproxymodel itemmodels/qitemselectionmodel.h:itemmodel itemmodels/qsortfilterproxymodel.h:sortfilterproxymodel itemmodels/qstringlistmodel.h:stringlistmodel itemmodels/qtransposeproxymodel.h:transposeproxymodel kernel/qabstracteventdispatcher.h kernel/qabstractnativeeventfilter.h kernel/qbasictimer.h kernel/qcoreapplication.h kernel/qcoreevent.h kernel/qdeadlinetimer.h kernel/qelapsedtimer.h kernel/qeventloop.h kernel/qfunctions_nacl.h kernel/qfunctions_vxworks.h kernel/qfunctions_winrt.h kernel/qmath.h kernel/qmetaobject.h kernel/qmetatype.h kernel/qmimedata.h kernel/qobject.h kernel/qobjectcleanuphandler.h kernel/qobjectdefs.h kernel/qpointer.h kernel/qsharedmemory.h kernel/qsignalmapper.h kernel/qsocketnotifier.h kernel/qsystemsemaphore.h kernel/qtestsupport_core.h kernel/qtimer.h kernel/qtranslator.h kernel/qvariant.h kernel/qwineventnotifier.h mimetypes/qmimedatabase.h:mimetype mimetypes/qmimetype.h:mimetype plugin/qfactoryinterface.h plugin/qlibrary.h:library plugin/qplugin.h plugin/qpluginloader.h plugin/quuid.h serialization/qcborarray.h serialization/qcborcommon.h serialization/qcbormap.h serialization/qcborstream.h serialization/qcborstreamreader.h:cborstreamreader serialization/qcborstreamwriter.h:cborstreamwriter serialization/qcborvalue.h serialization/qdatastream.h serialization/qjsonarray.h serialization/qjsondocument.h serialization/qjsonobject.h serialization/qjsonvalue.h serialization/qtextstream.h serialization/qxmlstream.h statemachine/qabstractstate.h:statemachine statemachine/qabstracttransition.h:statemachine statemachine/qeventtransition.h:qeventtransition statemachine/qfinalstate.h:statemachine statemachine/qhistorystate.h:statemachine statemachine/qsignaltransition.h:statemachine statemachine/qstate.h:statemachine statemachine/qstatemachine.h:statemachine text/qbytearray.h text/qbytearraylist.h text/qbytearraymatcher.h text/qchar.h text/qcollator.h text/qlocale.h text/qregexp.h text/qregularexpression.h:regularexpression text/qstring.h text/qstringalgorithms.h text/qstringbuilder.h text/qstringlist.h text/qstringliteral.h text/qstringmatcher.h text/qstringview.h text/qtextboundaryfinder.h thread/qatomic.h thread/qbasicatomic.h thread/qexception.h:future thread/qfuture.h:future thread/qfutureinterface.h:future thread/qfuturesynchronizer.h:future thread/qfuturewatcher.h:future thread/qmutex.h thread/qreadwritelock.h thread/qresultstore.h:future thread/qrunnable.h thread/qsemaphore.h:thread thread/qthread.h thread/qthreadpool.h:thread thread/qthreadstorage.h thread/qwaitcondition.h time/qcalendar.h time/qdatetime.h time/qtimezone.h:timezone tools/qalgorithms.h tools/qarraydata.h tools/qarraydataops.h tools/qarraydatapointer.h tools/qbitarray.h tools/qcache.h tools/qcommandlineoption.h:commandlineparser tools/qcommandlineparser.h:commandlineparser tools/qcontainerfwd.h tools/qcontiguouscache.h tools/qcryptographichash.h tools/qeasingcurve.h:easingcurve tools/qhash.h tools/qhashfunctions.h tools/qiterator.h tools/qline.h tools/qlinkedlist.h tools/qlist.h tools/qmap.h tools/qmargins.h tools/qmessageauthenticationcode.h tools/qpair.h tools/qpoint.h tools/qqueue.h tools/qrect.h tools/qrefcount.h tools/qscopedpointer.h tools/qscopedvaluerollback.h tools/qscopeguard.h tools/qset.h tools/qshareddata.h tools/qsharedpointer.h tools/qsize.h tools/qstack.h tools/qtimeline.h:easingcurve tools/qvarlengtharray.h tools/qvector.h tools/qversionnumber.h ++SYNCQT.CLEAN_HEADER_FILES = animation/qabstractanimation.h:animation animation/qanimationgroup.h:animation animation/qparallelanimationgroup.h:animation animation/qpauseanimation.h:animation animation/qpropertyanimation.h:animation animation/qsequentialanimationgroup.h:animation animation/qvariantanimation.h:animation codecs/qtextcodec.h:textcodec global/qcompilerdetection.h global/qendian.h global/qflags.h global/qfloat16.h global/qglobal.h global/qglobalstatic.h global/qisenum.h global/qlibraryinfo.h global/qlogging.h global/qnamespace.h global/qnumeric.h global/qoperatingsystemversion.h global/qprocessordetection.h global/qrandom.h global/qsysinfo.h global/qsystemdetection.h global/qtypeinfo.h global/qtypetraits.h global/qversiontagging.h io/qbuffer.h io/qdebug.h io/qdir.h io/qdiriterator.h io/qfile.h io/qfiledevice.h io/qfileinfo.h io/qfileselector.h io/qfilesystemwatcher.h:filesystemwatcher io/qiodevice.h io/qlockfile.h io/qloggingcategory.h io/qprocess.h:processenvironment io/qresource.h io/qsavefile.h io/qsettings.h:settings io/qstandardpaths.h io/qstorageinfo.h io/qtemporarydir.h io/qtemporaryfile.h io/qurl.h io/qurlquery.h itemmodels/qabstractitemmodel.h:itemmodel itemmodels/qabstractproxymodel.h:proxymodel itemmodels/qconcatenatetablesproxymodel.h:concatenatetablesproxymodel itemmodels/qidentityproxymodel.h:identityproxymodel itemmodels/qitemselectionmodel.h:itemmodel itemmodels/qsortfilterproxymodel.h:sortfilterproxymodel itemmodels/qstringlistmodel.h:stringlistmodel itemmodels/qtransposeproxymodel.h:transposeproxymodel kernel/qabstracteventdispatcher.h kernel/qabstractnativeeventfilter.h kernel/qbasictimer.h kernel/qcoreapplication.h kernel/qcoreevent.h kernel/qdeadlinetimer.h kernel/qelapsedtimer.h kernel/qeventloop.h kernel/qfunctions_nacl.h kernel/qfunctions_vxworks.h kernel/qfunctions_winrt.h kernel/qmath.h kernel/qmetaobject.h kernel/qmetatype.h kernel/qmimedata.h kernel/qobject.h kernel/qobjectcleanuphandler.h kernel/qobjectdefs.h kernel/qpointer.h kernel/qsharedmemory.h kernel/qsignalmapper.h kernel/qsocketnotifier.h kernel/qsystemsemaphore.h kernel/qtestsupport_core.h kernel/qtimer.h kernel/qtranslator.h kernel/qvariant.h kernel/qwineventnotifier.h mimetypes/qmimedatabase.h:mimetype mimetypes/qmimetype.h:mimetype plugin/qfactoryinterface.h plugin/qlibrary.h:library plugin/qplugin.h plugin/qpluginloader.h plugin/quuid.h serialization/qcborarray.h serialization/qcborcommon.h serialization/qcbormap.h serialization/qcborstream.h serialization/qcborstreamreader.h:cborstreamreader serialization/qcborstreamwriter.h:cborstreamwriter serialization/qcborvalue.h serialization/qdatastream.h serialization/qjsonarray.h serialization/qjsondocument.h serialization/qjsonobject.h serialization/qjsonvalue.h serialization/qtextstream.h serialization/qxmlstream.h statemachine/qabstractstate.h:statemachine statemachine/qabstracttransition.h:statemachine statemachine/qeventtransition.h:qeventtransition statemachine/qfinalstate.h:statemachine statemachine/qhistorystate.h:statemachine statemachine/qsignaltransition.h:statemachine statemachine/qstate.h:statemachine statemachine/qstatemachine.h:statemachine text/qbytearray.h text/qbytearraylist.h text/qbytearraymatcher.h text/qchar.h text/qcollator.h text/qlocale.h text/qregexp.h text/qregularexpression.h:regularexpression text/qstring.h text/qstringalgorithms.h text/qstringbuilder.h text/qstringlist.h text/qstringliteral.h text/qstringmatcher.h text/qstringview.h text/qtextboundaryfinder.h thread/qatomic.h thread/qbasicatomic.h thread/qexception.h:future thread/qfuture.h:future thread/qfutureinterface.h:future thread/qfuturesynchronizer.h:future thread/qfuturewatcher.h:future thread/qmutex.h thread/qreadwritelock.h thread/qresultstore.h:future thread/qrunnable.h thread/qsemaphore.h:thread thread/qthread.h thread/qthreadpool.h:thread thread/qthreadstorage.h thread/qwaitcondition.h thread/qtsan_impl.h time/qcalendar.h time/qdatetime.h time/qtimezone.h:timezone tools/qalgorithms.h tools/qarraydata.h tools/qarraydataops.h tools/qarraydatapointer.h tools/qbitarray.h tools/qcache.h tools/qcommandlineoption.h:commandlineparser tools/qcommandlineparser.h:commandlineparser tools/qcontainerfwd.h tools/qcontiguouscache.h tools/qcryptographichash.h tools/qeasingcurve.h:easingcurve tools/qhash.h tools/qhashfunctions.h tools/qiterator.h tools/qline.h tools/qlinkedlist.h tools/qlist.h tools/qmap.h tools/qmargins.h tools/qmessageauthenticationcode.h tools/qpair.h tools/qpoint.h tools/qqueue.h tools/qrect.h tools/qrefcount.h tools/qscopedpointer.h tools/qscopedvaluerollback.h tools/qscopeguard.h tools/qset.h tools/qshareddata.h tools/qsharedpointer.h tools/qsize.h tools/qstack.h tools/qtimeline.h:easingcurve tools/qvarlengtharray.h tools/qvector.h tools/qversionnumber.h + SYNCQT.INJECTIONS = src/corelib/global/qconfig.h:qconfig.h:QtConfig src/corelib/global/qconfig_p.h:5.15.15/QtCore/private/qconfig_p.h +diff --git a/include/QtCore/qtsan_impl.h b/include/QtCore/qtsan_impl.h +new file mode 100644 +index 00000000..e9209cbc +--- /dev/null ++++ b/include/QtCore/qtsan_impl.h +@@ -0,0 +1 @@ ++#include "../../src/corelib/thread/qtsan_impl.h" +diff --git a/src/corelib/thread/thread.pri b/src/corelib/thread/thread.pri +index 25cf68a3..8027a71e 100644 +--- a/src/corelib/thread/thread.pri ++++ b/src/corelib/thread/thread.pri +@@ -7,7 +7,8 @@ HEADERS += \ + thread/qthread.h \ + thread/qthreadstorage.h \ + thread/qwaitcondition_p.h \ +- thread/qwaitcondition.h ++ thread/qwaitcondition.h \ ++ thread/qtsan_impl.h + + SOURCES += \ + thread/qrunnable.cpp \ diff --git a/SOURCES/qtbase-5.15.10-work-around-pyside2-brokenness.patch b/SOURCES/qtbase-5.15.10-work-around-pyside2-brokenness.patch new file mode 100644 index 0000000..d094716 --- /dev/null +++ b/SOURCES/qtbase-5.15.10-work-around-pyside2-brokenness.patch @@ -0,0 +1,136 @@ +diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h +index 4aba9ff..439e51a 100644 +--- a/src/gui/kernel/qevent.h ++++ b/src/gui/kernel/qevent.h +@@ -104,15 +104,15 @@ protected: + class Q_GUI_EXPORT QMouseEvent : public QInputEvent + { + public: +- QMouseEvent(Type type, const QPointF &localPos, Qt::MouseButton button, ++ QMouseEvent(QEvent::Type type, const QPointF &localPos, Qt::MouseButton button, + Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); +- QMouseEvent(Type type, const QPointF &localPos, const QPointF &screenPos, ++ QMouseEvent(QEvent::Type type, const QPointF &localPos, const QPointF &screenPos, + Qt::MouseButton button, Qt::MouseButtons buttons, + Qt::KeyboardModifiers modifiers); +- QMouseEvent(Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos, ++ QMouseEvent(QEvent::Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos, + Qt::MouseButton button, Qt::MouseButtons buttons, + Qt::KeyboardModifiers modifiers); +- QMouseEvent(Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos, ++ QMouseEvent(QEvent::Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos, + Qt::MouseButton button, Qt::MouseButtons buttons, + Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source); + ~QMouseEvent(); +@@ -154,7 +154,7 @@ protected: + class Q_GUI_EXPORT QHoverEvent : public QInputEvent + { + public: +- QHoverEvent(Type type, const QPointF &pos, const QPointF &oldPos, Qt::KeyboardModifiers modifiers = Qt::NoModifier); ++ QHoverEvent(QEvent::Type type, const QPointF &pos, const QPointF &oldPos, Qt::KeyboardModifiers modifiers = Qt::NoModifier); + ~QHoverEvent(); + + #ifndef QT_NO_INTEGER_EVENT_COORDINATES +@@ -282,12 +282,12 @@ public: + #if QT_DEPRECATED_SINCE(5, 15) + // Actually deprecated since 5.4, in docs + QT_DEPRECATED_VERSION_X_5_15("Use the other QTabletEvent constructor") +- QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos, ++ QTabletEvent(QEvent::Type t, const QPointF &pos, const QPointF &globalPos, + int device, int pointerType, qreal pressure, int xTilt, int yTilt, + qreal tangentialPressure, qreal rotation, int z, + Qt::KeyboardModifiers keyState, qint64 uniqueID); // ### remove in Qt 6 + #endif +- QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos, ++ QTabletEvent(QEvent::Type t, const QPointF &pos, const QPointF &globalPos, + int device, int pointerType, qreal pressure, int xTilt, int yTilt, + qreal tangentialPressure, qreal rotation, int z, + Qt::KeyboardModifiers keyState, qint64 uniqueID, +@@ -377,9 +377,9 @@ protected: + class Q_GUI_EXPORT QKeyEvent : public QInputEvent + { + public: +- QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text = QString(), ++ QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text = QString(), + bool autorep = false, ushort count = 1); +- QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, ++ QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, + quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, + const QString &text = QString(), bool autorep = false, ushort count = 1); + ~QKeyEvent(); +@@ -399,7 +399,7 @@ public: + + // Functions for the extended key event information + #if QT_DEPRECATED_SINCE(5, 0) +- static inline QKeyEvent *createExtendedKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, ++ static inline QKeyEvent *createExtendedKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, + quint32 nativeScanCode, quint32 nativeVirtualKey, + quint32 nativeModifiers, + const QString& text = QString(), bool autorep = false, +@@ -682,7 +682,7 @@ class Q_GUI_EXPORT QDragMoveEvent : public QDropEvent + { + public: + QDragMoveEvent(const QPoint &pos, Qt::DropActions actions, const QMimeData *data, +- Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Type type = DragMove); ++ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type type = QEvent::DragMove); + ~QDragMoveEvent(); + + inline QRect answerRect() const { return rect; } +diff --git a/src/widgets/graphicsview/qgraphicssceneevent.h b/src/widgets/graphicsview/qgraphicssceneevent.h +index 9d940be..b7dc19b 100644 +--- a/src/widgets/graphicsview/qgraphicssceneevent.h ++++ b/src/widgets/graphicsview/qgraphicssceneevent.h +@@ -82,7 +82,7 @@ class QGraphicsSceneMouseEventPrivate; + class Q_WIDGETS_EXPORT QGraphicsSceneMouseEvent : public QGraphicsSceneEvent + { + public: +- explicit QGraphicsSceneMouseEvent(Type type = None); ++ explicit QGraphicsSceneMouseEvent(QEvent::Type type = QEvent::None); + ~QGraphicsSceneMouseEvent(); + + QPointF pos() const; +@@ -136,7 +136,7 @@ class QGraphicsSceneWheelEventPrivate; + class Q_WIDGETS_EXPORT QGraphicsSceneWheelEvent : public QGraphicsSceneEvent + { + public: +- explicit QGraphicsSceneWheelEvent(Type type = None); ++ explicit QGraphicsSceneWheelEvent(QEvent::Type type = QEvent::None); + ~QGraphicsSceneWheelEvent(); + + QPointF pos() const; +@@ -171,7 +171,7 @@ class Q_WIDGETS_EXPORT QGraphicsSceneContextMenuEvent : public QGraphicsSceneEve + public: + enum Reason { Mouse, Keyboard, Other }; + +- explicit QGraphicsSceneContextMenuEvent(Type type = None); ++ explicit QGraphicsSceneContextMenuEvent(QEvent::Type type = QEvent::None); + ~QGraphicsSceneContextMenuEvent(); + + QPointF pos() const; +@@ -198,7 +198,7 @@ class QGraphicsSceneHoverEventPrivate; + class Q_WIDGETS_EXPORT QGraphicsSceneHoverEvent : public QGraphicsSceneEvent + { + public: +- explicit QGraphicsSceneHoverEvent(Type type = None); ++ explicit QGraphicsSceneHoverEvent(QEvent::Type type = QEvent::None); + ~QGraphicsSceneHoverEvent(); + + QPointF pos() const; +@@ -231,7 +231,7 @@ class QGraphicsSceneHelpEventPrivate; + class Q_WIDGETS_EXPORT QGraphicsSceneHelpEvent : public QGraphicsSceneEvent + { + public: +- explicit QGraphicsSceneHelpEvent(Type type = None); ++ explicit QGraphicsSceneHelpEvent(QEvent::Type type = QEvent::None); + ~QGraphicsSceneHelpEvent(); + + QPointF scenePos() const; +@@ -249,7 +249,7 @@ class QGraphicsSceneDragDropEventPrivate; + class Q_WIDGETS_EXPORT QGraphicsSceneDragDropEvent : public QGraphicsSceneEvent + { + public: +- explicit QGraphicsSceneDragDropEvent(Type type = None); ++ explicit QGraphicsSceneDragDropEvent(QEvent::Type type = QEvent::None); + ~QGraphicsSceneDragDropEvent(); + + QPointF pos() const; diff --git a/SOURCES/qtbase-QTBUG-111994.patch b/SOURCES/qtbase-QTBUG-111994.patch new file mode 100644 index 0000000..a5edc75 --- /dev/null +++ b/SOURCES/qtbase-QTBUG-111994.patch @@ -0,0 +1,12 @@ +diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +index 00aa80cd..dd715b73 100644 +--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp ++++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +@@ -564,6 +564,7 @@ void QFontconfigDatabase::populateFontDatabase() + FcObjectSetAdd(os, *p); + ++p; + } ++ FcPatternAddBool(pattern, FC_VARIABLE, FcFalse); + fonts = FcFontList(nullptr, pattern, os); + FcObjectSetDestroy(os); + FcPatternDestroy(pattern); diff --git a/SOURCES/qtbase-QTBUG-112136.patch b/SOURCES/qtbase-QTBUG-112136.patch new file mode 100644 index 0000000..4d2450b --- /dev/null +++ b/SOURCES/qtbase-QTBUG-112136.patch @@ -0,0 +1,108 @@ +diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +index 159b490c..110f2dcf 100644 +--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp ++++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +@@ -951,6 +951,7 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef + QFontEngine::GlyphFormat format; + // try and get the pattern + FcPattern *pattern = FcPatternCreate(); ++ FcPattern *match = NULL; + + FcValue value; + value.type = FcTypeString; +@@ -977,7 +978,41 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef + FcConfigSubstitute(nullptr, pattern, FcMatchPattern); + FcDefaultSubstitute(pattern); + +- FcPattern *match = FcFontMatch(nullptr, pattern, &result); ++ if (!fid.filename.isEmpty()) { ++ // FC_INDEX is ignored during processing in FcFontMatch. ++ // So iterate FcPatterns directly and find it out. ++ FcFontSet *fcsets[2], *fcfs; ++ ++ fcsets[0] = FcConfigGetFonts(nullptr, FcSetSystem); ++ fcsets[1] = FcConfigGetFonts(nullptr, FcSetApplication); ++ for (int nset = 0; nset < 2; nset++) { ++ fcfs = fcsets[nset]; ++ for (int fnum = 0; fnum < fcfs->nfont; fnum++) { ++ FcPattern *fcpat = fcfs->fonts[fnum]; ++ FcChar8 *fcfile; ++ FcBool variable; ++ int fcindex; ++ ++ // FIXME: Ignore a FcPattern which has variable=true at this point. ++ if (FcPatternGetBool(fcpat, FC_VARIABLE, 0, &variable) == FcResultMatch && ++ variable == FcTrue) ++ continue; ++ if (FcPatternGetString(fcpat, FC_FILE, 0, &fcfile) == FcResultMatch && ++ FcPatternGetInteger(fcpat, FC_INDEX, 0, &fcindex) == FcResultMatch) { ++ QByteArray f = QByteArray::fromRawData((const char *)fcfile, ++ strlen((const char *)fcfile)); ++ if (f == fid.filename && fcindex == fid.index) { ++ // We found it. ++ match = FcFontRenderPrepare(nullptr, pattern, fcpat); ++ goto bail; ++ } ++ } ++ } ++ } ++ } ++bail: ++ if (!match) ++ match = FcFontMatch(nullptr, pattern, &result); + if (match) { + engine->setDefaultHintStyle(defaultHintStyleFromMatch((QFont::HintingPreference)fontDef.hintingPreference, match, useXftConf)); + +@@ -997,6 +1032,11 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef + antialias = fc_antialias; + } + ++ FcBool embolden; ++ engine->auto_embolden = true; ++ if (FcPatternGetBool(match, FC_EMBOLDEN, 0, &embolden) == FcResultMatch) ++ engine->embolden = embolden; ++ + if (antialias) { + QFontEngine::SubpixelAntialiasingType subpixelType = QFontEngine::Subpixel_None; + if (!(fontDef.styleStrategy & QFont::NoSubpixelAntialias)) +diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp +index 52ce36b0..9626490b 100644 +--- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp ++++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp +@@ -681,6 +681,7 @@ QFontEngineFT::QFontEngineFT(const QFontDef &fd) + kerning_pairs_loaded = false; + transform = false; + embolden = false; ++ auto_embolden = false; + obliquen = false; + antialias = true; + freetype = nullptr; +@@ -748,7 +749,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format, + FT_Set_Transform(face, &matrix, nullptr); + freetype->matrix = matrix; + // fake bold +- if ((fontDef.weight >= QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face) && !qEnvironmentVariableIsSet("QT_NO_SYNTHESIZED_BOLD")) { ++ if (!auto_embolden && (fontDef.weight >= QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face) && !qEnvironmentVariableIsSet("QT_NO_SYNTHESIZED_BOLD")) { + if (const TT_OS2 *os2 = reinterpret_cast(FT_Get_Sfnt_Table(face, ft_sfnt_os2))) { + if (os2->usWeightClass < 700 && + (fontDef.pixelSize < 64 || qEnvironmentVariableIsSet("QT_NO_SYNTHESIZED_BOLD_LIMIT"))) { +@@ -2104,6 +2105,7 @@ bool QFontEngineFT::initFromFontEngine(const QFontEngineFT *fe) + antialias = fe->antialias; + transform = fe->transform; + embolden = fe->embolden; ++ auto_embolden = fe->auto_embolden; + obliquen = fe->obliquen; + subpixelType = fe->subpixelType; + lcdFilterType = fe->lcdFilterType; +diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h b/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h +index 2e3aef69..4372f913 100644 +--- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h ++++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h +@@ -295,6 +295,7 @@ protected: + bool cacheEnabled; + bool forceAutoHint; + bool stemDarkeningDriver; ++ bool auto_embolden; // a flag to decide if embolden is set by fontconfig + + private: + friend class QFontEngineFTRawFont; diff --git a/SOURCES/qtbase-everywhere-src-5.12.1-qt5gui_cmake_isystem_includes.patch b/SOURCES/qtbase-everywhere-src-5.12.1-qt5gui_cmake_isystem_includes.patch new file mode 100644 index 0000000..ff00e63 --- /dev/null +++ b/SOURCES/qtbase-everywhere-src-5.12.1-qt5gui_cmake_isystem_includes.patch @@ -0,0 +1,14 @@ +diff -up qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in +--- qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo 2019-04-30 15:18:24.886346423 -0500 ++++ qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in 2019-04-30 15:19:48.303873296 -0500 +@@ -66,8 +66,10 @@ unset(_GL_INCDIRS) + # Don\'t check for existence of the "_qt5gui_OPENGL_INCLUDE_DIR" because it is + # optional. + ++if (NOT ${_qt5gui_OPENGL_INCLUDE_DIR} STREQUAL "/usr/include") + list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR}) + set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR}) ++endif() + + unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE) + diff --git a/SOURCES/qtbase-everywhere-src-5.14.2-no_relocatable.patch b/SOURCES/qtbase-everywhere-src-5.14.2-no_relocatable.patch new file mode 100644 index 0000000..56b9db8 --- /dev/null +++ b/SOURCES/qtbase-everywhere-src-5.14.2-no_relocatable.patch @@ -0,0 +1,16 @@ +diff -up qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp.no_relocatable qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp +--- qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp.no_relocatable 2020-03-27 04:49:31.000000000 -0500 ++++ qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp 2020-04-13 15:13:44.075705226 -0500 +@@ -671,8 +671,11 @@ static QString getPrefix( + # if QT_CONFIGURE_CROSSBUILD + if (group == QLibraryInfo::DevicePaths) + return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH); +-# endif ++# elif 0 //QT_CONFIG(relocatable) + return getExtPrefixFromHostBinDir(); ++# else ++ return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH); ++# endif + #elif QT_CONFIG(relocatable) + return getRelocatablePrefix(); + #else diff --git a/SOURCES/qtbase-everywhere-src-5.15.2-libglvnd.patch b/SOURCES/qtbase-everywhere-src-5.15.2-libglvnd.patch new file mode 100644 index 0000000..e819f8d --- /dev/null +++ b/SOURCES/qtbase-everywhere-src-5.15.2-libglvnd.patch @@ -0,0 +1,15 @@ +diff -up qtbase-everywhere-src-5.15.2/src/gui/configure.json.libglvnd qtbase-everywhere-src-5.15.2/src/gui/configure.json +--- qtbase-everywhere-src-5.15.2/src/gui/configure.json.libglvnd 2020-10-27 03:02:11.000000000 -0500 ++++ qtbase-everywhere-src-5.15.2/src/gui/configure.json 2021-09-10 10:05:53.610312223 -0500 +@@ -847,9 +847,9 @@ + ], + "include": [ "EGL/egl.h", "X11/Xlib.h" ], + "main": [ +- "Display *dpy = EGL_DEFAULT_DISPLAY;", ++ "Display *dpy = reinterpret_cast(EGL_DEFAULT_DISPLAY);", + "EGLNativeDisplayType egldpy = XOpenDisplay(\"\");", +- "dpy = egldpy;", ++ "dpy = reinterpret_cast(egldpy);", + "EGLNativeWindowType w = XCreateWindow(dpy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);", + "XDestroyWindow(dpy, w);", + "XCloseDisplay(dpy);" diff --git a/SOURCES/qtbase-everywhere-src-5.15.6-private_api_warning.patch b/SOURCES/qtbase-everywhere-src-5.15.6-private_api_warning.patch new file mode 100644 index 0000000..16cc9af --- /dev/null +++ b/SOURCES/qtbase-everywhere-src-5.15.6-private_api_warning.patch @@ -0,0 +1,12 @@ +diff -up qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h.private_api_warning qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h +--- qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h.private_api_warning 2022-10-11 09:08:33.712070523 -0500 ++++ qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h 2022-10-11 09:10:58.647038619 -0500 +@@ -435,7 +435,7 @@ inline void QObjectPrivate::checkForInco + Q_UNUSED(version); + #else + if (Q_UNLIKELY(version != QObjectPrivateVersion)) { +- qFatal("Cannot mix incompatible Qt library (%d.%d.%d) with this library (%d.%d.%d)", ++ qWarning("Cannot mix incompatible Qt library (%d.%d.%d) with this library (%d.%d.%d)", + (version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff, + (QObjectPrivateVersion >> 16) & 0xff, (QObjectPrivateVersion >> 8) & 0xff, QObjectPrivateVersion & 0xff); + } diff --git a/SOURCES/qtbase-hidpi_scale_at_192.patch b/SOURCES/qtbase-hidpi_scale_at_192.patch new file mode 100644 index 0000000..c8139f6 --- /dev/null +++ b/SOURCES/qtbase-hidpi_scale_at_192.patch @@ -0,0 +1,12 @@ +diff -up qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp.hidpi_scale_at_192 qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp +--- qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp.hidpi_scale_at_192 2019-02-03 13:21:27.866906481 -0600 ++++ qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp 2019-02-03 13:23:47.554767565 -0600 +@@ -744,7 +744,7 @@ void QXcbScreen::updateGeometry(const QR + // Use 128 as a reference DPI on small screens. This favors "small UI" over "large UI". + qreal referenceDpi = physicalSize().width() <= 320 ? 128 : 96; + +- m_pixelDensity = qMax(1, qRound(dpi/referenceDpi)); ++ m_pixelDensity = qMax(1, (int) (dpi/referenceDpi)); //instead of rounding at 1.5, round at 2.0 (same as GNOME) + m_geometry = geometry; + m_availableGeometry = geometry & m_virtualDesktop->workArea(); + QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry); diff --git a/SOURCES/qtbase-multilib_optflags.patch b/SOURCES/qtbase-multilib_optflags.patch new file mode 100644 index 0000000..5498e79 --- /dev/null +++ b/SOURCES/qtbase-multilib_optflags.patch @@ -0,0 +1,33 @@ +diff -r -u a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf +--- a/mkspecs/linux-g++/qmake.conf 2015-10-30 06:20:01.000000000 -0200 ++++ b/mkspecs/linux-g++/qmake.conf 2015-11-05 11:23:23.230741601 -0200 +@@ -5,6 +5,7 @@ + MAKEFILE_GENERATOR = UNIX + CONFIG += incremental + QMAKE_INCREMENTAL_STYLE = sublib ++QMAKE_CFLAGS_RELEASE += -O2 + + include(../common/linux.conf) + include(../common/gcc-base-unix.conf) +diff -r -u a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf +--- a/mkspecs/linux-g++-32/qmake.conf 2015-10-30 06:20:01.000000000 -0200 ++++ b/mkspecs/linux-g++-32/qmake.conf 2015-11-05 11:22:19.761494470 -0200 +@@ -10,6 +10,7 @@ + + QMAKE_CFLAGS = -m32 + QMAKE_LFLAGS = -m32 ++QMAKE_CFLAGS_RELEASE += -O2 + + include(../common/gcc-base-unix.conf) + include(../common/g++-unix.conf) +diff -r -u a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf +--- a/mkspecs/linux-g++-64/qmake.conf 2015-10-30 06:20:01.000000000 -0200 ++++ b/mkspecs/linux-g++-64/qmake.conf 2015-11-05 11:22:49.497610248 -0200 +@@ -13,6 +13,7 @@ + + QMAKE_CFLAGS = -m64 + QMAKE_LFLAGS = -m64 ++QMAKE_CFLAGS_RELEASE += -O2 + + include(../common/gcc-base-unix.conf) + include(../common/g++-unix.conf) diff --git a/SOURCES/qtbase-opensource-src-5.7.1-moc_macros.patch b/SOURCES/qtbase-opensource-src-5.7.1-moc_macros.patch new file mode 100644 index 0000000..75dc9ff --- /dev/null +++ b/SOURCES/qtbase-opensource-src-5.7.1-moc_macros.patch @@ -0,0 +1,15 @@ +diff -up qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp.moc_WORDSIZE qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp +--- qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp.moc_WORDSIZE 2016-12-01 02:17:04.000000000 -0600 ++++ qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp 2016-12-08 12:37:28.931589338 -0600 +@@ -179,6 +179,11 @@ int runMoc(int argc, char **argv) + Moc moc; + pp.macros["Q_MOC_RUN"]; + pp.macros["__cplusplus"]; ++ pp.macros["_SYS_SYSMACROS_H_OUTER"]; ++ Macro macro; ++ macro.symbols = Preprocessor::tokenize(QByteArray::number(Q_PROCESSOR_WORDSIZE*8), 1, Preprocessor::TokenizeDefine); ++ macro.symbols.removeLast(); // remove the EOF symbol ++ pp.macros.insert("__WORDSIZE", macro); + + // Don't stumble over GCC extensions + Macro dummyVariadicFunctionMacro; diff --git a/SOURCES/qtbase-opensource-src-5.8.0-QT_VERSION_CHECK.patch b/SOURCES/qtbase-opensource-src-5.8.0-QT_VERSION_CHECK.patch new file mode 100644 index 0000000..d94caf4 --- /dev/null +++ b/SOURCES/qtbase-opensource-src-5.8.0-QT_VERSION_CHECK.patch @@ -0,0 +1,11 @@ +--- qtbase-opensource-src-5.8.0/src/corelib/global/qglobal.h.orig 2017-01-26 10:45:40.905010896 +0100 ++++ qtbase-opensource-src-5.8.0/src/corelib/global/qglobal.h 2017-01-26 10:46:50.299858887 +0100 +@@ -55,7 +55,7 @@ + /* + can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) + */ +-#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) ++#define QT_VERSION_CHECK(qt_version_check_major, qt_version_check_minor, qt_version_check_patch) ((qt_version_check_major<<16)|(qt_version_check_minor<<8)|(qt_version_check_patch)) + + #ifdef QT_BOOTSTRAPPED + #include diff --git a/SOURCES/qtbase-opensource-src-5.9.0-mysql.patch b/SOURCES/qtbase-opensource-src-5.9.0-mysql.patch new file mode 100644 index 0000000..c190ca6 --- /dev/null +++ b/SOURCES/qtbase-opensource-src-5.9.0-mysql.patch @@ -0,0 +1,12 @@ +diff -up qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql.cpp.than qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql.cpp +diff -up qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.than qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h +--- qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.than 2017-07-14 13:43:50.831203768 +0200 ++++ qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h 2017-07-14 13:44:24.364948006 +0200 +@@ -58,6 +58,7 @@ + #endif + + #include ++#include + + #ifdef QT_PLUGIN + #define Q_EXPORT_SQLDRIVER_MYSQL diff --git a/SOURCES/qtbase-qfutureinterface-fix-build-with-gcc14.patch b/SOURCES/qtbase-qfutureinterface-fix-build-with-gcc14.patch new file mode 100644 index 0000000..85c1b85 --- /dev/null +++ b/SOURCES/qtbase-qfutureinterface-fix-build-with-gcc14.patch @@ -0,0 +1,30 @@ +From 111c08d0eaa134652f1f1e602ead1a539614258f Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Mon, 11 Mar 2024 11:24:00 -0400 +Subject: [PATCH] QFutureInterface: fix build with GCC14/C++20: template-id not + allowed + +When declaring a constructor, you must use the injected name, not a +template. + +qfutureinterface.h:472:37: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor] + +Pick-to: 6.6 6.7 +Change-Id: I6818d78a57394e37857bfffd17bbbf2313001cbf +Reviewed-by: Ahmad Samir +--- + src/corelib/thread/qfutureinterface.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h +index fa5e8ea7bab..180a59a94e7 100644 +--- a/src/corelib/thread/qfutureinterface.h ++++ b/src/corelib/thread/qfutureinterface.h +@@ -469,7 +469,7 @@ template <> + class QFutureInterface : public QFutureInterfaceBase + { + public: +- explicit QFutureInterface(State initialState = NoState) ++ explicit QFutureInterface(State initialState = NoState) + : QFutureInterfaceBase(initialState) + { } diff --git a/SOURCES/qtbase-qmake_LFLAGS.patch b/SOURCES/qtbase-qmake_LFLAGS.patch new file mode 100644 index 0000000..fbb37dd --- /dev/null +++ b/SOURCES/qtbase-qmake_LFLAGS.patch @@ -0,0 +1,12 @@ +diff -up qtbase-everywhere-src-5.10.1/qmake/Makefile.unix.qmake_LFLAGS qtbase-everywhere-src-5.10.1/qmake/Makefile.unix +--- qtbase-everywhere-src-5.10.1/qmake/Makefile.unix.qmake_LFLAGS 2018-02-08 12:24:48.000000000 -0600 ++++ qtbase-everywhere-src-5.10.1/qmake/Makefile.unix 2018-02-15 10:25:07.077763061 -0600 +@@ -142,7 +142,7 @@ CPPFLAGS = -g $(EXTRA_CPPFLAGS) \ + -DQT_NO_FOREACH + + CXXFLAGS = $(EXTRA_CXXFLAGS) $(CONFIG_CXXFLAGS) $(CPPFLAGS) +-LFLAGS = $(EXTRA_LFLAGS) $(CONFIG_LFLAGS) ++LFLAGS = $(EXTRA_LFLAGS) $(CONFIG_LFLAGS) $(QMAKE_LFLAGS_RELEASE) + + first all: $(BUILD_PATH)/bin/qmake$(EXEEXT) + qmake: $(BUILD_PATH)/bin/qmake$(EXEEXT) diff --git a/SOURCES/qtbase-use-qgnomeplatform-as-default-platform-theme-on-gnome.patch b/SOURCES/qtbase-use-qgnomeplatform-as-default-platform-theme-on-gnome.patch new file mode 100644 index 0000000..bff7412 --- /dev/null +++ b/SOURCES/qtbase-use-qgnomeplatform-as-default-platform-theme-on-gnome.patch @@ -0,0 +1,13 @@ +diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +index 6e01af052c..fc67477ba9 100644 +--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp ++++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +@@ -868,6 +868,8 @@ QStringList QGenericUnixTheme::themeNames() + result.push_back(QLatin1String(QKdeTheme::name)); + #endif + } else if (gtkBasedEnvironments.contains(desktopName)) { ++ // prefer the QGnomePlatform theme ++ result.push_back(QStringLiteral("qgnomeplatform")); + // prefer the GTK3 theme implementation with native dialogs etc. + result.push_back(QStringLiteral("gtk3")); + // fallback to the generic Gnome theme if loading the GTK3 theme fails diff --git a/SOURCES/qtlogging.ini b/SOURCES/qtlogging.ini new file mode 100644 index 0000000..ead33b6 --- /dev/null +++ b/SOURCES/qtlogging.ini @@ -0,0 +1,3 @@ +[Rules] +*.debug=false +qt.qpa.xcb.xcberror.warning=false diff --git a/SPECS/qt5-qtbase.spec b/SPECS/qt5-qtbase.spec new file mode 100644 index 0000000..ad2b1a4 --- /dev/null +++ b/SPECS/qt5-qtbase.spec @@ -0,0 +1,2582 @@ +# See http://bugzilla.redhat.com/223663 +%global multilib_archs x86_64 %{ix86} %{?mips} ppc64 ppc s390x s390 sparc64 sparcv9 +%global multilib_basearchs x86_64 %{?mips64} ppc64 s390x sparc64 + +%if 0%{?fedora} < 29 && 0%{?rhel} < 9 +%ifarch %{ix86} +%global no_sse2 -no-sse2 +%endif +%endif + + +# workaround https://bugzilla.redhat.com/show_bug.cgi?id=1668865 +# for current stable releases +%if 0%{?fedora} < 30 || 0%{?rhel} > 6 +%global no_feature_statx -no-feature-statx +%global no_feature_renameat2 -no-feature-renameat2 +%endif +%if 0%{?rhel} && 0%{?rhel} > 6 +%global no_feature_getentropy -no-feature-getentropy +%endif + +# support qtchooser (adds qtchooser .conf file) +%if 0%{?flatpak} +%global qtchooser 0 +%else +%global qtchooser 1 +%endif +%if 0%{?qtchooser} +%global priority 10 +%ifarch %{multilib_basearchs} +%global priority 15 +%endif +%endif + +# Disable automatic .la file removal +%global __brp_remove_la_files %nil + +%global platform linux-g++ + +%if 0%{?use_clang} +%global platform linux-clang +%endif + +%global qt_module qtbase + +%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) + +# use external qt_settings pkg +%if 0%{?fedora} +%global qt_settings 1 +%endif + +%global examples 1 +## skip for now, until we're better at it --rex +#global tests 1 + +Name: qt5-qtbase +Summary: Qt5 - QtBase components +Version: 5.15.15 +Release: 1%{?dist} + +# See LGPL_EXCEPTIONS.txt, for exception details +License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +Url: http://qt-project.org/ +%global majmin %(echo %{version} | cut -d. -f1-2) +Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-opensource-src-%{version}.tar.xz + +# https://bugzilla.redhat.com/show_bug.cgi?id=1227295 +Source1: qtlogging.ini + +# header file to workaround multilib issue +# https://bugzilla.redhat.com/show_bug.cgi?id=1036956 +Source5: qconfig-multilib.h + +# xinitrc script to check for OpenGL 1 only drivers and automatically set +# QT_XCB_FORCE_SOFTWARE_OPENGL for them +Source6: 10-qt5-check-opengl2.sh + +# macros +Source10: macros.qt5-qtbase + +# support multilib optflags +Patch2: qtbase-multilib_optflags.patch + +# make mixing versions with private apis a warning instead of fatal error +Patch3: qtbase-everywhere-src-5.15.6-private_api_warning.patch + +# upstreamable patches +# namespace QT_VERSION_CHECK to workaround major/minor being pre-defined (#1396755) +Patch50: qtbase-opensource-src-5.8.0-QT_VERSION_CHECK.patch + +# 1381828 - Broken window scaling for some QT5 applications (#1381828) +# This patch moves the threshold for 2x scaling from the DPI of 144 to 192, +# the same value GNOME uses. It's not a complete solution... +Patch51: qtbase-hidpi_scale_at_192.patch + +# 1. Workaround moc/multilib issues +# https://bugzilla.redhat.com/show_bug.cgi?id=1290020 +# https://bugreports.qt.io/browse/QTBUG-49972 +# 2. Workaround sysmacros.h (pre)defining major/minor a breaking stuff +Patch52: qtbase-opensource-src-5.7.1-moc_macros.patch + +# CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui +# https://bugzilla.redhat.com/1704474 +Patch53: qtbase-everywhere-src-5.12.1-qt5gui_cmake_isystem_includes.patch + +# respect QMAKE_LFLAGS_RELEASE when building qmake +Patch54: qtbase-qmake_LFLAGS.patch + +# don't use relocatable heuristics to guess prefix when using -no-feature-relocatable +Patch55: qtbase-everywhere-src-5.14.2-no_relocatable.patch + +# fix FTBFS against libglvnd-1.3.4+ +Patch56: qtbase-everywhere-src-5.15.2-libglvnd.patch + +# drop -O3 and make -O2 by default +Patch57: qt5-qtbase-cxxflag.patch + +# support firebird version 3.x +Patch58: qt5-qtbase-5.12.1-firebird.patch + +# support firebird version 4.x +Patch59: qt5-qtbase-5.12.1-firebird-4.0.0.patch + +# fix for new mariadb +Patch60: qtbase-opensource-src-5.9.0-mysql.patch + +# FIXME This patch is completely meaningless in the context of C++. +# It is a workaround for a pyside2 build failure with Qt 5.15.9, +# pyside2 5.15.9, clang 16.0.1 -- the generated code thinks a +# not otherwise specified "Type" is in fact a +# QFlags, causing many functions +# looking for a QEvent::Type to be bogus. +# Since there are no side effects to superfluously specifying +# QEvent::Type instead of plain "Type" in a QEvent derived class, +# this workaround is acceptable, if not nice. +Patch61: qtbase-5.15.10-work-around-pyside2-brokenness.patch + +# Bug 1954359 - Many emoji don't show up in Qt apps because qt does not handle 'emoji' font family +# Patch63: qtbase-cache-emoji-font.patch + +# gcc-11 +Patch90: %{name}-gcc11.patch + +## upstream patches +# https://invent.kde.org/qt/qt/qtbase, kde/5.15 branch +# git diff v5.15.15-lts-lgpl..HEAD | gzip > kde-5.15-rollup-$(date +%Y%m%d).patch.gz +# patch100 in lookaside cache due to large'ish size -- rdieter +Patch100: kde-5.15-rollup-20240904.patch.gz +# HACK to make 'fedpkg sources' consider it 'used" +Source100: kde-5.15-rollup-20240904.patch.gz + +Patch101: qtbase-5.15.10-fix-missing-qtsan-include.patch +# Workaround for font rendering issue with cjk-vf-fonts +# https://bugreports.qt.io/browse/QTBUG-111994 +# https://bugreports.qt.io/browse/QTBUG-112136 +Patch102: qtbase-QTBUG-111994.patch +Patch103: qtbase-QTBUG-112136.patch +Patch104: qtbase-qfutureinterface-fix-build-with-gcc14.patch + +## Qt 6 backports for better Gtk/GNOME integration +# https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome +# https://bugzilla.redhat.com/show_bug.cgi?id=1732129 +Patch150: 0001-Use-Wayland-by-default-on-GNOME.patch + +# https://fedoraproject.org/wiki/Changes/NoCustomQtThemingForWorkstation +# https://bugzilla.redhat.com/show_bug.cgi?id=2226797 +Patch151: 0002-Add-enum-class-Qt-Appearance.patch +Patch152: 0003-Sync-and-assert-StandardPixmap-enums-in-QPlatformThe.patch +Patch153: 0004-QGtk3Theme-subscribe-to-theme-hint-changes.patch +# Patch154: 0005-Gtk3Theme-set-XCURSOR_SIZE-and-XCURSOR_THEME-for-way.patch +Patch155: 0006-Re-implement-palette-standardPixmap-file-icons-fonts.patch +# Patch156: 0007-GTK3-theme-simplify-code.patch +Patch157: 0008-Fix-checkbox-and-radiobutton-background-in-QGtk3Them.patch +Patch158: 0009-Cleanup-QGtk3Theme.patch +Patch159: 0010-Detect-appearance-by-colors-unless-GTK-theme-name-co.patch +Patch160: 0011-Change-parsing-log-output-in-QGtk3Json-from-qCDebug-.patch +Patch161: 0012-Document-QGtk3Interface.patch +Patch162: 0013-Document-QGtk3Storage.patch +Patch163: 0014-QGtk3Theme-Improve-fixed-font-delivery.patch +Patch164: 0015-QGtk3Theme-Do-not-default-Active-WindowText-to-butto.patch +Patch165: 0016-Fix-memory-leak-in-QGtk3Interface-themename.patch +Patch166: 0017-Fix-disabled-button-color-in-Linux-x11-wayland.patch +Patch167: 0018-Fix-inactive-palette-in-gtk3-theme.patch +Patch168: 0019-Fix-tooltip-palette-issue-in-gtk3-theme.patch +Patch169: 0020-QGtk3Theme-define-light-midlight-mid-dark-shadow-colors.patch + +# Latest QGnomePlatform needs to be specified to be used +Patch200: qtbase-use-qgnomeplatform-as-default-platform-theme-on-gnome.patch + +# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. +# Those themes are there for platform integration. If the required libraries are +# not there, the platform to integrate with isn't either. Then Qt will just +# silently ignore the plugin that fails to load. Thus, there is no need to let +# RPM drag in gtk3 as a dependency for the GTK+3 dialog support. +%global __requires_exclude_from ^%{_qt5_plugindir}/platformthemes/.*$ +# filter plugin provides +%global __provides_exclude_from ^%{_qt5_plugindir}/.*\\.so$ + +%if 0%{?use_clang} +BuildRequires: clang >= 3.7.0 +%else +BuildRequires: gcc-c++ +%endif +BuildRequires: make +BuildRequires: cups-devel +BuildRequires: desktop-file-utils +BuildRequires: double-conversion-devel +BuildRequires: findutils +BuildRequires: libjpeg-devel +BuildRequires: libmng-devel +BuildRequires: libtiff-devel +BuildRequires: pkgconfig(alsa) +# required for -accessibility +BuildRequires: pkgconfig(atspi-2) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(libproxy-1.0) +BuildRequires: pkgconfig(libsctp) +# xcb-sm +BuildRequires: pkgconfig(ice) pkgconfig(sm) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libudev) +BuildRequires: openssl-devel +BuildRequires: pkgconfig(libpulse) pkgconfig(libpulse-mainloop-glib) +BuildRequires: pkgconfig(libinput) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(xcb-xkb) >= 1.10 +BuildRequires: pkgconfig(xcb-util) +BuildRequires: pkgconfig(xkbcommon) >= 0.4.1 +BuildRequires: pkgconfig(xkbcommon-x11) >= 0.4.1 +BuildRequires: pkgconfig(xkeyboard-config) +%global vulkan 1 +BuildRequires: pkgconfig(vulkan) +%if 0%{?fedora} || 0%{?rhel} > 6 +%global egl 1 +BuildRequires: libEGL-devel +BuildRequires: pkgconfig(gbm) +## TODO: apparently only needed if building opengl_es2 support, do we actually use it? -- rex +BuildRequires: pkgconfig(glesv2) +%global sqlite -system-sqlite +BuildRequires: pkgconfig(sqlite3) >= 3.7 +%if 0%{?fedora} > 22 +%global harfbuzz -system-harfbuzz +BuildRequires: pkgconfig(harfbuzz) >= 0.9.42 +%endif +BuildRequires: pkgconfig(icu-i18n) +%if 0%{?fedora} > 37 || 0%{?rhel} > 7 +BuildRequires: pkgconfig(libpcre2-16) >= 10.20 +%else +BuildRequires: pkgconfig(libpcre) >= 8.0 +%endif +%global pcre -system-pcre +BuildRequires: pkgconfig(xcb-xkb) +%else +BuildRequires: libicu-devel +%global pcre -qt-pcre +%endif +BuildRequires: pkgconfig(xcb) pkgconfig(xcb-glx) pkgconfig(xcb-icccm) pkgconfig(xcb-image) pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(libzstd) +BuildRequires: perl-generators +# see patch68 +BuildRequires: python3 +BuildRequires: qt5-rpm-macros + +%if 0%{?tests} +BuildRequires: dbus-x11 +BuildRequires: mesa-dri-drivers +BuildRequires: time +BuildRequires: xorg-x11-server-Xvfb +%endif + +Requires: qt5-filesystem + +%if 0%{?qtchooser} +%if 0%{?fedora} +Conflicts: qt < 1:4.8.6-10 +%endif +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives +%endif +%if 0%{?qt_settings} +Requires: qt-settings +%endif +Requires: %{name}-common = %{version}-%{release} + +## Sql drivers +%if 0%{?rhel} +%global ibase -no-sql-ibase +%global tds -no-sql-tds +%endif + +# workaround gold linker bug(s) by not using it +# https://bugzilla.redhat.com/1458003 +# https://sourceware.org/bugzilla/show_bug.cgi?id=21074 +# reportedly fixed or worked-around, re-enable if there's evidence of problems -- rex +# https://bugzilla.redhat.com/show_bug.cgi?id=1635973 +%global use_gold_linker -no-use-gold-linker + +%description +Qt is a software toolkit for developing applications. + +This package contains base tools, like string, xml, and network +handling. + +%package common +Summary: Common files for Qt5 +# offer upgrade path for qtquick1 somewhere... may as well be here -- rex +Obsoletes: qt5-qtquick1 < 5.9.0 +Obsoletes: qt5-qtquick1-devel < 5.9.0 +%if "%{?ibase}" == "-no-sql-ibase" +Obsoletes: qt5-qtbase-ibase < %{version}-%{release} +%endif +%if "%{?tds}" == "-no-sql-tds" +Obsoletes: qt5-qtbase-tds < %{version}-%{release} +%endif +Requires: %{name} = %{version}-%{release} +BuildArch: noarch +%description common +%{summary}. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-gui%{?_isa} +%if 0%{?egl} +Requires: libEGL-devel +%endif +Requires: pkgconfig(gl) +%if 0%{?vulkan} +Requires: pkgconfig(vulkan) +%endif +Requires: qt5-rpm-macros +%if 0%{?use_clang} +Requires: clang >= 3.7.0 +%endif +%description devel +%{summary}. + +%package private-devel +Summary: Development files for %{name} private APIs +# upgrade path, when private-devel was introduced +Obsoletes: %{name}-devel < 5.12.1-3 +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +# QtPrintSupport/private requires cups/ppd.h +Requires: cups-devel +%description private-devel +%{summary}. + +%package examples +Summary: Programming examples for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description examples +%{summary}. + +%package static +Summary: Static library files for %{name} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Requires: pkgconfig(fontconfig) +Requires: pkgconfig(glib-2.0) +Requires: pkgconfig(libinput) +Requires: pkgconfig(xkbcommon) +Requires: pkgconfig(zlib) + +%description static +%{summary}. + +%if "%{?ibase}" != "-no-sql-ibase" +%package ibase +Summary: IBase driver for Qt5's SQL classes +BuildRequires: firebird-devel +Requires: %{name}%{?_isa} = %{version}-%{release} +%description ibase +%{summary}. +%endif + +%package mysql +Summary: MySQL driver for Qt5's SQL classes +%if 0%{?rhel} && 0%{?rhel} < 9 +BuildRequires: mysql-devel +%else +BuildRequires: mariadb-connector-c-devel +%endif +Requires: %{name}%{?_isa} = %{version}-%{release} +%description mysql +%{summary}. + +%package odbc +Summary: ODBC driver for Qt5's SQL classes +BuildRequires: unixODBC-devel +Requires: %{name}%{?_isa} = %{version}-%{release} +%description odbc +%{summary}. + +%package postgresql +Summary: PostgreSQL driver for Qt5's SQL classes +BuildRequires: libpq-devel +Requires: %{name}%{?_isa} = %{version}-%{release} +%description postgresql +%{summary}. + +%if "%{?tds}" != "-no-sql-tds" +%package tds +Summary: TDS driver for Qt5's SQL classes +BuildRequires: freetds-devel +Requires: %{name}%{?_isa} = %{version}-%{release} +%description tds +%{summary}. +%endif + +# debating whether to do 1 subpkg per library or not -- rex +%package gui +Summary: Qt5 GUI-related libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +# where Recommends are supported +%if 0%{?fedora} || 0%{?rhel} >= 8 +Recommends: mesa-dri-drivers%{?_isa} +Recommends: qt5-qtwayland%{?_isa} +# Required for some locales: https://pagure.io/fedora-kde/SIG/issue/311 +Recommends: qt5-qttranslations +%endif +Obsoletes: qt5-qtbase-x11 < 5.2.0 +Provides: qt5-qtbase-x11 = %{version}-%{release} +# for Source6: 10-qt5-check-opengl2.sh: +# glxinfo +Requires: glx-utils +%description gui +Qt5 libraries used for drawing widgets and OpenGL items. + + +%prep +%setup -q -n %{qt_module}-everywhere-src-%{version} + +## dowstream patches +%patch -P3 -p1 -b .private_api_warning + +## upstream fixes + +%patch -P50 -p1 -b .QT_VERSION_CHECK +# FIXME/TODO : rebase or drop -- rdieter +#patch -P51 -p1 -b .hidpi_scale_at_192 +%patch -P52 -p1 -b .moc_macros +%patch -P53 -p1 -b .qt5gui_cmake_isystem_includes +%patch -P54 -p1 -b .qmake_LFLAGS +%patch -P55 -p1 -b .no_relocatable +%patch -P56 -p1 -b .libglvnd +%patch -P57 -p1 -b .qt5-qtbase-cxxflag +%if 0%{?fedora} < 35 +%patch -P58 -p1 -b .firebird +%else +%patch -P59 -p1 -b .firebird +%endif +%if 0%{?fedora} > 27 +%patch -P60 -p1 -b .mysql +%endif +%patch -P61 -p1 +# FIXME seems to break text rendering completely for some people +# patch -P63 -p1 -b .cache-emoji-font + +%patch -P90 -p1 -b .gcc11 + +## upstream patches +%patch -P100 -p1 +%patch -P101 -p1 +%patch -P102 -p1 +%patch -P103 -p1 +%patch -P104 -p1 + +## Qt 6 backports +%if 0%{?fedora} > 30 || 0%{?rhel} > 8 +%patch -P150 -p1 -b .use-wayland-on-gnome.patch +%endif +%if 0%{?fedora} > 38 || 0%{?rhel} > 9 +%patch -P151 -p1 +%patch -P152 -p1 +%patch -P153 -p1 +# patch -P154 -p1 +%patch -P155 -p1 +# patch -P156 -p1 +%patch -P157 -p1 +%patch -P158 -p1 +%patch -P159 -p1 +%patch -P160 -p1 +%patch -P161 -p1 +%patch -P162 -p1 +%patch -P163 -p1 +%patch -P164 -p1 +%patch -P165 -p1 +%patch -P166 -p1 +%patch -P167 -p1 +%patch -P168 -p1 +%patch -P169 -p1 +%endif + +%if 0%{?fedora} < 39 +# Use QGnomePlatform by default +%patch -P200 -p1 +%endif + +# move some bundled libs to ensure they're not accidentally used +pushd src/3rdparty +mkdir UNUSED +mv freetype libjpeg libpng zlib UNUSED/ +%if "%{?sqlite}" == "-system-sqlite" +mv sqlite UNUSED/ +%endif +%if "%{?xcb}" != "-qt-xcb" +mv xcb UNUSED/ +%endif +popd + +# builds failing mysteriously on f20 +# ./configure: Permission denied +# check to ensure that can't happen -- rex +test -x configure || chmod +x configure + +# use proper perl interpretter so autodeps work as expected +sed -i -e "s|^#!/usr/bin/env perl$|#!%{__perl}|" \ + bin/fixqt4headers.pl \ + bin/syncqt.pl \ + mkspecs/features/data/unix/findclasslist.pl + + +%build +# QT is known not to work properly with LTO at this point. Some of the issues +# are being worked on upstream and disabling LTO should be re-evaluated as +# we update this change. Until such time... +# Disable LTO +# https://bugzilla.redhat.com/1900527 +%define _lto_cflags %{nil} + +## FIXME/TODO: +# * for %%ix86, add sse2 enabled builds for Qt5Gui, Qt5Core, QtNetwork, see also: +# http://anonscm.debian.org/cgit/pkg-kde/qt/qtbase.git/tree/debian/rules (234-249) + +## adjust $RPM_OPT_FLAGS +# remove -fexceptions +RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` +RPM_OPT_FLAGS="$RPM_OPT_FLAGS %{?qt5_arm_flag} %{?qt5_deprecated_flag} %{?qt5_null_flag}" + +%if 0%{?use_clang} +RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fno-delete-null-pointer-checks||g'` +%endif + +export CFLAGS="$CFLAGS $RPM_OPT_FLAGS" +export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS" +export LDFLAGS="$LDFLAGS $RPM_LD_FLAGS" +export MAKEFLAGS="%{?_smp_mflags}" + +./configure \ + -verbose \ + -confirm-license \ + -opensource \ + -prefix %{_qt5_prefix} \ + -archdatadir %{_qt5_archdatadir} \ + -bindir %{_qt5_bindir} \ + -libdir %{_qt5_libdir} \ + -libexecdir %{_qt5_libexecdir} \ + -datadir %{_qt5_datadir} \ + -docdir %{_qt5_docdir} \ + -examplesdir %{_qt5_examplesdir} \ + -headerdir %{_qt5_headerdir} \ + -importdir %{_qt5_importdir} \ + -plugindir %{_qt5_plugindir} \ + -sysconfdir %{_qt5_sysconfdir} \ + -translationdir %{_qt5_translationdir} \ + -platform %{platform} \ + -release \ + -shared \ + -accessibility \ + -dbus-linked \ + %{?egl:-egl -eglfs} \ + -fontconfig \ + -glib \ + -gtk \ + %{?ibase} \ + -icu \ + -journald \ + -optimized-qmake \ + -openssl-linked \ + -libproxy \ + -sctp \ + %{!?examples:-nomake examples} \ + %{!?tests:-nomake tests} \ + -no-pch \ + -no-reduce-relocations \ + -no-rpath \ + -no-separate-debug-info \ + %{?no_sse2} \ + -no-strip \ + -system-libjpeg \ + -system-libpng \ + %{?harfbuzz} \ + %{?pcre} \ + %{?sqlite} \ + %{?tds} \ + %{?xcb} \ + %{?xkbcommon} \ + -system-zlib \ + %{?use_gold_linker} \ + -no-directfb \ + -no-feature-relocatable \ + %{?no_feature_renameat2} \ + %{?no_feature_statx} \ + %{?no_feature_getentropy} \ + QMAKE_CFLAGS_RELEASE="${CFLAGS:-$RPM_OPT_FLAGS}" \ + QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-$RPM_OPT_FLAGS}" \ + QMAKE_LFLAGS_RELEASE="${LDFLAGS:-$RPM_LD_FLAGS}" + +# Validate config results +%if "%{?ibase}" != "-no-sql-ibase" +for config_test in egl-x11 ibase ; do +%else +for config_test in egl-x11 ; do +%endif +config_result="$(grep ^cache.${config_test}.result config.cache | cut -d= -f2 | tr -d ' ')" +if [ "${config_result}" != "true" ]; then + echo "${config_test} detection failed" + config_failed=1 +fi +done +if [ ${config_failed} -eq 1 ]; then exit 1; fi + +# ensure qmake build using optflags (which can happen if not munging qmake.conf defaults) +make clean -C qmake +%make_build -C qmake all binary \ + QMAKE_CFLAGS_RELEASE="${CFLAGS:-$RPM_OPT_FLAGS}" \ + QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-$RPM_OPT_FLAGS}" \ + QMAKE_LFLAGS_RELEASE="${LDFLAGS:-$RPM_LD_FLAGS}" \ + QMAKE_STRIP= + +%make_build + + +%install +make install INSTALL_ROOT=%{buildroot} + +install -m644 -p -D %{SOURCE1} %{buildroot}%{_qt5_datadir}/qtlogging.ini + +# Qt5.pc +cat >%{buildroot}%{_libdir}/pkgconfig/Qt5.pc< 5-%{__isa_bits}.conf +## FIXME/TODO: verify qtchooser (still) happy if _qt5_prefix uses %%_prefix instead of %%_libdir/qt5 + echo "%{_qt5_prefix}" >> 5-%{__isa_bits}.conf + # alternatives targets + touch default.conf 5.conf + popd +%endif + +## .prl/.la file love +# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs +pushd %{buildroot}%{_qt5_libdir} +for prl_file in libQt5*.prl ; do + sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file} + if [ -f "$(basename ${prl_file} .prl).so" ]; then + rm -fv "$(basename ${prl_file} .prl).la" + sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file} + fi +done +popd + +install -p -m755 -D %{SOURCE6} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/10-qt5-check-opengl2.sh + +# f29+ enables sse2 unconditionally on ix86 -- rex +%if 0%{?fedora} < 29 && 0%{?rhel} < 9 +# fix bz#1442553 multilib issue +privat_header_file=%{buildroot}%{_qt5_headerdir}/QtCore/%{version}/QtCore/private/qconfig_p.h +grep -v QT_FEATURE_sse2 $privat_header_file > ${privat_header_file}.me +mv ${privat_header_file}.me ${privat_header_file} +cat >>${privat_header_file}<& /dev/null ||: + +%{_sbindir}/update-alternatives \ + --remove qtchooser-default \ + %{_sysconfdir}/xdg/qtchooser/qt5.conf >& /dev/null ||: +fi +%endif + +%post +%{?ldconfig} +%if 0%{?qtchooser} +%{_sbindir}/update-alternatives \ + --install %{_sysconfdir}/xdg/qtchooser/5.conf \ + qtchooser-5 \ + %{_sysconfdir}/xdg/qtchooser/5-%{__isa_bits}.conf \ + %{priority} + +%{_sbindir}/update-alternatives \ + --install %{_sysconfdir}/xdg/qtchooser/default.conf \ + qtchooser-default \ + %{_sysconfdir}/xdg/qtchooser/5.conf \ + %{priority} +%endif + +%postun +%{?ldconfig} +%if 0%{?qtchooser} +if [ $1 -eq 0 ]; then +%{_sbindir}/update-alternatives \ + --remove qtchooser-5 \ + %{_sysconfdir}/xdg/qtchooser/5-%{__isa_bits}.conf + +%{_sbindir}/update-alternatives \ + --remove qtchooser-default \ + %{_sysconfdir}/xdg/qtchooser/5.conf +fi +%endif + +%files +%license LICENSE.FDL +%license LICENSE.GPL* +%license LICENSE.LGPL* +%if 0%{?qtchooser} +%dir %{_sysconfdir}/xdg/qtchooser +# not editable config files, so not using %%config here +%ghost %{_sysconfdir}/xdg/qtchooser/default.conf +%ghost %{_sysconfdir}/xdg/qtchooser/5.conf +%{_sysconfdir}/xdg/qtchooser/5-%{__isa_bits}.conf +%endif +%dir %{_sysconfdir}/xdg/QtProject/ +%{_qt5_libdir}/libQt5Concurrent.so.5* +%{_qt5_libdir}/libQt5Core.so.5* +%{_qt5_libdir}/libQt5DBus.so.5* +%{_qt5_libdir}/libQt5Network.so.5* +%{_qt5_libdir}/libQt5Sql.so.5* +%{_qt5_libdir}/libQt5Test.so.5* +%{_qt5_libdir}/libQt5Xml.so.5* +%dir %{_qt5_libdir}/cmake/Qt5/ +%dir %{_qt5_libdir}/cmake/Qt5Concurrent/ +%dir %{_qt5_libdir}/cmake/Qt5Core/ +%dir %{_qt5_libdir}/cmake/Qt5DBus/ +%dir %{_qt5_libdir}/cmake/Qt5Gui/ +%dir %{_qt5_libdir}/cmake/Qt5Network/ +%dir %{_qt5_libdir}/cmake/Qt5OpenGL/ +%dir %{_qt5_libdir}/cmake/Qt5PrintSupport/ +%dir %{_qt5_libdir}/cmake/Qt5Sql/ +%dir %{_qt5_libdir}/cmake/Qt5Test/ +%dir %{_qt5_libdir}/cmake/Qt5Widgets/ +%dir %{_qt5_libdir}/cmake/Qt5Xml/ +%{_qt5_docdir}/global/ +%{_qt5_docdir}/config/ +%{_qt5_datadir}/qtlogging.ini +%dir %{_qt5_plugindir}/bearer/ +%{_qt5_plugindir}/bearer/libqconnmanbearer.so +%{_qt5_plugindir}/bearer/libqgenericbearer.so +%{_qt5_plugindir}/bearer/libqnmbearer.so +%{_qt5_libdir}/cmake/Qt5Network/Qt5Network_QConnmanEnginePlugin.cmake +%{_qt5_libdir}/cmake/Qt5Network/Qt5Network_QGenericEnginePlugin.cmake +%{_qt5_libdir}/cmake/Qt5Network/Qt5Network_QNetworkManagerEnginePlugin.cmake +%dir %{_qt5_plugindir}/designer/ +%dir %{_qt5_plugindir}/generic/ +%dir %{_qt5_plugindir}/iconengines/ +%dir %{_qt5_plugindir}/imageformats/ +%dir %{_qt5_plugindir}/platforminputcontexts/ +%dir %{_qt5_plugindir}/platforms/ +%dir %{_qt5_plugindir}/platformthemes/ +%dir %{_qt5_plugindir}/printsupport/ +%dir %{_qt5_plugindir}/script/ +%dir %{_qt5_plugindir}/sqldrivers/ +%dir %{_qt5_plugindir}/styles/ +%{_qt5_plugindir}/sqldrivers/libqsqlite.so +%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin.cmake + +%files common +# mostly empty for now, consider: filesystem/dir ownership, licenses +%{rpm_macros_dir}/macros.qt5-qtbase + +%files devel +%if "%{_qt5_bindir}" != "%{_bindir}" +%dir %{_qt5_bindir} +%endif +%{_bindir}/moc* +%{_bindir}/qdbuscpp2xml* +%{_bindir}/qdbusxml2cpp* +%{_bindir}/qmake* +%{_bindir}/rcc* +%{_bindir}/syncqt* +%{_bindir}/uic* +%{_bindir}/qlalr +%{_bindir}/fixqt4headers.pl +%{_bindir}/qvkgen +%{_bindir}/tracegen +%{_qt5_bindir}/moc* +%{_qt5_bindir}/qdbuscpp2xml* +%{_qt5_bindir}/qdbusxml2cpp* +%{_qt5_bindir}/qmake* +%{_qt5_bindir}/rcc* +%{_qt5_bindir}/syncqt* +%{_qt5_bindir}/uic* +%{_qt5_bindir}/qlalr +%{_qt5_bindir}/fixqt4headers.pl +%{_qt5_bindir}/qvkgen +%{_qt5_headerdir}/QtConcurrent/ +%{_qt5_headerdir}/QtCore/ +%{_qt5_headerdir}/QtDBus/ +%{_qt5_headerdir}/QtGui/ +%{_qt5_headerdir}/QtNetwork/ +%{_qt5_headerdir}/QtOpenGL/ +%{_qt5_headerdir}/QtPlatformHeaders/ +%{_qt5_headerdir}/QtPrintSupport/ +%{_qt5_headerdir}/QtSql/ +%{_qt5_headerdir}/QtTest/ +%{_qt5_headerdir}/QtWidgets/ +%{_qt5_headerdir}/QtXcb/ +%{_qt5_headerdir}/QtXml/ +%{_qt5_headerdir}/QtEglFSDeviceIntegration +%{_qt5_headerdir}/QtInputSupport +%{_qt5_headerdir}/QtEdidSupport +%{_qt5_headerdir}/QtXkbCommonSupport +%{_qt5_archdatadir}/mkspecs/ +%{_qt5_libdir}/libQt5Concurrent.prl +%{_qt5_libdir}/libQt5Concurrent.so +%{_qt5_libdir}/libQt5Core.prl +%{_qt5_libdir}/libQt5Core.so +%{_qt5_libdir}/libQt5DBus.prl +%{_qt5_libdir}/libQt5DBus.so +%{_qt5_libdir}/libQt5Gui.prl +%{_qt5_libdir}/libQt5Gui.so +%{_qt5_libdir}/libQt5Network.prl +%{_qt5_libdir}/libQt5Network.so +%{_qt5_libdir}/libQt5OpenGL.prl +%{_qt5_libdir}/libQt5OpenGL.so +%{_qt5_libdir}/libQt5PrintSupport.prl +%{_qt5_libdir}/libQt5PrintSupport.so +%{_qt5_libdir}/libQt5Sql.prl +%{_qt5_libdir}/libQt5Sql.so +%{_qt5_libdir}/libQt5Test.prl +%{_qt5_libdir}/libQt5Test.so +%{_qt5_libdir}/libQt5Widgets.prl +%{_qt5_libdir}/libQt5Widgets.so +%{_qt5_libdir}/libQt5XcbQpa.prl +%{_qt5_libdir}/libQt5XcbQpa.so +%{_qt5_libdir}/libQt5Xml.prl +%{_qt5_libdir}/libQt5Xml.so +%{_qt5_libdir}/libQt5EglFSDeviceIntegration.prl +%{_qt5_libdir}/libQt5EglFSDeviceIntegration.so +%{_qt5_libdir}/cmake/Qt5/Qt5Config*.cmake +%{_qt5_libdir}/cmake/Qt5Concurrent/Qt5ConcurrentConfig*.cmake +%{_qt5_libdir}/cmake/Qt5Core/Qt5CoreConfig*.cmake +%{_qt5_libdir}/cmake/Qt5Core/Qt5CoreMacros.cmake +%{_qt5_libdir}/cmake/Qt5Core/Qt5CTestMacros.cmake +%{_qt5_libdir}/cmake/Qt5DBus/Qt5DBusConfig*.cmake +%{_qt5_libdir}/cmake/Qt5DBus/Qt5DBusMacros.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5GuiConfig*.cmake +%{_qt5_libdir}/cmake/Qt5Network/Qt5NetworkConfig*.cmake +%{_qt5_libdir}/cmake/Qt5OpenGL/Qt5OpenGLConfig*.cmake +%{_qt5_libdir}/cmake/Qt5PrintSupport/Qt5PrintSupportConfig*.cmake +%{_qt5_libdir}/cmake/Qt5Sql/Qt5SqlConfig*.cmake +%{_qt5_libdir}/cmake/Qt5Test/Qt5TestConfig*.cmake +%{_qt5_libdir}/cmake/Qt5Widgets/Qt5WidgetsConfig*.cmake +%{_qt5_libdir}/cmake/Qt5Widgets/Qt5WidgetsMacros.cmake +%{_qt5_libdir}/cmake/Qt5Xml/Qt5XmlConfig*.cmake +%{_qt5_libdir}/cmake/Qt5/Qt5ModuleLocation.cmake +%{_qt5_libdir}/cmake/Qt5AccessibilitySupport/ +%{_qt5_libdir}/cmake/Qt5DeviceDiscoverySupport/ +%{_qt5_libdir}/cmake/Qt5EdidSupport/ +%{_qt5_libdir}/cmake/Qt5EglFSDeviceIntegration/ +%{_qt5_libdir}/cmake/Qt5EglFsKmsSupport/ +%{_qt5_libdir}/cmake/Qt5EglSupport/ +%{_qt5_libdir}/cmake/Qt5EventDispatcherSupport/ +%{_qt5_libdir}/cmake/Qt5FbSupport/ +%{_qt5_libdir}/cmake/Qt5FontDatabaseSupport/ +%{_qt5_libdir}/cmake/Qt5GlxSupport/ +%{_qt5_libdir}/cmake/Qt5InputSupport/ +%{_qt5_libdir}/cmake/Qt5KmsSupport/ +%{_qt5_libdir}/cmake/Qt5LinuxAccessibilitySupport/ +%{_qt5_libdir}/cmake/Qt5PlatformCompositorSupport/ +%{_qt5_libdir}/cmake/Qt5ServiceSupport/ +%{_qt5_libdir}/cmake/Qt5ThemeSupport/ +%{_qt5_libdir}/cmake/Qt5XcbQpa/ +%{_qt5_libdir}/cmake/Qt5XkbCommonSupport/ +%{_qt5_libdir}/metatypes/qt5core_metatypes.json +%{_qt5_libdir}/metatypes/qt5gui_metatypes.json +%{_qt5_libdir}/metatypes/qt5widgets_metatypes.json +%{_qt5_libdir}/pkgconfig/Qt5.pc +%{_qt5_libdir}/pkgconfig/Qt5Concurrent.pc +%{_qt5_libdir}/pkgconfig/Qt5Core.pc +%{_qt5_libdir}/pkgconfig/Qt5DBus.pc +%{_qt5_libdir}/pkgconfig/Qt5Gui.pc +%{_qt5_libdir}/pkgconfig/Qt5Network.pc +%{_qt5_libdir}/pkgconfig/Qt5OpenGL.pc +%{_qt5_libdir}/pkgconfig/Qt5PrintSupport.pc +%{_qt5_libdir}/pkgconfig/Qt5Sql.pc +%{_qt5_libdir}/pkgconfig/Qt5Test.pc +%{_qt5_libdir}/pkgconfig/Qt5Widgets.pc +%{_qt5_libdir}/pkgconfig/Qt5Xml.pc +%if 0%{?egl} +%{_qt5_libdir}/libQt5EglFsKmsSupport.prl +%{_qt5_libdir}/libQt5EglFsKmsSupport.so +%endif +%{_qt5_libdir}/qt5/bin/tracegen +## private-devel globs +# keep mkspecs/modules stuff in -devel for now, https://bugzilla.redhat.com/show_bug.cgi?id=1705280 +%{_qt5_archdatadir}/mkspecs/modules/qt_lib_*_private.pri +%exclude %{_qt5_headerdir}/*/%{version}/ + +%files private-devel +%{_qt5_headerdir}/*/%{version}/ +#{_qt5_archdatadir}/mkspecs/modules/qt_lib_*_private.pri + +%files static +%{_qt5_headerdir}/QtOpenGLExtensions/ +%{_qt5_libdir}/libQt5OpenGLExtensions.*a +%{_qt5_libdir}/libQt5OpenGLExtensions.prl +%{_qt5_libdir}/cmake/Qt5OpenGLExtensions/ +%{_qt5_libdir}/pkgconfig/Qt5OpenGLExtensions.pc +%{_qt5_libdir}/libQt5AccessibilitySupport.*a +%{_qt5_libdir}/libQt5AccessibilitySupport.prl +%{_qt5_headerdir}/QtAccessibilitySupport +%{_qt5_libdir}/libQt5DeviceDiscoverySupport.*a +%{_qt5_libdir}/libQt5DeviceDiscoverySupport.prl +%{_qt5_headerdir}/QtDeviceDiscoverySupport +%{_qt5_libdir}/libQt5EglSupport.*a +%{_qt5_libdir}/libQt5EglSupport.prl +%{_qt5_headerdir}/QtEglSupport +%{_qt5_libdir}/libQt5EventDispatcherSupport.*a +%{_qt5_libdir}/libQt5EventDispatcherSupport.prl +%{_qt5_headerdir}/QtEventDispatcherSupport +%{_qt5_libdir}/libQt5FbSupport.*a +%{_qt5_libdir}/libQt5FbSupport.prl +%{_qt5_headerdir}/QtFbSupport +%{_qt5_libdir}/libQt5FontDatabaseSupport.*a +%{_qt5_libdir}/libQt5FontDatabaseSupport.prl +%{_qt5_headerdir}/QtFontDatabaseSupport +%{_qt5_libdir}/libQt5GlxSupport.*a +%{_qt5_libdir}/libQt5GlxSupport.prl +%{_qt5_headerdir}/QtGlxSupport +%{_qt5_libdir}/libQt5InputSupport.*a +%{_qt5_libdir}/libQt5InputSupport.prl +%{_qt5_libdir}/libQt5LinuxAccessibilitySupport.*a +%{_qt5_libdir}/libQt5LinuxAccessibilitySupport.prl +%{_qt5_headerdir}/QtLinuxAccessibilitySupport +%{_qt5_libdir}/libQt5PlatformCompositorSupport.*a +%{_qt5_libdir}/libQt5PlatformCompositorSupport.prl +%{_qt5_headerdir}/QtPlatformCompositorSupport +%{_qt5_libdir}/libQt5ServiceSupport.*a +%{_qt5_libdir}/libQt5ServiceSupport.prl +%{_qt5_headerdir}/QtServiceSupport +%{_qt5_libdir}/libQt5ThemeSupport.*a +%{_qt5_libdir}/libQt5ThemeSupport.prl +%{_qt5_headerdir}/QtThemeSupport +%{_qt5_libdir}/libQt5KmsSupport.*a +%{_qt5_libdir}/libQt5KmsSupport.prl +%{_qt5_headerdir}/QtKmsSupport +%{_qt5_libdir}/libQt5EdidSupport.*a +%{_qt5_libdir}/libQt5EdidSupport.prl +%{_qt5_libdir}/libQt5XkbCommonSupport.*a +%{_qt5_libdir}/libQt5XkbCommonSupport.prl +%if 0%{?vulkan} +%{_qt5_headerdir}/QtVulkanSupport/ +%{_qt5_libdir}/cmake/Qt5VulkanSupport/ +%{_qt5_libdir}/libQt5VulkanSupport.*a +%{_qt5_libdir}/libQt5VulkanSupport.prl +%endif + +%if 0%{?examples} +%files examples +%{_qt5_examplesdir}/ +%endif + +%if "%{?ibase}" != "-no-sql-ibase" +%files ibase +%{_qt5_plugindir}/sqldrivers/libqsqlibase.so +%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QIBaseDriverPlugin.cmake +%endif + +%files mysql +%{_qt5_plugindir}/sqldrivers/libqsqlmysql.so +%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake + +%files odbc +%{_qt5_plugindir}/sqldrivers/libqsqlodbc.so +%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QODBCDriverPlugin.cmake + +%files postgresql +%{_qt5_plugindir}/sqldrivers/libqsqlpsql.so +%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QPSQLDriverPlugin.cmake + +%if "%{?tds}" != "-no-sql-tds" +%files tds +%{_qt5_plugindir}/sqldrivers/libqsqltds.so +%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QTDSDriverPlugin.cmake +%endif + +%ldconfig_scriptlets gui + +%files gui +%dir %{_sysconfdir}/X11/xinit +%dir %{_sysconfdir}/X11/xinit/xinitrc.d/ +%{_sysconfdir}/X11/xinit/xinitrc.d/10-qt5-check-opengl2.sh +%{_qt5_libdir}/libQt5Gui.so.5* +%{_qt5_libdir}/libQt5OpenGL.so.5* +%{_qt5_libdir}/libQt5PrintSupport.so.5* +%{_qt5_libdir}/libQt5Widgets.so.5* +%{_qt5_libdir}/libQt5XcbQpa.so.5* +%{_qt5_plugindir}/generic/libqevdevkeyboardplugin.so +%{_qt5_plugindir}/generic/libqevdevmouseplugin.so +%{_qt5_plugindir}/generic/libqevdevtabletplugin.so +%{_qt5_plugindir}/generic/libqevdevtouchplugin.so +%{_qt5_plugindir}/generic/libqlibinputplugin.so +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QLibInputPlugin.cmake +%{_qt5_plugindir}/generic/libqtuiotouchplugin.so +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevKeyboardPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevMousePlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevTabletPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevTouchScreenPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QTuioTouchPlugin.cmake +%{_qt5_plugindir}/imageformats/libqgif.so +%{_qt5_plugindir}/imageformats/libqico.so +%{_qt5_plugindir}/imageformats/libqjpeg.so +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QICOPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QJpegPlugin.cmake +%{_qt5_plugindir}/platforminputcontexts/libcomposeplatforminputcontextplugin.so +%{_qt5_plugindir}/platforminputcontexts/libibusplatforminputcontextplugin.so +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QComposePlatformInputContextPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QIbusPlatformInputContextPlugin.cmake +%if 0%{?egl} +%{_qt5_libdir}/libQt5EglFSDeviceIntegration.so.5* +%{_qt5_libdir}/libQt5EglFsKmsSupport.so.5* +%{_qt5_plugindir}/platforms/libqeglfs.so +%{_qt5_plugindir}/platforms/libqminimalegl.so +%dir %{_qt5_plugindir}/egldeviceintegrations/ +%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-kms-integration.so +%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-x11-integration.so +%{_qt5_plugindir}/xcbglintegrations/libqxcb-egl-integration.so +%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so +%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-emu-integration.so +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QMinimalEglIntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSIntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSX11IntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSKmsGbmIntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXcbEglIntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSKmsEglDeviceIntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSEmulatorIntegrationPlugin.cmake +%endif +%{_qt5_plugindir}/platforms/libqlinuxfb.so +%{_qt5_plugindir}/platforms/libqminimal.so +%{_qt5_plugindir}/platforms/libqoffscreen.so +%{_qt5_plugindir}/platforms/libqxcb.so +%{_qt5_plugindir}/platforms/libqvnc.so +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QLinuxFbIntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QMinimalIntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QOffscreenIntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QVncIntegrationPlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXcbIntegrationPlugin.cmake +%{_qt5_plugindir}/xcbglintegrations/libqxcb-glx-integration.so +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXcbGlxIntegrationPlugin.cmake +%{_qt5_plugindir}/platformthemes/libqxdgdesktopportal.so +%{_qt5_plugindir}/platformthemes/libqgtk3.so +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXdgDesktopPortalThemePlugin.cmake +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QGtk3ThemePlugin.cmake +%{_qt5_plugindir}/printsupport/libcupsprintersupport.so +%{_qt5_libdir}/cmake/Qt5PrintSupport/Qt5PrintSupport_QCupsPrinterSupportPlugin.cmake + + +%changelog +* Mon Dec 23 2024 Dmitriy Samoylik - 5.15.15-1 +- Rebuilt for MSVSphere 10 + +* Wed Sep 04 2024 Jan Grulich - 5.15.15-1 +- 5.15.15 + +* Fri Jul 19 2024 Fedora Release Engineering - 5.15.14-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jul 16 2024 Jan Grulich - 5.15.14-6 +- Re-enable fix for CVE-2024-39936 + +* Mon Jul 15 2024 Jan Grulich - 5.15.14-5 +- Use qt5-filesystem + +* Fri Jul 12 2024 Jan Grulich - 5.15.14-4 +- Revert: HTTP2: Delay any communication until encrypted() can be responded to + +* Thu Jul 11 2024 Jan Grulich - 5.15.14-3 +- Fix wrongly rebased patch for CVE-2024-39936 + +* Mon Jul 08 2024 Jan Grulich - 5.15.14-2 +- HTTP2: Delay any communication until encrypted() can be responded to + Resolves: CVE-2024-39936 +- KDE/Qt patchset collection respin + +* Wed May 29 2024 Jan Grulich - 5.15.14-1 +- 5.15.14 + +* Mon May 13 2024 Jan Grulich - 5.15.13-2 +- KDE/Qt patchset collection respin + GCC 14 build fixes + +* Thu Mar 14 2024 Jan Grulich - 5.15.13-1 +- 5.15.13 + +* Thu Feb 15 2024 Jan Grulich - 5.15.12-5 +- Fix CVE-2024-25580: potential buffer overflow when reading KTX images + +* Wed Jan 31 2024 Pete Walter - 5.15.12-4 +- Rebuild for ICU 74 + +* Fri Jan 26 2024 Fedora Release Engineering - 5.15.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 5.15.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Jan 02 2024 Jan Grulich - 5.15.12-1 +- 5.15.12 + +* Tue Dec 12 2023 Timothée Ravier - 5.15.11-8 +- Recommend qt5-qttranslations + +* Mon Nov 27 2023 Jan Grulich - 5.15.11-7 +- KDE/Qt patchset collection respin + +* Tue Nov 14 2023 Jan Grulich - 5.15.11-6 +- Backport another upstream (Qt6) fixes and improvements to QGtk3Theme + +* Thu Nov 09 2023 Jan Grulich - 5.15.11-5 +- Revert: Fix Qt not showing up emoji by handling emoji font family + +* Tue Nov 07 2023 Jan Grulich - 5.15.11-4 +- Fix Qt not showing up emoji by handling emoji font family + +* Mon Oct 16 2023 Jan Grulich - 5.15.11-3 +- Fix build against libxkbcommon 1.6.0 + +* Sun Oct 15 2023 Neal Gompa - 5.15.11-2 +- Add qtwayland weak dep to -gui subpackage and use arched weak deps + +* Fri Oct 06 2023 Jan Grulich - 5.15.11-10 +- 5.15.11 + +* Tue Aug 29 2023 LuK1337 - 5.15.10-9 +- Apply PySide2 build fix from OpenMandriva + +* Tue Aug 22 2023 Jan Grulich - 5.15.10-8 +- Drop QPlatformTheme::Appearance() backports breaking ABI + +* Mon Aug 21 2023 Jan Grulich - 5.15.10-7 +- Drop unnecessary backports + +* Mon Aug 21 2023 Jan Grulich - 5.15.10-6 +- Backport Qt 6 improvements to QGtkStyle for better Gtk/GNOME integration +- Use QGnomePlatform by default on F38 and older + Resolves: #2226797 + +* Wed Aug 16 2023 Than Ngo - 5.15.10-5 +- Fixed bz#2232359, CVE-2023-37369 qtbase: buffer overflow in QXmlStreamReader + +* Fri Jul 21 2023 Fedora Release Engineering - 5.15.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jul 19 2023 Yaakov Selkowitz - 5.15.10-3 +- Use pcre2 in RHEL builds +- Update pcre2 dependency + +* Tue Jul 11 2023 František Zatloukal - 5.15.10-2 +- Rebuilt for ICU 73.2 + +* Mon Jun 12 2023 Jan Grulich - 5.15.10-1 +- 5.15.10 + +* Fri Jun 09 2023 Than Ngo - 5.15.9-4 +- Fix #2212744, pcre2 support + +* Mon May 15 2023 Jan Grulich - 5.15.9-3 +- Fix CVE-2023-32762 and CVE-2023-32763 + +* Fri May 05 2023 Than Ngo - 5.15.9-2 +- backport, IBus input method cannot set panel position correctly with DPI scaling + +* Tue Apr 11 2023 Jan Grulich - 5.15.9-1 +- 5.15.9 + +* Wed Mar 29 2023 Than Ngo - 5.15.8-10 +- Related bz#2179854, Qt 5 render the Bold style CJK character very thick + with Noto CJK variable fonts +- Fix deprecated patch rpm macro + +* Tue Mar 28 2023 Kalev Lember - 5.15.8-9 +- Disable qtchooser for flatpak builds + +* Mon Mar 27 2023 Than Ngo - 5.15.8-8 +- Fix bz#2179854, Qt 5 render the Bold style CJK character very thick + with Noto CJK variable fonts + +* Mon Mar 20 2023 Than Ngo - 5.15.8-7 +- Fix bz#2178389, Qt application render very thin fonts after + switch to VF version of Noto CJK fonts + +* Mon Feb 27 2023 Jan Grulich - 5.15.8-6 +- refresh kde-5.15-rollup patch + +* Wed Feb 08 2023 Jan Grulich - 5.15.8-5 +- Fix possible DOS involving the Qt SQL ODBC driver plugin + CVE-2023-24607 + +* Tue Jan 31 2023 Jan Grulich - 5.15.8-4 +- migrated to SPDX license + +* Fri Jan 20 2023 Fedora Release Engineering - 5.15.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jan 05 2023 Jan Grulich - 5.15.8-2 +- Correctly install qtsan header file + +* Thu Jan 05 2023 Jan Grulich - 5.15.8-1 +- 5.15.8 + +* Sat Dec 31 2022 Pete Walter - 5.15.7-2 +- Rebuild for ICU 72 + +* Mon Oct 31 2022 Jan Grulich - 5.15.7-1 +- 5.15.7 + +* Tue Oct 11 2022 Rex Dieter - 5.15.6-2 +- make mixing verisons and private api usage a warning instead of fatal error + +* Tue Sep 20 2022 Jan Grulich - 5.15.6-1 +- 5.15.6 + +* Wed Aug 24 2022 Jan Grulich - 5.15.5-4 +- Update to latest changes from Qt patch collection + +* Mon Aug 01 2022 Frantisek Zatloukal - 5.15.5-3 +- Rebuilt for ICU 71.1 + +* Sat Jul 23 2022 Fedora Release Engineering - 5.15.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jul 13 2022 Jan Grulich - 5.15.5-1 +- 5.15.5 + +* Tue Jun 21 2022 Than Ngo - 5.15.4-4 +- bz#2099267, backport patch to fix download problem from Settings + +* Mon May 30 2022 Than Ngo - 5.15.4-3 +- bz#1994719, CVE-2021-38593 + +* Sun May 22 2022 Jan Grulich - 5.15.4-2 +- Rebuild (broken update) + +* Mon May 16 2022 Jan Grulich - 5.15.4-1 +- 5.15.4 + +* Fri Apr 01 2022 Than Ngo - 5.15.3-2 +- bz#2070958, enable zstd + +* Fri Mar 04 2022 Jan Grulich - 5.15.3-1 +- 5.15.3 + kde-5.15 fixes + +* Thu Feb 17 2022 Than Ngo - 5.15.2-35 +- Fixed CVE-2022-25255 + +* Mon Jan 31 2022 Jan Grulich - 5.15.2-34 +- refresh kde-5.15-rollup patch + +* Mon Jan 24 2022 Timm Bäder - 5.15.2-33 +- Disable automatic .la file removal +- https://fedoraproject.org/wiki/Changes/RemoveLaFiles + +* Fri Jan 21 2022 Fedora Release Engineering - 5.15.2-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jan 07 2022 Rex Dieter - 5.15.2-31 +- refresh kde-5.15-rollup patch + +* Mon Dec 06 2021 Jan Grulich - 5.15.2-30 +- refresh kde-5.15-rollup patch + +* Wed Nov 24 2021 Rex Dieter - 5.15.2-29 +- refresh kde-5.15-rollup patch + +* Thu Nov 11 2021 Sandro Mani - 5.15.2-28 +- Drop Qt5Bootstrap files from -static (#2017661) + +* Tue Oct 26 2021 Rex Dieter - 5.15.2-27 +- refresh kde-5.15-rollup patch + +* Tue Oct 12 2021 Rex Dieter - 5.15.2-26 +- refresh kde-5.15-rollup patch (#2012371) + +* Tue Sep 14 2021 Sahana Prasad - 5.15.2-25 +- Rebuilt with OpenSSL 3.0.0 + +* Tue Sep 07 2021 Rex Dieter - 5.15.2-24 +- refresh kde-5.15-rollup patch +- validate configure results (base, egl-x11) +- fix libglvnd-1.3.4 FTBFS (#2002416) + +* Tue Sep 07 2021 Rex Dieter - 5.15.2-23 +- (re)enable ibase +- handle upgrade path when/if some db drivers are ever disabled (ibase,tds) +- -gui: add mesa-dri-drivers soft dep for rhel8+ too + +* Mon Aug 23 2021 Rex Dieter - 5.15.2-22 +- sync kde/5.15 branch patches + +* Thu Jul 29 2021 Than Ngo - 5.15.2-21 +- Fixed FTBFS against firebird-4.0.0 + +* Tue Jul 27 2021 Than Ngo - 5.15.2-20 +- Disable sql-ibase temporary (firebird build failed on s390x, bz#1969393) + +* Fri Jul 23 2021 Fedora Release Engineering - 5.15.2-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu May 20 2021 Pete Walter - 5.15.2-18 +- Rebuild for ICU 69 + +* Thu May 13 2021 Rex Dieter - 5.15.2-17 +- -devel: fix some cmake-related dir ownership + +* Sat May 01 2021 Alessandro Astone - 5.15.2-16 +- Backport upstream fix for QTBUG-91909 + +* Tue Mar 09 2021 Jan Grulich - 5.15.2-15 +- FileChooser portal: send window id in hex + +* Fri Feb 19 2021 Rex Dieter - 5.15.2-14 +- %%build: explicitly pass -egl build option +- unconditional BR: pkgconfig(glesv2) again + +* Tue Feb 09 2021 Pavel Raiskup - 5.15.2-13 +- rebuild all postgresql deps once more, for libpq ABI fix rhbz#1908268 + +* Mon Feb 08 2021 Jan Grulich - 5.15.2-12 +- Use Wayland platform on GNOME for RHEL 9 + +* Mon Feb 08 2021 Pavel Raiskup - 5.15.2-11 +- rebuild for libpq ABI fix rhbz#1908268 + +* Sat Feb 06 2021 Rex Dieter - 5.15.2-10 +- FTBFS: qendian.h (and qfloat16.h) missing include (QTBUG-90395) +- Qt build on GCC 11 (QTBUG-89977) + +* Mon Feb 01 2021 Jan Grulich - 5.15.2-9 +- Disable getentropy on RHEL + +* Fri Jan 29 2021 Jan Grulich - 5.15.2-8 +- Disable statx and renameat2 on RHEL + +* Wed Jan 27 2021 Fedora Release Engineering - 5.15.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Dec 19 2020 Rex Dieter - 5.15.2-6 +- rebuild (gcc11) + +* Mon Nov 30 2020 Rex Dieter - 5.15.2-5 +- re-enable vulkan support on s390x, root cause fixed + +* Sun Nov 29 2020 Rex Dieter - 5.15.2-4 +- drop vulkan support on s390x (#1902449) + +* Fri Nov 27 2020 Jan Grulich - 5.15.2-3 +- Require qt-settings only in Fedora builds + +* Mon Nov 23 2020 Rex Dieter - 5.15.2-2 +- -no-reduce-relocations (#1900527) + +* Fri Nov 20 09:27:41 CET 2020 Jan Grulich - 5.15.2-1 +- 5.15.2 + +* Tue Nov 03 2020 Sandro Mani - 5.15.1-7 +- Backport upstream fix for QTBUG-86319 + +* Sun Oct 18 2020 Jeff Law - 5.15.1-6 +- Fix missing #includes for gcc-11 + +* Wed Sep 30 2020 Jan Grulich - 5.15.1-5 +- Upstream fix: Emit QScreen::geometryChanged when the logical DPI changes + +* Tue Sep 29 2020 Yaroslav Fedevych - 5.15.1-4 +- qt5-qtbase-devel requires vulkan headers + +* Thu Sep 17 2020 Rex Dieter - 5.15.1-3 +- enable vulkan support (#1794969) + +* Thu Sep 10 2020 Rex Dieter - 5.15.1-2 +- CentOS8 - numpad do not work in KDE Plasma (#1868371) + +* Thu Sep 10 2020 Jan Grulich - 5.15.1-1 +- 5.15.1 + +* Wed Jul 29 2020 Fedora Release Engineering - 5.14.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 01 2020 Jeff Law - 5.14.2-7 +- Disable LTO + +* Mon Jun 15 2020 Rex Dieter - 5.14.2-6 +- Qt5 private header packaging breaks Qt5 Cmake files (#1846613) + +* Sat May 16 2020 Pete Walter - 5.14.2-5 +- Rebuild for ICU 67 + +* Tue Apr 14 2020 Rex Dieter - 5.14.2-4 +- backport "Mutex deadlock in QPluginLoader, Krita fails to start" (QTBUG-83207) + +* Mon Apr 13 2020 Rex Dieter - 5.14.2-3 +- %%build: -no-feature-relocatable + matching patch (#1823118) + +* Wed Apr 08 2020 Than Ngo - 5.14.2-2 +- Fixed bz#1801370 - CVE-2015-9541 XML entity expansion vulnerability via a crafted SVG document + +* Sat Apr 04 2020 Rex Dieter - 5.14.2-1 +- 5.14.2 + +* Sun Mar 22 2020 Robert-André Mauchin - 5.13.2-4 +- Upstream patch to add support for PostgreSQL 12 (#1815921) + +* Thu Jan 30 2020 Fedora Release Engineering - 5.13.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Jan 20 2020 Than Ngo - 5.13.2-2 +- upstream patches fix following issues: + Do-not-load-plugin-from-the-PWD + QLibrary-Unix-do-not-attempt-to-load-a-library-relat + +* Mon Dec 09 2019 Jan Grulich - 5.13.2-1 +- 5.13.2 + +* Fri Nov 01 2019 Pete Walter - 5.12.5-2 +- Rebuild for ICU 65 + +* Tue Sep 24 2019 Jan Grulich - 5.12.5-1 +- 5.12.5 + +* Wed Aug 21 2019 Rex Dieter - 5.12.4-7 +- s/pkgconfig(egl)/libEGL-devel/ + +* Fri Jul 26 2019 Fedora Release Engineering - 5.12.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jul 23 2019 Jan Grulich - 5.12.4-5 +- Use qtwayland by default on Gnome Wayland sessions + Resolves: bz#1732129 + +* Mon Jul 15 2019 Jan Grulich - 5.12.4-4 +- Revert "Reset QWidget's winId when backing window surface is destroyed" + +* Fri Jun 28 2019 Rex Dieter - 5.12.4-3 +- omit QTBUG-73231 patch fix, appears to introduce incompatible symbols + +* Wed Jun 26 2019 Rex Dieter - 5.12.4-2 +- pull in some upstream crash fixes + +* Fri Jun 14 2019 Jan Grulich - 5.12.4-1 +- 5.12.4 + +* Wed Jun 12 2019 Rex Dieter - 5.12.3-2 +- pull in candidate upstream nvidia/optima fix (kde#406180) + +* Tue Jun 04 2019 Jan Grulich - 5.12.3-1 +- 5.12.3 + +* Fri May 10 2019 Rex Dieter - 5.12.1-7 +- Fix install targets for generated private headers (#1702858) + +* Wed May 08 2019 Rex Dieter - 5.12.1-6 +- Blacklist nouveau and llvmpipe for multithreading (#1706420) +- drop BR: pkgconfig(glesv2) on f31+, no longer provided in mesa-19.1+ + +* Thu May 02 2019 Rex Dieter - 5.12.1-5 +- keep mkspecs/modules/*_private.pri in -devel #1705280) + +* Tue Apr 30 2019 Rex Dieter - 5.12.1-4 +- CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui (#1704474) + +* Tue Apr 30 2019 Rex Dieter - 5.12.1-3 +- -private-devel subpkg, move Requires: cups-devel here + +* Mon Mar 04 2019 Rex Dieter - 5.12.1-2 +- -devel: Requires: cups-devel + +* Thu Feb 14 2019 Rex Dieter - 5.12.1-1 +- 5.12.1 + +* Wed Feb 13 2019 Than Ngo - 5.11.3-4 +- fixed build issue with gcc9 + +* Sun Feb 03 2019 Rex Dieter - 5.11.3-3 +- disable renameat2/statx feature on < f30 (#1668865) + +* Sat Feb 02 2019 Fedora Release Engineering - 5.11.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Dec 07 2018 Rex Dieter - 5.11.3-1 +- 5.11.3 + +* Thu Oct 25 2018 Than Ngo - 5.11.2-3 +- backported patch to fix selection rendering issues if rounding leads to left-out pixels +- backported patch to optimize insertionPointsForLine + +* Thu Oct 11 2018 Rex Dieter - 5.11.2-2 +- -no-use-gold-linker (#1635973) + + +* Fri Sep 21 2018 Jan Grulich - 5.11.2-1 +- 5.11.2 + +* Thu Jul 26 2018 Than Ngo - 5.11.1-7 +- fixed FTBFS + +* Sat Jul 14 2018 Fedora Release Engineering - 5.11.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jul 10 2018 Pete Walter - 5.11.1-5 +- Rebuild for ICU 62 + +* Mon Jul 02 2018 Than Ngo - 5.11.1-4 +- fixed bz#1597110 - BRP mangle shebangs and calculation of provides should ignore backups files + +* Fri Jun 29 2018 Rex Dieter - 5.11.1-3 +- apply sse2-related multilib hack on < f29 only +- safer %%_qt5_prefix, %%qt5_archdatadir ownership +- rebuild for %%_qt5_prefix = %%_prefix + +* Sat Jun 23 2018 Than Ngo - 5.11.1-2 +- fixed #1592146, python3 + +* Tue Jun 19 2018 Rex Dieter - 5.11.1-1 +- 5.11.1 +- relax qt5-rpm-macros dep +- drop workaround for QTBUG-37417 +- drop CMake-Restore-qt5_use_modules-function.patch (upstreamed) + +* Mon Jun 18 2018 Rex Dieter - 5.11.0-3 +- backport CMake-Restore-qt5_use_modules-function.patch +- %%build: %%ix86 --no-sse2 on < f29 only + +* Wed May 30 2018 Rex Dieter - 5.11.0-2 +- move libQt5EglFSDeviceIntegration to -gui (#1557223) + +* Tue May 22 2018 Rex Dieter - 5.11.0-1 +- 5.11.0 +- drop support for inject_optflags (not used since f23) + +* Mon Apr 30 2018 Pete Walter - 5.10.1-8 +- Rebuild for ICU 61.1 + +* Thu Mar 08 2018 Rex Dieter - 5.10.1-7 +- enforce qt5-rpm-macros versioning +- BR: gcc-c++ +- Qt5.pc: fix version, add %%check + +* Fri Feb 23 2018 Rex Dieter - 5.10.1-6 +- qt5-qtbase: RPM build flags only partially injected (#1543888) + +* Wed Feb 21 2018 Rex Dieter - 5.10.1-5 +- QOpenGLShaderProgram: glProgramBinary() resulting in LINK_STATUS=FALSE not handled properly (QTBUG-66420) + +* Fri Feb 16 2018 Rex Dieter - 5.10.1-4 +- use %%make_build, %%ldconfig +- drop %%_licensedir hack + +* Thu Feb 15 2018 Rex Dieter - 5.10.1-3 +- qt5-qtbase: RPM build flags only partially injected (#1543888) + +* Tue Feb 13 2018 Jan Grulich - 5.10.1-2 +- enable patch to track private api + +* Tue Feb 13 2018 Jan Grulich - 5.10.1-1 +- 5.10.1 + +* Fri Feb 09 2018 Rex Dieter - 5.10.0-5 +- track private api use via properly versioned symbols (unused for now) + +* Fri Feb 09 2018 Igor Gnatenko - 5.10.0-4 +- Escape macros in %%changelog + +* Sun Jan 28 2018 Rex Dieter - 5.10.0-3 +- QMimeType: remove unwanted *.bin as preferredSuffix for octet-stream (fdo#101667,kde#382437) + +* Fri Jan 26 2018 Rex Dieter - 5.10.0-2 +- re-enable gold linker (#1458003) +- drop qt5_null_flag/qt5_deprecated_flag hacks (should be fixed upstream for awhile) +- make qt_settings/journald support unconditional + +* Fri Dec 15 2017 Jan Grulich - 5.10.0-1 +- 5.10.0 + +* Thu Nov 30 2017 Pete Walter - 5.9.3-3 +- Rebuild for ICU 60.1 + +* Thu Nov 30 2017 Than Ngo - 5.9.3-2 +- bz#1518958, backport to fix out of bounds reads in qdnslookup_unix + +* Wed Nov 22 2017 Jan Grulich - 5.9.3-1 +- 5.9.3 + +* Thu Nov 09 2017 Rex Dieter - 5.9.2-5 +- categoried logging for xcb entries (#1497564, QTBUG-55167) + +* Mon Nov 06 2017 Rex Dieter - 5.9.2-4 +- QListView upstream regression (#1509649, QTBUG-63846) + +* Mon Oct 23 2017 Rex Dieter - 5.9.2-3 +- pass QMAKE_*_RELEASE to configure to ensure optflags get used (#1505260) + +* Thu Oct 19 2017 Rex Dieter - 5.9.2-2 +- refresh mariadb patch support (upstreamed version apparently incomplete) + +* Mon Oct 09 2017 Jan Grulich - 5.9.2-1 +- 5.9.2 + +* Wed Sep 27 2017 Rex Dieter - 5.9.1-9 +- refresh mariadb patch to actually match cr#206850 logic (#1491316) + +* Wed Sep 27 2017 Rex Dieter - 5.9.1-8 +- refresh mariadb patch wrt cr#206850 (#1491316) + +* Tue Sep 26 2017 Rex Dieter - 5.9.1-7 +- actually apply mariadb-related patch (#1491316) + +* Mon Sep 25 2017 Rex Dieter - 5.9.1-6 +- enable openssl11 support only for f27+ (for now) +- Use mariadb-connector-c-devel, f28+ (#1493909) +- Backport upstream mariadb patch (#1491316) + +* Wed Aug 02 2017 Than Ngo - 5.9.1-5 +- added privat headers for Qt5 Xcb + +* Sun Jul 30 2017 Florian Weimer - 5.9.1-4 +- Rebuild with binutils fix for ppc64le (#1475636) + +* Thu Jul 27 2017 Than Ngo - 5.9.1-3 +- fixed bz#1401459, backport openssl-1.1 support + +* Thu Jul 27 2017 Fedora Release Engineering - 5.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 19 2017 Rex Dieter - 5.9.1-1 +- 5.9.1 + +* Tue Jul 18 2017 Than Ngo - 5.9.0-6 +- fixed bz#1442553, multilib issue + +* Fri Jul 14 2017 Than Ngo - 5.9.0-5 +- fixed build issue with new mariadb + +* Thu Jul 06 2017 Than Ngo - 5.9.0-4 +- fixed bz#1409600, stack overflow in QXmlSimpleReader, CVE-2016-10040 + +* Fri Jun 16 2017 Rex Dieter - 5.9.0-3 +- create_cmake.prf: adjust CMAKE_NO_PRIVATE_INCLUDES (#1456211,QTBUG-37417) + +* Thu Jun 01 2017 Rex Dieter - 5.9.0-2 +- workaround gold linker issue with duplicate symbols (f27+, #1458003) + +* Wed May 31 2017 Helio Chissini de Castro - 5.9.0-1 +- Upstream official release + +* Fri May 26 2017 Helio Chissini de Castro - 5.9.0-0.1.rc +- Upstream Release Candidate retagged + +* Wed May 24 2017 Helio Chissini de Castro - 5.9.0-0.rc.1 +- Upstream Release Candidate 1 + +* Tue May 16 2017 Rex Dieter - 5.9.0-0.6.beta3 +- -common: Obsoletes: qt5-qtquick1(-devel) + +* Mon May 15 2017 Fedora Release Engineering - 5.9.0-0.5.beta3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild + +* Mon May 08 2017 Rex Dieter - 5.9.0-0.4.beta3 +- include recommended qtdbus patches, fix Release + +* Fri May 05 2017 Helio Chissini de Castro - 5.9.0-0.beta.3 +- Beta 3 release + +* Fri Apr 14 2017 Helio Chissini de Castro - 5.9.0-0.beta.1 +- No more docs, no more bootstrap. Docs comes now on a single package. + +* Thu Mar 30 2017 Rex Dieter - 5.8.0-8 +- de-bootstrap +- make -doc arch'd (workaround bug #1437522) + +* Wed Mar 29 2017 Rex Dieter - 5.8.0-7 +- rebuild + +* Mon Mar 27 2017 Rex Dieter - 5.8.0-6 +- bootstrap (rawhide) +- revert some minor changes introduced since 5.7 +- move *Plugin.cmake items to runtime (not -devel) + +* Sat Jan 28 2017 Helio Chissini de Castro - 5.8.0-5 +- Really debootstrap :-P + +* Fri Jan 27 2017 Helio Chissini de Castro - 5.8.0-4 +- Debootstrap +- Use meta doctools package to build docs + +* Fri Jan 27 2017 Helio Chissini de Castro - 5.8.0-3 +- Unify firebird patch for both versions +- Bootstrap again for copr + +* Thu Jan 26 2017 Helio Chissini de Castro - 5.8.0-2 +- Debootstrap after tools built. New tool needed qtattributionsscanner + +* Thu Jan 26 2017 Helio Chissini de Castro - 5.8.0-1 +- Initial update for 5.8.0 + +* Tue Jan 24 2017 Rex Dieter - 5.7.1-13 +- Broken window scaling (#1381828) + +* Wed Jan 04 2017 Kevin Kofler - 5.7.1-12 +- readd plugin __requires_exclude_from filter, it is still needed + +* Mon Jan 02 2017 Rex Dieter - 5.7.1-11 +- filter plugin provides, drop filter plugin excludes (no longer needed) + +* Mon Dec 19 2016 Rex Dieter - 5.7.1-10 +- backport 5.8 patch for wayland crasher (#1403500,QTBUG-55583) + +* Fri Dec 09 2016 Rex Dieter - 5.7.1-9 +- restore moc_system_defines.patch lost in 5.7.0 rebase + +* Fri Dec 09 2016 Rex Dieter - 5.7.1-8 +- update moc patch to define _SYS_SYSMACROS_H_OUTER instead (#1396755) + +* Thu Dec 08 2016 Rex Dieter - 5.7.1-7 +- really apply QT_VERSION_CHECK workaround (#1396755) + +* Thu Dec 08 2016 Rex Dieter - 5.7.1-6 +- namespace QT_VERSION_CHECK to workaround major/minor being pre-defined (#1396755) +- update moc patch to define _SYS_SYSMACROS_H (#1396755) + +* Thu Dec 08 2016 Rex Dieter - 5.7.1-5 +- 5.7.1 dec5 snapshot + +* Wed Dec 07 2016 Rex Dieter - 5.7.1-4 +- disable openssl11 (for now, FTBFS), use -openssl-linked (bug #1401459) +- BR: perl-generators + +* Mon Nov 28 2016 Than Ngo - 5.7.1-3 +- add condition for rhel +- add support for firebird-3.x + +* Thu Nov 24 2016 Than Ngo - 5.7.1-2 +- adapted the berolinux's patch for new openssl-1.1.x + +* Wed Nov 09 2016 Helio Chissini de Castro - 5.7.1-1 +- New upstream version + +* Thu Oct 20 2016 Rex Dieter - 5.7.0-10 +- fix Source0: https://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtbase-opensource-src-5.9.0.tar.xz + +* Thu Sep 29 2016 Rex Dieter - 5.7.0-9 +- Requires: openssl-libs%%{?_isa} (#1328659) + +* Wed Sep 28 2016 Than Ngo - 5.7.0-8 +- bz#1328659, load openssl libs dynamically + +* Tue Sep 27 2016 Rex Dieter - 5.7.0-7 +- drop BR: cmake (handled by qt5-rpm-macros now) + +* Wed Sep 14 2016 Than Ngo - 5.7.0-6 +- add macros qtwebengine_arches in qt5 + +* Tue Sep 13 2016 Than Ngo - 5.7.0-5 +- add rpm macros qtwebengine_arches for qtwebengine + +* Mon Sep 12 2016 Rex Dieter - 5.7.0-4 +- use '#!/usr/bin/perl' instead of '#!/usr/bin/env perl' + +* Tue Jul 19 2016 Rex Dieter - 5.7.0-3 +- introduce macros.qt5-qtbase (for %%_qt5, %%_qt5_epoch, %%_qt5_version, %%_qt5_evr) + +* Tue Jun 14 2016 Helio Chissini de Castro - 5.7.0-2 +- Compiled with gcc + +* Tue Jun 14 2016 Helio Chissini de Castro - 5.7.0-1 +- Qt 5.7.0 release + +* Thu Jun 09 2016 Helio Chissini de Castro - 5.7.0-0.1 +- Prepare 5.7 +- Move macros package away from qtbase. Now is called qt5-rpm-macros + +* Thu Jun 02 2016 Than Ngo - 5.6.0-21 +- drop gcc6 workaround on arm + +* Fri May 20 2016 Rex Dieter - 5.6.0-20 +- -Wno-deprecated-declarations (typo missed trailing 's') + +* Fri May 13 2016 Rex Dieter - 5.6.0-19 +- pull in upstream drag-n-drop related fixes (QTBUG-45812, QTBUG-51215) + +* Sat May 07 2016 Rex Dieter - 5.6.0-18 +- revert out-of-tree build, breaks Qt5*Config.cmake *_PRIVATE_INCLUDE_DIRS entries (all blank) + +* Thu May 05 2016 Rex Dieter - 5.6.0-17 +- support out-of-tree build +- better %%check +- pull in final/upstream fixes for QTBUG-51648,QTBUG-51649 +- disable examples/tests in bootstrap mode + +* Sat Apr 30 2016 Rex Dieter - 5.6.0-16 +- own %%{_qt5_plugindir}/egldeviceintegrations + +* Mon Apr 18 2016 Caolán McNamara - 5.6.0-15 +- full rebuild for hunspell 1.4.0 + +* Mon Apr 18 2016 Caolán McNamara - 5.6.0-14 +- bootstrap rebuild for hunspell 1.4.0 + +* Sat Apr 16 2016 Rex Dieter - 5.6.0-13 +- -devel: Provides: qt5-qtbase-private-devel (#1233829) + +* Sat Apr 16 2016 David Tardon - 5.6.0-12 +- full build + +* Fri Apr 15 2016 David Tardon - 5.6.0-11 +- rebuild for ICU 57.1 + +* Thu Mar 31 2016 Rex Dieter - 5.6.0-10 +- Fix build on MIPS (#1322537) +- drop BR: valgrind (not used, for awhile) + +* Fri Mar 25 2016 Rex Dieter 5.6.0-9 +- pull upstream patches (upstreamed versions, gcc6-related bits mostly) + +* Thu Mar 24 2016 Rex Dieter - 5.6.0-8 +- make 10-qt5-check-opengl2.sh xinit script more robust +- enable journald support for el7+ (#1315239) + +* Sat Mar 19 2016 Rex Dieter - 5.6.0-7 +- macros.qt5: null-pointer-checks flag isn't c++-specific + +* Sat Mar 19 2016 Rex Dieter - 5.6.0-6 +- macros.qt5: we really only want the null-pointer-checks flag here + and definitely no arch-specific ones + +* Fri Mar 18 2016 Rex Dieter - 5.6.0-5 +- macros.qt5: cleanup, %%_qt5_cflags, %%_qt5_cxxflags (for f24+) + +* Fri Mar 18 2016 Rex Dieter - 5.6.0-3 +- rebuild + +* Tue Mar 15 2016 Rex Dieter 5.6.0-2 +- respin QTBUG-51767 patch + +* Mon Mar 14 2016 Helio Chissini de Castro - 5.6.0-1 +- 5.6.0 release + +* Sat Mar 12 2016 Rex Dieter 5.6.0-0.41.rc +- %%build: restore -dbus-linked + +* Fri Mar 11 2016 Rex Dieter 5.6.0-0.40.rc +- respin QTBUG-51649 patch +- %%build: use -dbus-runtime unconditionally +- drop (unused) build deps: atspi, dbus, networkmanager + +* Thu Mar 10 2016 Rex Dieter 5.6.0-0.39.rc +- candidate fixes for various QtDBus deadlocks (QTBUG-51648,QTBUG-51676) + +* Mon Mar 07 2016 Rex Dieter 5.6.0-0.38.rc +- backport "crash on start if system bus is not available" (QTBUG-51299) + +* Sat Mar 05 2016 Rex Dieter 5.6.0-0.37.rc +- build: ./configure -journal (f24+) + +* Wed Mar 02 2016 Daniel Vrátil 5.6.0-0.36.rc +- Non-bootstrapped build + +* Tue Mar 01 2016 Daniel Vrátil 5.6.0-0.35.rc +- Rebuild against new openssl + +* Fri Feb 26 2016 Rex Dieter 5.6.0-0.34.rc +- qtlogging.ini: remove comments + +* Thu Feb 25 2016 Rex Dieter 5.6.0-0.33.rc +- ship $$[QT_INSTALL_DATA]/qtlogging.ini for packaged logging defaults (#1227295) + +* Thu Feb 25 2016 Rex Dieter 5.6.0-0.32.rc +- qt5-qtbase-static missing dependencies (#1311311) + +* Wed Feb 24 2016 Rex Dieter 5.6.0-0.31.rc +- Item views don't handle insert/remove of rows robustly (QTBUG-48870) + +* Tue Feb 23 2016 Helio Chissini de Castro - 5.6.0-0.30.rc +- Update to final RC + +* Mon Feb 22 2016 Helio Chissini de Castro - 5.6.0-0.29.rc +- Update tarball with https://bugreports.qt.io/browse/QTBUG-50703 fix + +* Wed Feb 17 2016 Than Ngo - 5.6.0-0.28.rc +- fix build issue with gcc6 + +* Mon Feb 15 2016 Helio Chissini de Castro - 5.6.0-0.27.rc +- Update proper tarball. Need avoid the fix branch + +* Mon Feb 15 2016 Helio Chissini de Castro - 5.6.0-0.26.rc +- Integrate rc releases now. + +* Sat Feb 13 2016 Rex Dieter 5.6.0-0.25.beta +- macros.qt5: fix %%qt5_ldflags macro + +* Thu Feb 11 2016 Than Ngo - 5.6.0-0.24.beta +- fix build issue with gcc6 +- fix check for alsa 1.1.x + +* Wed Feb 03 2016 Rex Dieter 5.6.0-0.23.beta +- qt5-rpm-macros pkg + +* Tue Feb 02 2016 Rex Dieter 5.6.0-0.22.beta +- don't inject $RPM_OPT_FLAGS/$RPM_LD_FLAGS into qmake defaults f24+ (#1279265) + +* Tue Feb 02 2016 Rex Dieter 5.6.0-0.21.beta +- build with and add to macros.qt5 flags: -fno-delete-null-pointer-checks + +* Fri Jan 15 2016 Than Ngo - 5.6.0-0.20.beta +- enable -qt-xcb to fix non-US keys under VNC (#1295713) + +* Mon Jan 04 2016 Rex Dieter 5.6.0-0.19.beta +- Crash in QXcbWindow::setParent() due to NULL xcbScreen (QTBUG-50081, #1291003) + +* Mon Dec 21 2015 Rex Dieter 5.6.0-0.17.beta +- fix/update Release: 1%%{?dist} + +* Fri Dec 18 2015 Rex Dieter 5.6.0-0.16 +- 5.6.0-beta (final) + +* Wed Dec 16 2015 Rex Dieter - 5.6.0-0.15 +- pull in another upstream moc fix/improvement (#1290020,QTBUG-49972) +- fix bootstrap/docs + +* Wed Dec 16 2015 Rex Dieter 5.6.0-0.13 +- workaround moc/qconfig-multilib issues (#1290020,QTBUG-49972) + +* Wed Dec 16 2015 Peter Robinson 5.6.0-0.12 +- aarch64 is secondary arch too +- ppc64le is NOT multilib +- Fix Power 64 macro use + +* Mon Dec 14 2015 Than Ngo - 5.6.0-0.11 +- fix build failure on secondary arch + +* Sun Dec 13 2015 Helio Chissini de Castro - 5.6.0-0.10 +- We're back to gold linker +- Remove reduce relocations + +* Sat Dec 12 2015 Rex Dieter 5.6.0-0.9 +- drop disconnect_displays.patch so we can better test latest xcb/display work + +* Fri Dec 11 2015 Rex Dieter 5.6.0-0.8 +- sync latest xcb/screen/display related upstream commits + +* Thu Dec 10 2015 Helio Chissini de Castro - 5.6.0-0.7 +- Official beta release + +* Thu Dec 10 2015 Helio Chissini de Castro - 5.6.0-0.6 +- Official beta release + +* Wed Dec 09 2015 Daniel Vratil - 5.6.0-0.5 +- try reverting from -optimized-tools to -optimized-qmake + +* Sun Dec 06 2015 Rex Dieter - 5.6.0-0.4 +- re-introduce bootstrap/examples macros +- put examples-manifest.xml in -examples +- restore -doc multilib hack (to be on the safe side, can't hurt) +- %%build: s/-optimized-qmake/-optimized-tools/ + +* Sat Dec 05 2015 Helio Chissini de Castro - 5.6.0-0.3 +- Beta 3 +- Reintroduce xcb patch from https://codereview.qt-project.org/#/c/138201/ + +* Fri Nov 27 2015 Helio Chissini de Castro - 5.6.0-0.2 +- Valgrind still needed as buildreq due recent split qdoc package, but we can get rid of + specific arch set. +- Added missing libproxy buildreq +- Epel and RHEL doesn't have libinput, so a plugin need to be excluded for this distros + +* Wed Nov 25 2015 Rex Dieter 5.5.1-10 +- -devel: Requires: redhat-rpm-config (#1248174) + +* Wed Nov 18 2015 Helio Chissini de Castro - 5.5.1-9 +- Get rid of valgrind hack. It sort out that we don't need it anymore (#1211203) + +* Mon Nov 09 2015 Helio Chissini de Castro - 5.5.1-8 +- qt5-qdoc need requires >= current version, otherwise will prevent the usage further when moved to qttools + +* Mon Nov 09 2015 Rex Dieter 5.5.1-7 +- qt5-qdoc subpkg + +* Tue Nov 03 2015 Helio Chissini de Castro - 5.6.0-0.1 +- Start to implement 5.6.0 beta + +* Tue Nov 03 2015 Helio Chissini de Castro - 5.6.0-0.1 +- Start to implement 5.6.0 beta + +* Wed Oct 28 2015 David Tardon - 5.5.1-6 +- full build + +* Wed Oct 28 2015 David Tardon - 5.5.1-5 +- rebuild for ICU 56.1 + +* Thu Oct 15 2015 Helio Chissini de Castro - 5.5.1-2 +- Update to final release 5.5.1 + +* Mon Oct 05 2015 Helio Chissini de Castro - 5.5.1-1 +- Update to Qt 5.5.1 RC1 +- Patchs 13, 52, 53, 101, 155, 223, 297 removed due to inclusion upstream + +* Mon Oct 05 2015 Rex Dieter 5.5.0-18 +- When a screen comes back online, the windows need to be told about it (QTBUG-47041) +- xcb: Ignore disabling of outputs in the middle of the mode switch + +* Wed Aug 19 2015 Rex Dieter 5.5.0-17 +- unconditionally undo valgrind hack when done (#1255054) + +* Sat Aug 15 2015 Rex Dieter 5.5.0-16 +- backport 0055-Respect-manual-set-icon-themes.patch (kde#344469) +- conditionally use valgrind only if needed + +* Fri Aug 07 2015 Kevin Kofler - 5.5.0-15 +- use valgrind to debug qdoc HTML generation + +* Fri Aug 07 2015 Kevin Kofler - 5.5.0-14 +- remove GDB hackery again, -12 built fine on i686, hack breaks ARM build +- fix 10-qt5-check-opengl2.sh for multiple screens (#1245755) + +* Thu Aug 06 2015 Rex Dieter 5.5.0-13 +- use upstream commit/fix for QTBUG-46310 +- restore qdoc/gdb hackery, i686 still needs it :( + +* Wed Aug 05 2015 Kevin Kofler - 5.5.0-12 +- remove GDB hackery, it is not producing useful backtraces for the ARM crash + +* Mon Aug 03 2015 Helio Chissini de Castro - 5.5.0-11 +- Add mesa-dri-drivers as recommends on gui package as reported by Kevin Kofler +- Reference https://bugzilla.redhat.com/1249280 + +* Wed Jul 29 2015 Rex Dieter 5.5.0-10 +- -docs: BuildRequires: qt5-qhelpgenerator + +* Fri Jul 17 2015 Rex Dieter 5.5.0-9 +- use qdoc.gdb wrapper + +* Wed Jul 15 2015 Rex Dieter 5.5.0-8 +- %%build: hack around 'make docs' failures (on f22+) + +* Wed Jul 15 2015 Jan Grulich 5.5.0-7 +- restore previously dropped patches + +* Tue Jul 14 2015 Rex Dieter 5.5.0-6 +- disable bootstrap again + +* Tue Jul 14 2015 Rex Dieter 5.5.0-5 +- enable bootstrap (and disable failing docs) + +* Mon Jul 13 2015 Rex Dieter 5.5.0-4 +- Qt5 application crashes when connecting/disconnecting displays (#1083664) + +* Fri Jul 10 2015 Than Ngo - 5.5.0-3 +- add better fix for compile error on big endian + +* Thu Jul 09 2015 Than Ngo - 5.5.0-2 +- fix build failure on big endian platform (ppc64,s390x) + +* Mon Jun 29 2015 Helio Chissini de Castro - 5.5.0-0.5.rc +- Second round of builds now with bootstrap enabled due new qttools + +* Mon Jun 29 2015 Helio Chissini de Castro - 5.5.0-0.4.rc +- Enable bootstrap to first import on rawhide + +* Thu Jun 25 2015 Helio Chissini de Castro - 5.5.0-0.3.rc +- Disable bootstrap + +* Wed Jun 24 2015 Helio Chissini de Castro - 5.5.0-0.2.rc +- Update for official RC1 released packages + +* Mon Jun 15 2015 Daniel Vratil 5.5.0-0.1.rc +- Qt 5.5 RC 1 + +* Mon Jun 08 2015 Rex Dieter 5.4.2-2 +- rebase to latest SM patches (QTBUG-45484, QTBUG-46310) + +* Tue Jun 02 2015 Jan Grulich 5.4.2-1 +- Update to 5.4.2 + +* Tue May 26 2015 Rex Dieter 5.4.1-20 +- SM_CLIENT_ID property is not set (QTBUG-46310) + +* Mon May 25 2015 Rex Dieter 5.4.1-19 +- QWidget::setWindowRole does nothing (QTBUG-45484) + +* Wed May 20 2015 Rex Dieter 5.4.1-18 +- own /etc/xdg/QtProject +- Requires: qt-settings (f22+) + +* Sat May 16 2015 Rex Dieter 5.4.1-17 +- Try to ensure that -fPIC is used in CMake builds (QTBUG-45755) + +* Thu May 14 2015 Rex Dieter 5.4.1-16 +- Some Qt apps crash if they are compiled with gcc5 (QTBUG-45755) + +* Thu May 07 2015 Rex Dieter 5.4.1-15 +- try harder to avoid doc/multilib conflicts (#1212750) + +* Wed May 06 2015 Rex Dieter 5.4.1-14 +- Shortcuts with KeypadModifier not working (QTBUG-33093,#1219173) + +* Tue May 05 2015 Rex Dieter 5.4.1-13 +- backport: data corruption in QNetworkAccessManager + +* Fri May 01 2015 Rex Dieter - 5.4.1-12 +- backport a couple more upstream fixes +- introduce -common noarch subpkg, should help multilib issues + +* Sat Apr 25 2015 Rex Dieter 5.4.1-11 +- port qtdbusconnection_no_debug.patch from qt(4) + +* Fri Apr 17 2015 Rex Dieter 5.4.1-10 +- -examples: include %%{_qt5_docdir}/qdoc/examples-manifest.xml (#1212750) + +* Mon Apr 13 2015 Rex Dieter 5.4.1-9 +- Multiple Vulnerabilities in Qt Image Format Handling (CVE-2015-1860 CVE-2015-1859 CVE-2015-1858) + +* Fri Apr 10 2015 Rex Dieter - 5.4.1-8 +- -dbus=runtime on el6 (#1196359) +- %%build: -no-directfb + +* Wed Apr 01 2015 Daniel Vrátil - 5.4.1-7 +- drop 5.5 XCB patches, the rebase is incomplete and does not work properly with Qt 5.4 + +* Mon Mar 30 2015 Rex Dieter 5.4.1-6 +- Crash due to unsafe access to QTextLayout::lineCount (#1207279,QTBUG-43562) + +* Mon Mar 30 2015 Rex Dieter 5.4.1-5 +- unable to use input methods in ibus-1.5.10 (#1203575) + +* Wed Mar 25 2015 Daniel Vrátil - 5.4.1-4 +- pull in set of upstream Qt 5.5 fixes and improvements for XCB screen handling rebased to 5.4 + +* Fri Feb 27 2015 Rex Dieter - 5.4.1-3 +- pull in handful of upstream fixes, particularly... +- Fix a division by zero when processing malformed BMP files (QTBUG-44547, CVE-2015-0295) + +* Wed Feb 25 2015 Rex Dieter 5.4.1-2 +- try bootstrap=1 (f23) + +* Tue Feb 24 2015 Jan Grulich 5.4.1-1 +- update to 5.4.1 + +* Mon Feb 16 2015 Rex Dieter 5.4.0-13 +- -no-use-gold-linker (f22+, #1193044) + +* Thu Feb 12 2015 Rex Dieter 5.4.0-12 +- own %%{_qt5_plugindir}/{designer,iconengines,script,styles} + +* Thu Feb 05 2015 David Tardon - 5.4.0-11 +- full build after ICU soname bump + +* Wed Feb 04 2015 Petr Machata - 5.4.0-10 +- Bump for rebuild. + +* Sat Jan 31 2015 Rex Dieter 5.4.0-9 +- crashes when connecting/disconnecting displays (#1083664,QTBUG-42985) + +* Tue Jan 27 2015 David Tardon - 5.4.0-8 +- full build + +* Mon Jan 26 2015 David Tardon - 5.4.0-7 +- rebuild for ICU 54.1 + +* Sun Jan 18 2015 Rex Dieter 5.4.0-6 +- fix %%pre scriptlet + +* Sat Jan 17 2015 Rex Dieter 5.4.0-5 +- ship /etc/xdg/qtchooser/5.conf alternative instead (of qt5.conf) + +* Wed Dec 17 2014 Rex Dieter 5.4.0-4 +- workaround 'make docs' crasher on el6 (QTBUG-43057) + +* Thu Dec 11 2014 Rex Dieter 5.4.0-3 +- don't omit examples for bootstrap (needs work) + +* Wed Dec 10 2014 Rex Dieter 5.4.0-2 +- fix bootstrapping logic + +* Wed Dec 10 2014 Rex Dieter 5.4.0-1 +- 5.4.0 (final) + +* Fri Nov 28 2014 Rex Dieter 5.4.0-0.8.rc +- restore font rendering patch (#1052389,QTBUG-41590) + +* Thu Nov 27 2014 Rex Dieter 5.4.0-0.7.rc +- 5.4.0-rc + +* Wed Nov 12 2014 Rex Dieter 5.4.0-0.6.beta +- add versioned Requires: libxkbcommon dep + +* Tue Nov 11 2014 Rex Dieter 5.4.0-0.5.beta +- pull in slightly different upstreamed font rendering fix (#1052389,QTBUG-41590) + +* Mon Nov 10 2014 Rex Dieter 5.4.0-0.4.beta +- Bad font rendering (#1052389,QTBUG-41590) + +* Mon Nov 03 2014 Rex Dieter 5.4.0-0.3.beta +- macros.qt5: +%%qmake_qt5 , to help set standard build flags (CFLAGS, etc...) + +* Wed Oct 22 2014 Kevin Kofler - 5.4.0-0.2.beta +- -gui: don't require gtk2 (__requires_exclude_from platformthemes) (#1154884) + +* Sat Oct 18 2014 Rex Dieter - 5.4.0-0.1.beta +- 5.4.0-beta +- avoid extra -devel deps by moving *Plugin.cmake files to base pkgs +- support bootstrap macro, to disable -doc,-examples + +* Mon Oct 13 2014 Jan Grulich 5.3.2-3 +- QFileDialog: implement getOpenFileUrl and friends for real + +* Thu Oct 09 2014 Rex Dieter 5.3.2-2 +- use linux-g++ platform unconditionally + +* Thu Oct 09 2014 Kevin Kofler 5.3.2-1.1 +- F20: require libxkbcommon >= 0.4.1, only patch for the old libxcb + +* Tue Sep 16 2014 Rex Dieter 5.3.2-1 +- 5.3.2 + +* Wed Aug 27 2014 David Tardon - 5.3.1-8 +- do a normal build with docs + +* Tue Aug 26 2014 David Tardon - 5.3.1-7 +- rebuild for ICU 53.1 + +* Sun Aug 17 2014 Fedora Release Engineering - 5.3.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Jul 24 2014 Rex Dieter - 5.3.1-5 +- drop dep on xorg-x11-xinit (own shared dirs instead) +- fix/improve qtchooser support using alternatives (#1122316) + +* Mon Jun 30 2014 Kevin Kofler 5.3.1-4 +- support the old versions of libxcb and libxkbcommon in F19 and F20 +- don't use the bundled libxkbcommon + +* Mon Jun 30 2014 Rex Dieter 5.3.1-3 +- -devel: Requires: pkgconfig(egl) + +* Fri Jun 27 2014 Jan Grulich - 5.3.1-2 +- Prefer QPA implementation in qsystemtrayicon_x11 if available + +* Tue Jun 17 2014 Jan Grulich - 5.3.1-1 +- 5.3.1 + +* Sun Jun 08 2014 Fedora Release Engineering - 5.3.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 30 2014 Rex Dieter 5.3.0-6 +- %%ix86: build -no-sse2 (#1103185) + +* Tue May 27 2014 Rex Dieter 5.3.0-5 +- BR: pkgconfig(xcb-xkb) > 1.10 (f21+) +- allow possibility for libxkbcommon-0.4.x only + +* Fri May 23 2014 Rex Dieter 5.3.0-4 +- -system-libxkbcommon (f21+) + +* Thu May 22 2014 Rex Dieter 5.3.0-3 +- qt5-qtbase-5.3.0-2.fc21 breaks keyboard input (#1100213) + +* Wed May 21 2014 Rex Dieter 5.3.0-2 +- limit -reduce-relocations to %%ix86 x86_64 archs (QTBUG-36129) + +* Wed May 21 2014 Jan Grulich 5.3.0-1 +- 5.3.0 + +* Thu Apr 24 2014 Rex Dieter 5.2.1-8 +- DoS vulnerability in the GIF image handler (QTBUG-38367) + +* Wed Mar 26 2014 Rex Dieter 5.2.1-7 +- support ppc64le multilib (#1080629) + +* Wed Mar 12 2014 Kevin Kofler 5.2.1-6 +- reenable documentation + +* Sat Mar 08 2014 Kevin Kofler 5.2.1-5 +- make the QMAKE_STRIP sed not sensitive to whitespace (see #1074041 in Qt 4) + +* Tue Feb 18 2014 Rex Dieter 5.2.1-4 +- undefine QMAKE_STRIP (and friends), so we get useful -debuginfo pkgs (#1065636) + +* Wed Feb 12 2014 Rex Dieter 5.2.1-3 +- bootstrap for libicu bump + +* Wed Feb 05 2014 Rex Dieter 5.2.1-2 +- qconfig.pri: +alsa +kms +pulseaudio +xcb-sm + +* Wed Feb 05 2014 Rex Dieter 5.2.1-1 +- 5.2.1 + +* Sat Feb 01 2014 Rex Dieter 5.2.0-11 +- better %%rpm_macros_dir handling + +* Wed Jan 29 2014 Kevin Kofler - 5.2.0-10 +- fix the allow-forcing-llvmpipe patch to patch actual caller of __glXInitialize + +* Wed Jan 29 2014 Kevin Kofler - 5.2.0-9 +- use software OpenGL (llvmpipe) if the hardware driver doesn't support OpenGL 2 + +* Tue Jan 28 2014 Rex Dieter 5.2.0-8 +- (re)enable -docs + +* Mon Jan 27 2014 Rex Dieter - 5.2.0-7 +- unconditionally enable freetype lcd_filter +- (temp) disable docs (libxcb bootstrap) + +* Sun Jan 26 2014 Rex Dieter 5.2.0-6 +- fix %%_qt5_examplesdir macro + +* Sat Jan 25 2014 Rex Dieter 5.2.0-5 +- -examples subpkg + +* Mon Jan 13 2014 Kevin Kofler - 5.2.0-4 +- fix QTBUG-35459 (too low entityCharacterLimit=1024 for CVE-2013-4549) +- fix QTBUG-35460 (error message for CVE-2013-4549 is misspelled) +- reenable docs on Fedora (accidentally disabled) + +* Mon Jan 13 2014 Rex Dieter - 5.2.0-3 +- move sql build deps into subpkg sections +- macro'ize ibase,tds support (disabled on rhel) + +* Thu Jan 02 2014 Rex Dieter 5.2.0-2 +- -devel: qtsql apparently wants all drivers available at buildtime + +* Thu Dec 12 2013 Rex Dieter 5.2.0-1 +- 5.2.0 + +* Fri Dec 06 2013 Rex Dieter 5.2.0-0.12.rc1 +- qt5-base-devel.x86_64 qt5-base-devel.i686 file conflict qconfig.h (#1036956) + +* Thu Dec 05 2013 Rex Dieter - 5.2.0-0.11.rc1 +- needs a minimum version on sqlite build dependency (#1038617) +- fix build when doc macro not defined + +* Mon Dec 02 2013 Rex Dieter 5.2.0-0.10.rc1 +- 5.2.0-rc1 +- revert/omit recent egl packaging changes +- -doc install changes-5.* files here (#989149) + +* Tue Nov 26 2013 Rex Dieter 5.2.0-0.8.beta1.20131108_141 +- Install changes-5.x.y file (#989149) + +* Mon Nov 25 2013 Rex Dieter 5.2.0-0.7.beta1.20131108_141 +- enable -doc only on primary archs (allow secondary bootstrap) + +* Fri Nov 22 2013 Lubomir Rintel 5.2.0-0.6.beta1.20131108_141 +- Enable EGL support + +* Sat Nov 09 2013 Rex Dieter 5.2.0-0.5.beta1.20131108_141 +- 2013-11-08_141 snapshot, arm switch qreal double + +* Thu Oct 24 2013 Rex Dieter 5.2.0-0.4.beta1 +- 5.2.0-beta1 + +* Wed Oct 16 2013 Rex Dieter 5.2.0-0.3.alpha +- disable -docs (for ppc bootstrap mostly) + +* Wed Oct 16 2013 Lukáš Tinkl - 5.2.0-0.2.alpha +- Fixes #1005482 - qtbase FTBFS on ppc/ppc64 + +* Tue Oct 01 2013 Rex Dieter - 5.2.0-0.1.alpha +- 5.2.0-alpha +- -system-harfbuzz +- rename subpkg -x11 => -gui +- move some gui-related plugins base => -gui +- don't use symlinks in %%_qt5_bindir (more qtchooser-friendly) + +* Fri Sep 27 2013 Rex Dieter - 5.1.1-6 +- -doc subpkg (not enabled) +- enable %%check + +* Mon Sep 23 2013 Dan Horák - 5.1.1-5 +- fix big endian builds + +* Wed Sep 11 2013 Rex Dieter 5.1.1-4 +- macros.qt5: use newer location, use unexpanded macros + +* Sat Sep 07 2013 Rex Dieter 5.1.1-3 +- ExcludeArch: ppc64 ppc (#1005482) + +* Fri Sep 06 2013 Rex Dieter 5.1.1-2 +- BR: pkgconfig(libudev) pkgconfig(xkbcommon) pkgconfig(xcb-xkb) + +* Tue Aug 27 2013 Rex Dieter 5.1.1-1 +- 5.1.1 + +* Sat Aug 03 2013 Petr Pisar - 5.0.2-8 +- Perl 5.18 rebuild + +* Tue Jul 30 2013 Rex Dieter 5.0.2-7 +- enable qtchooser support + +* Wed Jul 17 2013 Petr Pisar - 5.0.2-6 +- Perl 5.18 rebuild + +* Wed May 08 2013 Than Ngo - 5.0.2-5 +- add poll support, thanks to fweimer@redhat.com (QTBUG-27195) + +* Thu Apr 18 2013 Rex Dieter 5.0.2-4 +- respin lowmem patch to apply (unconditionally) to gcc-4.7.2 too + +* Fri Apr 12 2013 Dan Horák - 5.0.2-3 +- rebase the lowmem patch + +* Wed Apr 10 2013 Rex Dieter 5.0.2-2 +- more cmake_path love (#929227) + +* Wed Apr 10 2013 Rex Dieter - 5.0.2-1 +- 5.0.2 +- fix cmake config (#929227) + +* Tue Apr 02 2013 Rex Dieter 5.0.2-0.1.rc1 +- 5.0.2-rc1 + +* Sat Mar 16 2013 Rex Dieter 5.0.1-6 +- pull in upstream gcc-4.8.0 buildfix + +* Tue Feb 26 2013 Rex Dieter 5.0.1-5 +- -static subpkg, Requires: fontconfig-devel,glib2-devel,zlib-devel +- -devel: Requires: pkgconfig(gl) + +* Mon Feb 25 2013 Rex Dieter 5.0.1-4 +- create/own %%{_qt5_plugindir}/iconengines +- -devel: create/own %%{_qt5_archdatadir}/mkspecs/modules +- cleanup .prl + +* Sat Feb 23 2013 Rex Dieter 5.0.1-3 +- +%%_qt5_libexecdir + +* Sat Feb 23 2013 Rex Dieter 5.0.1-2 +- macros.qt5: fix %%_qt5_headerdir, %%_qt5_datadir, %%_qt5_plugindir + +* Thu Jan 31 2013 Rex Dieter 5.0.1-1 +- 5.0.1 +- lowmem patch for %%arm, s390 + +* Wed Jan 30 2013 Rex Dieter 5.0.0-4 +- %%build: -system-pcre, BR: pkgconfig(libpcre) +- use -O1 optimization on lowmem (s390) arch + +* Thu Jan 24 2013 Rex Dieter 5.0.0-3 +- enable (non-conflicting) qtchooser support + +* Wed Jan 09 2013 Rex Dieter 5.0.0-2 +- add qtchooser support (disabled by default) + +* Wed Dec 19 2012 Rex Dieter 5.0.0-1 +- 5.0 (final) + +* Thu Dec 13 2012 Rex Dieter 5.0.0-0.4.rc2 +- 5.0-rc2 +- initial try at putting non-conflicting binaries in %%_bindir + +* Thu Dec 06 2012 Rex Dieter 5.0.0-0.3.rc1 +- 5.0-rc1 + +* Wed Nov 28 2012 Rex Dieter 5.0.0-0.2.beta2 +- qtbase --> qt5-qtbase + +* Mon Nov 19 2012 Rex Dieter 5.0.0-0.1.beta2 +- %%build: -accessibility +- macros.qt5: +%%_qt5_archdatadir +%%_qt5_settingsdir +- pull in a couple more configure-related upstream patches + +* Wed Nov 14 2012 Rex Dieter 5.0.0-0.0.beta2 +- first try +