From 963ddafeaabd2853002df66b6e873a379a75c45a Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Mon, 1 Jul 2019 14:32:50 +0200 Subject: QtDialog: Use QPalette::WindowText instead of QPalette::Foreground `QPalette::Foreground` is deprecated and was replaced by `QPalette::WindowText` since at least Qt 4.8. https://doc.qt.io/archives/qt-4.8/qpalette.html#ColorRole-enum This replaces the `QPalette::Foreground` color role with `QPalette::WindowText` in `QtDialog/RegexExplorer.cxx` to avoid compiler warnings. --- Source/QtDialog/RegexExplorer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/QtDialog/RegexExplorer.cxx b/Source/QtDialog/RegexExplorer.cxx index cb67f85..746fd8a 100644 --- a/Source/QtDialog/RegexExplorer.cxx +++ b/Source/QtDialog/RegexExplorer.cxx @@ -20,7 +20,7 @@ void RegexExplorer::setStatusColor(QWidget* widget, bool successful) QColor color = successful ? QColor(0, 127, 0) : Qt::red; QPalette palette = widget->palette(); - palette.setColor(QPalette::Foreground, color); + palette.setColor(QPalette::WindowText, color); widget->setPalette(palette); } -- cgit v0.12