Commit a49b7fd1 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Port deprecated QPalette::foreground() -> QPalette::windowText()

parent 0a23a491
...@@ -71,7 +71,7 @@ namespace { ...@@ -71,7 +71,7 @@ namespace {
QColor defaultColor(const QPalette& palette) QColor defaultColor(const QPalette& palette)
{ {
return palette.foreground().color(); return palette.windowText().color();
} }
QColor colorForDocument(const QUrl& url, const QPalette& palette, const QColor& defaultColor) QColor colorForDocument(const QUrl& url, const QPalette& palette, const QColor& defaultColor)
......
...@@ -66,7 +66,7 @@ QColor WidgetColorizer::colorForId(uint id, const QPalette& activePalette, bool ...@@ -66,7 +66,7 @@ QColor WidgetColorizer::colorForId(uint id, const QPalette& activePalette, bool
auto color = QColor(qAbs(id % (high - low)), auto color = QColor(qAbs(id % (high - low)),
qAbs((id / 50) % (high - low)), qAbs((id / 50) % (high - low)),
qAbs((id / (50 * 50)) % (high - low))); qAbs((id / (50 * 50)) % (high - low)));
const auto& foreground = activePalette.foreground().color(); const auto& foreground = activePalette.windowText().color();
const auto& background = activePalette.background().color(); const auto& background = activePalette.background().color();
if (forBackground) { if (forBackground) {
return blendBackground(color, .5, foreground, background); return blendBackground(color, .5, foreground, background);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment