Merge pull request #112177 from kanashimia/qtstyleplugins

authored by

Sandro and committed by
GitHub
67fe0bc3 df4a9849

+15 -47
+15 -3
pkgs/development/libraries/qtstyleplugins/default.nix
··· 1 - { lib, mkDerivation, fetchFromGitHub, qmake, pkg-config, gtk2 }: 1 + { lib, mkDerivation, fetchFromGitHub, fetchpatch, qmake, pkg-config, gtk2 }: 2 2 3 3 mkDerivation { 4 - name = "qtstyleplugins-2017-03-11"; 4 + pname = "qtstyleplugins"; 5 + version = "unstable-2017-03-11"; 5 6 6 7 src = fetchFromGitHub { 7 8 owner = "qt"; ··· 10 11 sha256 = "085wyn85nrmzr8nv5zv7fi2kqf8rp1gnd30h72s30j55xvhmxvmy"; 11 12 }; 12 13 13 - patches = [ ./fix-build-against-Qt-5.15.patch ]; 14 + patches = [ 15 + (fetchpatch rec { 16 + name = "0001-fix-build-against-Qt-5.15.patch"; 17 + url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=qt5-styleplugins"; 18 + sha256 = "j0CgfutqFawy11IqFnlrkfMsMD01NjX/MkfVEVxj1QM="; 19 + }) 20 + (fetchpatch rec { 21 + name = "0002-fix-gtk2-background.patch"; 22 + url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=qt5-styleplugins"; 23 + sha256 = "qUOkNckrSUEzXY1PUZKfbiCjhNyB5ZBw2IN/j32GKM4="; 24 + }) 25 + ]; 14 26 15 27 nativeBuildInputs = [ pkg-config qmake ]; 16 28 buildInputs = [ gtk2 ];
-44
pkgs/development/libraries/qtstyleplugins/fix-build-against-Qt-5.15.patch
··· 1 - From 335dbece103e2cbf6c7cf819ab6672c2956b17b3 Mon Sep 17 00:00:00 2001 2 - From: Fabian Vogt <fvogt@suse.de> 3 - Date: Thu, 28 May 2020 12:35:42 +0200 4 - Subject: [PATCH] fix build against Qt 5.15 5 - 6 - With 0a93db4d82c051164923a10e4382b12de9049b45 ("Unify application 7 - palette handling between QGuiApplication and QApplication") 8 - QApplicationPrivate::setSystemPalette is no longer used and necessary. 9 - --- 10 - src/plugins/styles/gtk2/qgtkstyle.cpp | 2 ++ 11 - src/plugins/styles/gtk2/qgtkstyle_p.cpp | 2 ++ 12 - 2 files changed, 4 insertions(+) 13 - 14 - diff --git a/src/plugins/styles/gtk2/qgtkstyle.cpp b/src/plugins/styles/gtk2/qgtkstyle.cpp 15 - index 36169c9..2544593 100644 16 - --- a/src/plugins/styles/gtk2/qgtkstyle.cpp 17 - +++ b/src/plugins/styles/gtk2/qgtkstyle.cpp 18 - @@ -440,7 +440,9 @@ void QGtkStyle::polish(QApplication *app) 19 - // not supported as these should be entirely determined by 20 - // current Gtk settings 21 - if (app->desktopSettingsAware() && d->isThemeAvailable()) { 22 - +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) 23 - QApplicationPrivate::setSystemPalette(standardPalette()); 24 - +#endif 25 - QApplicationPrivate::setSystemFont(d->getThemeFont()); 26 - d->applyCustomPaletteHash(); 27 - if (!d->isKDE4Session()) 28 - diff --git a/src/plugins/styles/gtk2/qgtkstyle_p.cpp b/src/plugins/styles/gtk2/qgtkstyle_p.cpp 29 - index e57b3d8..e71beb0 100644 30 - --- a/src/plugins/styles/gtk2/qgtkstyle_p.cpp 31 - +++ b/src/plugins/styles/gtk2/qgtkstyle_p.cpp 32 - @@ -508,7 +508,9 @@ void QGtkStyleUpdateScheduler::updateTheme() 33 - if (oldTheme != QGtkStylePrivate::getThemeName()) { 34 - oldTheme = QGtkStylePrivate::getThemeName(); 35 - QPalette newPalette = qApp->style()->standardPalette(); 36 - +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) 37 - QApplicationPrivate::setSystemPalette(newPalette); 38 - +#endif 39 - QApplication::setPalette(newPalette); 40 - if (!QGtkStylePrivate::instances.isEmpty()) { 41 - QGtkStylePrivate::instances.last()->initGtkWidgets(); 42 - -- 43 - 2.26.2 44 -