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:
parent
1a2d6bdefc
commit
963ddafeaa
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user