From 445f28d26f44f8dd7d45c841a76c1bc66074f485 Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Wed, 4 Dec 2019 09:46:00 +0100 Subject: [PATCH] Replace all occurences of QPalette::Background with QPalette::Window QPalette::Background is deprecated and gives warning in Qt 5.13 --- ApplicationCode/UserInterface/RiuDraggableOverlayFrame.cpp | 2 +- ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.cpp | 2 +- ApplicationCode/UserInterface/RiuGridPlotWindow.cpp | 2 +- ApplicationCode/UserInterface/RiuPvtPlotPanel.cpp | 2 +- ApplicationCode/UserInterface/RiuQwtPlotTools.cpp | 2 +- .../UserInterface/RiuTofAccumulatedPhaseFractionsPlot.cpp | 4 ++-- ApplicationCode/UserInterface/RiuWellAllocationPlot.cpp | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ApplicationCode/UserInterface/RiuDraggableOverlayFrame.cpp b/ApplicationCode/UserInterface/RiuDraggableOverlayFrame.cpp index ec5ff5473f..b25995a238 100644 --- a/ApplicationCode/UserInterface/RiuDraggableOverlayFrame.cpp +++ b/ApplicationCode/UserInterface/RiuDraggableOverlayFrame.cpp @@ -31,7 +31,7 @@ RiuDraggableOverlayFrame::RiuDraggableOverlayFrame( QWidget* parent, QWidget* wi RiuWidgetDragger* dragger = new RiuWidgetDragger( this, widgetToSnapTo ); QPalette pal = this->palette(); - pal.setColor( QPalette::Background, backgroundColor ); + pal.setColor( QPalette::Window, backgroundColor ); setAutoFillBackground( true ); setPalette( pal ); setFrameShape( QFrame::Box ); diff --git a/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.cpp b/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.cpp index 5effd40dfc..68d46f67a0 100644 --- a/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.cpp +++ b/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.cpp @@ -65,7 +65,7 @@ RiuFlowCharacteristicsPlot::RiuFlowCharacteristicsPlot( RimFlowCharacteristicsPl // White background QPalette pal = this->palette(); - pal.setColor( QPalette::Background, Qt::white ); + pal.setColor( QPalette::Window, Qt::white ); this->setAutoFillBackground( true ); this->setPalette( pal ); diff --git a/ApplicationCode/UserInterface/RiuGridPlotWindow.cpp b/ApplicationCode/UserInterface/RiuGridPlotWindow.cpp index de0d49027d..57b3d48431 100644 --- a/ApplicationCode/UserInterface/RiuGridPlotWindow.cpp +++ b/ApplicationCode/UserInterface/RiuGridPlotWindow.cpp @@ -82,7 +82,7 @@ RiuGridPlotWindow::RiuGridPlotWindow( RimGridPlotWindow* plotDefinition, QWidget m_gridLayout->setSpacing( 1 ); QPalette newPalette( palette() ); - newPalette.setColor( QPalette::Background, Qt::white ); + newPalette.setColor( QPalette::Window, Qt::white ); setPalette( newPalette ); setAutoFillBackground( true ); diff --git a/ApplicationCode/UserInterface/RiuPvtPlotPanel.cpp b/ApplicationCode/UserInterface/RiuPvtPlotPanel.cpp index c666f9ca1f..6f2acce79b 100644 --- a/ApplicationCode/UserInterface/RiuPvtPlotPanel.cpp +++ b/ApplicationCode/UserInterface/RiuPvtPlotPanel.cpp @@ -129,7 +129,7 @@ void RiuPvtPlotWidget::setPlotDefaults( QwtPlot* plot ) { // Plot background and frame look QPalette newPalette( plot->palette() ); - newPalette.setColor( QPalette::Background, Qt::white ); + newPalette.setColor( QPalette::Window, Qt::white ); plot->setPalette( newPalette ); plot->setAutoFillBackground( true ); diff --git a/ApplicationCode/UserInterface/RiuQwtPlotTools.cpp b/ApplicationCode/UserInterface/RiuQwtPlotTools.cpp index 465c889bc5..cddac8a637 100644 --- a/ApplicationCode/UserInterface/RiuQwtPlotTools.cpp +++ b/ApplicationCode/UserInterface/RiuQwtPlotTools.cpp @@ -39,7 +39,7 @@ void RiuQwtPlotTools::setCommonPlotBehaviour( QwtPlot* plot ) // Plot background and frame look QPalette newPalette( plot->palette() ); - newPalette.setColor( QPalette::Background, Qt::white ); + newPalette.setColor( QPalette::Window, Qt::white ); plot->setPalette( newPalette ); plot->setAutoFillBackground( true ); diff --git a/ApplicationCode/UserInterface/RiuTofAccumulatedPhaseFractionsPlot.cpp b/ApplicationCode/UserInterface/RiuTofAccumulatedPhaseFractionsPlot.cpp index 8d73f9558d..18a7184ce8 100644 --- a/ApplicationCode/UserInterface/RiuTofAccumulatedPhaseFractionsPlot.cpp +++ b/ApplicationCode/UserInterface/RiuTofAccumulatedPhaseFractionsPlot.cpp @@ -54,7 +54,7 @@ RiuTofAccumulatedPhaseFractionsPlot::RiuTofAccumulatedPhaseFractionsPlot( RimTof m_plotDefinition = plotDefinition; QPalette newPalette( palette() ); - newPalette.setColor( QPalette::Background, Qt::white ); + newPalette.setColor( QPalette::Window, Qt::white ); setPalette( newPalette ); setAutoFillBackground( true ); @@ -225,7 +225,7 @@ void RiuTofAccumulatedPhaseFractionsPlot::setCommonPlotBehaviour( QwtPlot* plot // Plot background and frame look QPalette newPalette( plot->palette() ); - newPalette.setColor( QPalette::Background, Qt::white ); + newPalette.setColor( QPalette::Window, Qt::white ); plot->setPalette( newPalette ); plot->setAutoFillBackground( true ); diff --git a/ApplicationCode/UserInterface/RiuWellAllocationPlot.cpp b/ApplicationCode/UserInterface/RiuWellAllocationPlot.cpp index 6d0513e233..4edf19053f 100644 --- a/ApplicationCode/UserInterface/RiuWellAllocationPlot.cpp +++ b/ApplicationCode/UserInterface/RiuWellAllocationPlot.cpp @@ -62,7 +62,7 @@ RiuWellAllocationPlot::RiuWellAllocationPlot( RimWellAllocationPlot* plotDefinit // White background QPalette pal = this->palette(); - pal.setColor( QPalette::Background, Qt::white ); + pal.setColor( QPalette::Window, Qt::white ); this->setAutoFillBackground( true ); this->setPalette( pal );