diff options
author | James Le Cuirot <chewi@gentoo.org> | 2020-09-30 22:09:29 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2020-09-30 22:09:29 +0100 |
commit | dbec6742130b46eed6a2b1943a1af76e46a1fdbf (patch) | |
tree | 11f7cf37da47d9b918bf6c038d56c7ce52c60a3b /dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch | |
parent | net-misc/openssh-8.4_p1: Version bump (no X509 support yet) (diff) | |
download | gentoo-dbec6742130b46eed6a2b1943a1af76e46a1fdbf.tar.gz gentoo-dbec6742130b46eed6a2b1943a1af76e46a1fdbf.tar.bz2 gentoo-dbec6742130b46eed6a2b1943a1af76e46a1fdbf.zip |
dev-qt/qtstyleplugins: New package
Closes: https://bugs.gentoo.org/579880
Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch')
-rw-r--r-- | dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch b/dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch new file mode 100644 index 000000000000..caedd05baa83 --- /dev/null +++ b/dev-qt/qtstyleplugins/files/fix-build-qt5.15.patch @@ -0,0 +1,47 @@ +From: Fabian Vogt <fvogt@suse.de> +Subject: Fix build against Qt 5.15 + +With 0a93db4d82c051164923a10e4382b12de9049b45 +("Unify application palette handling between QGuiApplication and QApplication") +QApplicationPrivate::setSystemPalette does no longer exist. + +This style does explictly not support "system colors" defined by the platform +theme, which have priority over the style provided palette. To prevent the +theme from overriding the colors, it previously used the system palette +mechanism (which has priority over the theme), but that way does not work +anymore. Instead, simply use QApplication::setPalette. While that has +different behaviour and might break in some applications, it's better than +having a completely messed up palette with certain themes. +This is the same change as suggested by gamezelda on +https://aur.archlinux.org/packages/qt5-styleplugins/#comment-749190. + +Index: qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle.cpp +=================================================================== +--- qtstyleplugins-opensource-src-5.0.0+git20170311.orig/src/plugins/styles/gtk2/qgtkstyle.cpp ++++ qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle.cpp +@@ -440,7 +440,11 @@ void QGtkStyle::polish(QApplication *app + // not supported as these should be entirely determined by + // current Gtk settings + if (app->desktopSettingsAware() && d->isThemeAvailable()) { ++#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + QApplicationPrivate::setSystemPalette(standardPalette()); ++#else ++ QApplication::setPalette(standardPalette()); ++#endif + QApplicationPrivate::setSystemFont(d->getThemeFont()); + d->applyCustomPaletteHash(); + if (!d->isKDE4Session()) +Index: qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle_p.cpp +=================================================================== +--- qtstyleplugins-opensource-src-5.0.0+git20170311.orig/src/plugins/styles/gtk2/qgtkstyle_p.cpp ++++ qtstyleplugins-opensource-src-5.0.0+git20170311/src/plugins/styles/gtk2/qgtkstyle_p.cpp +@@ -508,7 +508,9 @@ void QGtkStyleUpdateScheduler::updateThe + if (oldTheme != QGtkStylePrivate::getThemeName()) { + oldTheme = QGtkStylePrivate::getThemeName(); + QPalette newPalette = qApp->style()->standardPalette(); ++#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + QApplicationPrivate::setSystemPalette(newPalette); ++#endif + QApplication::setPalette(newPalette); + if (!QGtkStylePrivate::instances.isEmpty()) { + QGtkStylePrivate::instances.last()->initGtkWidgets(); |