0001-fix-build-against-Qt-5.15.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. With 0a93db4d82c051164923a10e4382b12de9049b45 ("Unify application
  6. palette handling between QGuiApplication and QApplication")
  7. QApplicationPrivate::setSystemPalette is no longer used and necessary.
  8. ---
  9. src/plugins/styles/gtk2/qgtkstyle.cpp | 2 ++
  10. src/plugins/styles/gtk2/qgtkstyle_p.cpp | 2 ++
  11. 2 files changed, 4 insertions(+)
  12. diff --git a/src/plugins/styles/gtk2/qgtkstyle.cpp b/src/plugins/styles/gtk2/qgtkstyle.cpp
  13. index 36169c9..2544593 100644
  14. --- a/src/plugins/styles/gtk2/qgtkstyle.cpp
  15. +++ b/src/plugins/styles/gtk2/qgtkstyle.cpp
  16. @@ -440,7 +440,9 @@ void QGtkStyle::polish(QApplication *app)
  17. // not supported as these should be entirely determined by
  18. // current Gtk settings
  19. if (app->desktopSettingsAware() && d->isThemeAvailable()) {
  20. +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
  21. QApplicationPrivate::setSystemPalette(standardPalette());
  22. +#endif
  23. QApplicationPrivate::setSystemFont(d->getThemeFont());
  24. d->applyCustomPaletteHash();
  25. if (!d->isKDE4Session())
  26. diff --git a/src/plugins/styles/gtk2/qgtkstyle_p.cpp b/src/plugins/styles/gtk2/qgtkstyle_p.cpp
  27. index e57b3d8..e71beb0 100644
  28. --- a/src/plugins/styles/gtk2/qgtkstyle_p.cpp
  29. +++ b/src/plugins/styles/gtk2/qgtkstyle_p.cpp
  30. @@ -508,7 +508,9 @@ void QGtkStyleUpdateScheduler::updateTheme()
  31. if (oldTheme != QGtkStylePrivate::getThemeName()) {
  32. oldTheme = QGtkStylePrivate::getThemeName();
  33. QPalette newPalette = qApp->style()->standardPalette();
  34. +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
  35. QApplicationPrivate::setSystemPalette(newPalette);
  36. +#endif
  37. QApplication::setPalette(newPalette);
  38. if (!QGtkStylePrivate::instances.isEmpty()) {
  39. QGtkStylePrivate::instances.last()->initGtkWidgets();
  40. --
  41. 2.26.2