From 335dbece103e2cbf6c7cf819ab6672c2956b17b3 Mon Sep 17 00:00:00 2001 From: Fabian Vogt 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.orig 2017-03-11 09:23:02 UTC +++ 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()) src/plugins/styles/gtk2/qgtkstyle.cpp | 2 ++ src/plugins/styles/gtk2/qgtkstyle_p.cpp | 2 ++ 2 files changed, 4 insertions(+) --- src/plugins/styles/gtk2/qgtkstyle_p.cpp.orig 2017-03-11 09:23:02 UTC +++ 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();