1
0
forked from pool/virtualbox

Accepting request 1039169 from home:lwfinger:branches:Virtualization

Fixes boo#1205868 - VirtualBox 7.0.4 crashes when machine log is requested from GUI

OBS-URL: https://build.opensuse.org/request/show/1039169
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=668
This commit is contained in:
Larry Finger 2022-11-30 17:29:15 +00:00 committed by Git OBS Bridge
parent f0db97f1a1
commit b4a9166761
3 changed files with 10 additions and 305 deletions

View File

@ -1,301 +0,0 @@
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp
@@ -124,10 +124,6 @@ void UITools::preparePalette()
{
/* Setup palette: */
setAutoFillBackground(true);
- QPalette pal = palette();
- QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);
- pal.setColor(QPalette::Window, bodyColor);
- setPalette(pal);
}
void UITools::prepareLayout()
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
@@ -1323,7 +1323,7 @@ void UIVirtualBoxManager::prepareMenuBar
/* Make sure menu-bar fills own solid background: */
menuBar()->setAutoFillBackground(true);
QPalette pal = menuBar()->palette();
- const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(160);
+ const QColor color = pal.color(QPalette::Active, QPalette::Window);
pal.setColor(QPalette::Active, QPalette::Button, color);
menuBar()->setPalette(pal);
}
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
@@ -121,10 +121,6 @@ void UIChooser::preparePalette()
{
/* Setup palette: */
setAutoFillBackground(true);
- QPalette pal = palette();
- QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);
- pal.setColor(QPalette::Window, bodyColor);
- setPalette(pal);
}
void UIChooser::prepareLayout()
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
@@ -909,7 +909,7 @@ void UIChooserItemMachine::paintBackgrou
else
{
/* Prepare color: */
- QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid);
+ QColor backgroundColor = pal.color(QPalette::Active, QPalette::Button);
/* Draw gradient: */
QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft());
bgGrad.setColorAt(0, backgroundColor.lighter(m_iDefaultLightnessMax));
@@ -938,7 +938,7 @@ void UIChooserItemMachine::paintBackgrou
/* Default background: */
else
{
- QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid);
+ QColor backgroundColor = pal.color(QPalette::Active, QPalette::Button);
color1 = backgroundColor.lighter(m_iDefaultLightnessMax);
color2 = backgroundColor.lighter(m_iDefaultLightnessMax - 70);
}
@@ -959,7 +959,7 @@ void UIChooserItemMachine::paintBackgrou
/* Default background: */
else
{
- QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid);
+ QColor backgroundColor = pal.color(QPalette::Active, QPalette::Button);
color1 = backgroundColor.lighter(m_iDefaultLightnessMin);
color2 = backgroundColor.lighter(m_iDefaultLightnessMin - 40);
}
@@ -994,7 +994,7 @@ void UIChooserItemMachine::paintFrame(QP
strokeColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(m_iHoverLightnessMin - 50);
/* Default frame: */
else
- strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultLightnessMin);
+ strokeColor = pal.color(QPalette::Active, QPalette::Button).lighter(m_iDefaultLightnessMin);
/* Create/assign pen: */
QPen pen(strokeColor);
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
@@ -716,7 +716,7 @@ void UIToolsItem::paintBackground(QPaint
/* Prepare color: */
const QColor backgroundColor = isEnabled()
? pal.color(QPalette::Active, QPalette::Highlight)
- : pal.color(QPalette::Disabled, QPalette::Midlight);
+ : pal.color(QPalette::Disabled, QPalette::Highlight);
/* Draw gradient: */
QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft());
bgGrad.setColorAt(0, backgroundColor.lighter(m_iHighlightLightnessMax));
@@ -755,7 +755,7 @@ void UIToolsItem::paintBackground(QPaint
/* Prepare color: */
const QColor backgroundColor = isEnabled()
? pal.color(QPalette::Active, QPalette::Highlight)
- : pal.color(QPalette::Disabled, QPalette::Midlight);
+ : pal.color(QPalette::Disabled, QPalette::Highlight);
/* Draw gradient: */
QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft());
bgGrad.setColorAt(0, backgroundColor.lighter(m_iHoverLightnessMax));
@@ -793,8 +793,8 @@ void UIToolsItem::paintBackground(QPaint
{
/* Prepare color: */
const QColor backgroundColor = isEnabled()
- ? pal.color(QPalette::Active, QPalette::Mid)
- : pal.color(QPalette::Disabled, QPalette::Midlight);
+ ? pal.color(QPalette::Active, QPalette::Window)
+ : pal.color(QPalette::Disabled, QPalette::Window);
/* Draw gradient: */
QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft());
bgGrad.setColorAt(0, backgroundColor.lighter(m_iDefaultLightnessMax));
@@ -827,7 +827,7 @@ void UIToolsItem::paintFrame(QPainter *p
strokeColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(m_iHoverLightnessMin - 50);
/* Default frame: */
else
- strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultLightnessMin);
+ strokeColor = pal.color(QPalette::Active, QPalette::Button).lighter(m_iDefaultLightnessMin);
/* Create/assign pen: */
QPen pen(strokeColor);
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
@@ -352,14 +352,6 @@ void UIVirtualBoxManagerWidget::prepare(
{
/* Configure palette: */
setAutoFillBackground(true);
- QPalette pal = palette();
-#ifdef VBOX_WS_MAC
- const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(145);
-#else
- const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(160);
-#endif
- pal.setColor(QPalette::Window, color);
- setPalette(pal);
/* Prepare: */
prepareWidgets();
@@ -490,7 +482,7 @@ void UIVirtualBoxManagerWidget::prepareW
}
/* Adjust splitter colors according to main widgets it splits: */
- m_pSplitter->configureColor(palette().color(QPalette::Active, QPalette::Midlight).darker(110));
+ m_pSplitter->configureColor(palette().color(QPalette::Active, QPalette::Button).darker(110));
/* Set the initial distribution. The right site is bigger. */
m_pSplitter->setStretchFactor(0, 2);
m_pSplitter->setStretchFactor(1, 3);
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp
@@ -646,7 +646,7 @@ void UIChooserItem::paintFlatButton(QPai
/* Prepare colors: */
const QPalette pal = QApplication::palette();
- const QColor color = pal.color(QPalette::Active, QPalette::Mid);
+ const QColor color = pal.color(QPalette::Active, QPalette::Button);
/* Prepare pen: */
QPen pen;
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp
@@ -245,10 +245,6 @@ void UIChooserView::prepare()
void UIChooserView::preparePalette()
{
/* Setup palette: */
- QPalette pal = qApp->palette();
- const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);
- pal.setColor(QPalette::Base, bodyColor);
- setPalette(pal);
}
void UIChooserView::resizeEvent(QResizeEvent *pEvent)
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp
@@ -182,10 +182,6 @@ void UIToolsView::prepare()
void UIToolsView::preparePalette()
{
/* Setup palette: */
- QPalette pal = qApp->palette();
- const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);
- pal.setColor(QPalette::Base, bodyColor);
- setPalette(pal);
}
void UIToolsView::resizeEvent(QResizeEvent *pEvent)
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp
@@ -1185,7 +1185,7 @@ void UIDetailsElement::paintBackground(Q
const QPalette pal = palette();
/* Paint default background: */
- const QColor defaultColor = pal.color(QPalette::Active, QPalette::Mid);
+ const QColor defaultColor = pal.color(QPalette::Active, QPalette::Window);
const QColor dcTone1 = defaultColor.lighter(m_iDefaultToneFinal);
const QColor dcTone2 = defaultColor.lighter(m_iDefaultToneStart);
QLinearGradient gradientDefault(fullRect.topLeft(), fullRect.bottomLeft());
@@ -1226,7 +1226,7 @@ void UIDetailsElement::paintFrame(QPaint
: optionRect;
/* Paint frame: */
- const QColor strokeColor = palette().color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultToneStart);
+ const QColor strokeColor = palette().color(QPalette::Active, QPalette::Window).lighter(m_iDefaultToneStart);
QPen pen(strokeColor);
pen.setWidth(0);
pPainter->setPen(pen);
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
@@ -110,7 +110,7 @@ void UIToolBar::paintEvent(QPaintEvent *
const QRect rectangle = pEvent->rect();
/* Prepare gradient: */
- const QColor backgroundColor = palette().color(QPalette::Active, QPalette::Mid);
+ const QColor backgroundColor = palette().color(QPalette::Active, QPalette::Window);
QLinearGradient gradient(rectangle.topLeft(), rectangle.bottomLeft());
gradient.setColorAt(0, backgroundColor.lighter(130));
gradient.setColorAt(1, backgroundColor.lighter(125));
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
@@ -706,7 +706,7 @@ void UIDetailsSet::paintBackground(QPain
const QRect optionRect = pOptions->rect;
/* Paint default background: */
- const QColor defaultColor = palette().color(QPalette::Active, QPalette::Midlight).darker(110);
+ const QColor defaultColor = palette().color(QPalette::Active, QPalette::Window).darker(110);
pPainter->fillRect(optionRect, defaultColor);
/* Restore painter: */
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp
@@ -639,7 +639,7 @@ void UIChooserItemGlobal::paintBackgroun
pPainter->fillRect(rectangle, bgGrad);
#else
/* Prepare color: */
- QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid).lighter(160);
+ QColor backgroundColor = pal.color(QPalette::Active, QPalette::Window).lighter(160);
/* Draw gradient: */
pPainter->fillRect(rectangle, backgroundColor);
#endif
@@ -670,7 +670,7 @@ void UIChooserItemGlobal::paintFrame(QPa
strokeColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(m_iHoverLightnessMin - 50);
/* Default frame: */
else
- strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultLightnessMin);
+ strokeColor = pal.color(QPalette::Active, QPalette::Window).lighter(m_iDefaultLightnessMin);
/* Create/assign pen: */
QPen pen(strokeColor);
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp
@@ -283,7 +283,7 @@ void UIDetailsGroup::paintBackground(QPa
#ifdef VBOX_WS_MAC
const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(145);
#else
- const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(160);
+ const QColor defaultColor = palette().color(QPalette::Active, QPalette::Window).lighter(160);
#endif
pPainter->fillRect(optionRect, defaultColor);
Index: VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
===================================================================
--- VirtualBox-6.1.38.orig/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
+++ VirtualBox-6.1.38/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
@@ -1500,7 +1500,7 @@ void UIChooserItemGroup::paintBackground
const QPalette pal = palette();
const QColor headerColor = pal.color(QPalette::Active,
model()->selectedItems().contains(this) ?
- QPalette::Highlight : QPalette::Midlight);
+ QPalette::Highlight : QPalette::Button);
/* Root-item: */
if (isRoot())
@@ -1597,7 +1597,7 @@ void UIChooserItemGroup::paintFrame(QPai
const QPalette pal = palette();
const QColor strokeColor = pal.color(QPalette::Active,
model()->selectedItems().contains(this) ?
- QPalette::Highlight : QPalette::Midlight).darker(headerDarkness() + 10);
+ QPalette::Highlight : QPalette::Button).darker(headerDarkness() + 10);
/* Create/assign pen: */
QPen pen(strokeColor);

View File

@ -1,5 +1,5 @@
-------------------------------------------------------------------
Tue Nov 29 15:54:36 UTC 2022 - Larry Finger <Larry.Finger@gmail.com>
Wed Nov 30 17:22:42 UTC 2022 - Larry Finger <Larry.Finger@gmail.com>
Fixes boo#1205868 - VirtualBox 7.0.4 crashes when machine log is requested from GUI
@ -12,6 +12,7 @@ Deleted file "set_noexec_stack.patch" - not needed.
Deleted file "fix_v7_build.patch" - not needed.
Deleted file "fixes_for_gcc10.patch" - not needed.
Deleted file "internal-headers.patch" - not needed.
Deleted file "virtualbox-fix-ui-background-color.patch" - does not apply.
-------------------------------------------------------------------
Mon Nov 21 16:10:35 UTC 2022 - Larry Finger <Larry.Finger@gmail.com>

View File

@ -160,7 +160,6 @@ Patch32: handle_gsoap_208103.patch
# Fix for struct file_operations backport in 15.3
Patch33: fixes_for_leap15.3.patch
Patch34: fix_kmp_build.patch
#Patch999: virtualbox-fix-ui-background-color.patch
#
# Common BuildRequires for both virtualbox and virtualbox-kmp
BuildRequires: %{kernel_module_package_buildreqs}
@ -300,6 +299,7 @@ hardware. VirtualBox is freely available as Open Source Software under
the terms of the GNU Public License (GPL).
##########################################
%package qt
@ -319,6 +319,7 @@ Obsoletes: %{name}-ose-qt < %{version}
This package contains the code for the GUI used to control VMs.
#########################################
%package websrv
@ -334,6 +335,7 @@ The VirtualBox web server is used to control headless VMs using a browser.
###########################################
%package guest-tools
Summary: VirtualBox guest tools
@ -356,6 +358,7 @@ Requires(pre): net-tools-deprecated
VirtualBox guest addition tools.
###########################################
%package -n python3-%{name}
@ -376,6 +379,7 @@ Obsoletes: python3-%{name}-ose < %{version}
Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package.
###########################################
%package devel
@ -391,6 +395,7 @@ Obsoletes: %{name}-ose-devel < %{version}
Development file for %{name}
###########################################
%package host-source
@ -423,6 +428,7 @@ These can be built for custom kernels using
sudo %{_sbindir}/vboxguestconfig
###########################################
%package guest-desktop-icons
@ -436,6 +442,7 @@ BuildArch: noarch
This package contains icons for guest desktop files that were created on the desktop.
###########################################
%package vnc
@ -501,8 +508,6 @@ This package contains the kernel-modules that VirtualBox uses to create or run v
%patch33 -p1
%endif
%patch34 -p1
# make VB UI background colors look sane again
##%patch999 -p1
### Documents for virtualbox main package ###
%if %{main_package}