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.
This commit is contained in:
Sebastian Holtermann 2019-07-01 14:32:50 +02:00 committed by Brad King
parent 1a2d6bdefc
commit 963ddafeaa

View File

@ -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);
}