changeset 28840:99e85801d73f stable

avoid deprecated Qt QPalette::background function * TerminalView.cpp: Use QPalette::window instead of QPalette::background.
author John W. Eaton <jwe@octave.org>
date Tue, 14 Jul 2020 00:48:10 -0400
parents f82bd6a1a6c0
children f1094bbf516b
files libgui/qterminal/libqterminal/unix/TerminalView.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/unix/TerminalView.cpp	Mon Jul 13 15:54:38 2020 -0400
+++ b/libgui/qterminal/libqterminal/unix/TerminalView.cpp	Tue Jul 14 00:48:10 2020 -0400
@@ -440,7 +440,7 @@
   QRect contentsRect = contentsRegion.boundingRect();
 
   painter.fillRect(contentsRect, backgroundColor);
-  painter.fillRect(scrollBarArea,_scrollBar->palette().background());
+  painter.fillRect(scrollBarArea,_scrollBar->palette().window());
 }
 
 void TerminalView::drawCursor(QPainter& painter,
@@ -549,7 +549,7 @@
   const QColor backgroundColor = style->backgroundColor.color(_colorTable);
 
   // draw background if different from the display's background color
-  if ( backgroundColor != palette().background().color() )
+  if ( backgroundColor != palette().window().color() )
     drawBackground(painter,rect,backgroundColor);
 
   // draw cursor shape if the current character is the cursor
@@ -959,7 +959,7 @@
 
   foreach (QRect rect, (pe->region() & contentsRect()).rects())
     {
-      drawBackground(paint,rect,palette().background().color());
+      drawBackground(paint,rect,palette().window().color());
       drawContents(paint, rect);
     }
   //    drawBackground(paint,contentsRect(),palette().background().color(),	true /* use opacity setting */);