From 14719b3ec30c9cbba53d18bc36ea204dcc395661 Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Tue, 31 Dec 2019 18:52:59 +0100 Subject: [PATCH] Port from deprecated QPalette::background() > QPalette::window() Signed-off-by: Juraj Oravec --- src/lib/webengine/webscrollbar.cpp | 2 +- src/lib/webengine/webscrollbarmanager.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/webengine/webscrollbar.cpp b/src/lib/webengine/webscrollbar.cpp index 36abd9801..e294dbbf0 100644 --- a/src/lib/webengine/webscrollbar.cpp +++ b/src/lib/webengine/webscrollbar.cpp @@ -88,6 +88,6 @@ void WebScrollBar::performScroll() void WebScrollBar::paintEvent(QPaintEvent *ev) { QPainter painter(this); - painter.fillRect(ev->rect(), palette().background()); + painter.fillRect(ev->rect(), palette().window()); QScrollBar::paintEvent(ev); } diff --git a/src/lib/webengine/webscrollbarmanager.cpp b/src/lib/webengine/webscrollbarmanager.cpp index 0ffb2fdb8..37d4dd691 100644 --- a/src/lib/webengine/webscrollbarmanager.cpp +++ b/src/lib/webengine/webscrollbarmanager.cpp @@ -58,15 +58,13 @@ public: private: void paintEvent(QPaintEvent *ev) override { - Q_UNUSED(ev) - QStyleOption option; option.initFrom(this); option.rect = rect(); QPainter p(this); if (mApp->styleName() == QL1S("breeze")) { - p.fillRect(ev->rect(), option.palette.background()); + p.fillRect(ev->rect(), option.palette.window()); } else { style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this); }