about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/qtstyleplugins
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-10 07:13:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-12 14:07:16 +0000
commite2698550456abba83c6dcd5d5e5a9990a0b96f8a (patch)
tree79a56f0df3fa55e470d84b4dff6059fbf487ec18 /nixpkgs/pkgs/development/libraries/qtstyleplugins
parent1cdc42df888dc98c347e03bd942ed9825a55bcb3 (diff)
parent84d74ae9c9cbed73274b8e4e00be14688ffc93fe (diff)
downloadnixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.gz
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.bz2
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.lz
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.xz
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.zst
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.zip
Merge commit '84d74ae9c9cbed73274b8e4e00be14688ffc93fe'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qtstyleplugins')
-rw-r--r--nixpkgs/pkgs/development/libraries/qtstyleplugins/default.nix2
-rw-r--r--nixpkgs/pkgs/development/libraries/qtstyleplugins/fix-build-against-Qt-5.15.patch44
2 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qtstyleplugins/default.nix b/nixpkgs/pkgs/development/libraries/qtstyleplugins/default.nix
index ac5755f7c3d9..1970dd183c1c 100644
--- a/nixpkgs/pkgs/development/libraries/qtstyleplugins/default.nix
+++ b/nixpkgs/pkgs/development/libraries/qtstyleplugins/default.nix
@@ -10,6 +10,8 @@ mkDerivation {
     sha256 = "085wyn85nrmzr8nv5zv7fi2kqf8rp1gnd30h72s30j55xvhmxvmy";
   };
 
+  patches = [ ./fix-build-against-Qt-5.15.patch ];
+
   nativeBuildInputs = [ pkgconfig qmake ];
   buildInputs = [ gtk2 ];
 
diff --git a/nixpkgs/pkgs/development/libraries/qtstyleplugins/fix-build-against-Qt-5.15.patch b/nixpkgs/pkgs/development/libraries/qtstyleplugins/fix-build-against-Qt-5.15.patch
new file mode 100644
index 000000000000..7eb744158204
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtstyleplugins/fix-build-against-Qt-5.15.patch
@@ -0,0 +1,44 @@
+From 335dbece103e2cbf6c7cf819ab6672c2956b17b3 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fvogt@suse.de>
+Date: Thu, 28 May 2020 12:35:42 +0200
+Subject: [PATCH] fix build against Qt 5.15
+
+With 0a93db4d82c051164923a10e4382b12de9049b45 ("Unify application
+palette handling between QGuiApplication and QApplication")
+QApplicationPrivate::setSystemPalette is no longer used and necessary.
+---
+ src/plugins/styles/gtk2/qgtkstyle.cpp   | 2 ++
+ src/plugins/styles/gtk2/qgtkstyle_p.cpp | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/src/plugins/styles/gtk2/qgtkstyle.cpp b/src/plugins/styles/gtk2/qgtkstyle.cpp
+index 36169c9..2544593 100644
+--- a/src/plugins/styles/gtk2/qgtkstyle.cpp
++++ b/src/plugins/styles/gtk2/qgtkstyle.cpp
+@@ -440,7 +440,9 @@ 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());
++#endif
+         QApplicationPrivate::setSystemFont(d->getThemeFont());
+         d->applyCustomPaletteHash();
+         if (!d->isKDE4Session())
+diff --git a/src/plugins/styles/gtk2/qgtkstyle_p.cpp b/src/plugins/styles/gtk2/qgtkstyle_p.cpp
+index e57b3d8..e71beb0 100644
+--- a/src/plugins/styles/gtk2/qgtkstyle_p.cpp
++++ b/src/plugins/styles/gtk2/qgtkstyle_p.cpp
+@@ -508,7 +508,9 @@ void QGtkStyleUpdateScheduler::updateTheme()
+       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();
+-- 
+2.26.2
+