[kdebase-workspace] - oxygen theme crasher (#674792, kde#265271)
Rex Dieter
rdieter at fedoraproject.org
Thu Feb 3 14:16:07 UTC 2011
commit 6853593b73f8c99bcab5191f140ae8d44bec9df4
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Thu Feb 3 08:15:38 2011 -0600
- oxygen theme crasher (#674792, kde#265271)
kdebase-workspace-4.6.0-oxygen_qtoolbutton.patch | 30 ++++++++++++++++++++++
kdebase-workspace.spec | 9 ++++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/kdebase-workspace-4.6.0-oxygen_qtoolbutton.patch b/kdebase-workspace-4.6.0-oxygen_qtoolbutton.patch
new file mode 100644
index 0000000..ef05b7b
--- /dev/null
+++ b/kdebase-workspace-4.6.0-oxygen_qtoolbutton.patch
@@ -0,0 +1,30 @@
+commit 375112824488df9a827a498b512eabeb5ce0deaf
+Author: Hugo Pereira Da Costa <hugo at oxygen-icons.org>
+Date: Thu Feb 3 11:44:59 2011 +0100
+
+ Check validity of QToolButton cast before testing popupMode()
+
+ BUG: 265271
+
+diff --git a/kstyles/oxygen/oxygenstyle.cpp b/kstyles/oxygen/oxygenstyle.cpp
+index c9295e3..f72de5f 100644
+--- a/kstyles/oxygen/oxygenstyle.cpp
++++ b/kstyles/oxygen/oxygenstyle.cpp
+@@ -3747,7 +3747,6 @@ namespace Oxygen
+ const bool sunken( enabled && ( flags & State_Sunken ) );
+
+ // match button color to window background
+- const QToolButton *tool( qobject_cast<const QToolButton *>( widget ) );
+ const QColor highlight( helper().viewHoverBrush().brush( palette ).color() );
+ QColor color = palette.color( autoRaise ? QPalette::WindowText:QPalette::ButtonText );
+ QColor background = palette.color( QPalette::Window );
+@@ -3760,7 +3759,8 @@ namespace Oxygen
+ bool drawContrast = true;
+
+ // toolbuttons
+- if( tool->popupMode()==QToolButton::MenuButtonPopup )
++ const QToolButton *tool( qobject_cast<const QToolButton *>( widget ) );
++ if( tool && tool->popupMode()==QToolButton::MenuButtonPopup )
+ {
+
+ if( !autoRaise )
diff --git a/kdebase-workspace.spec b/kdebase-workspace.spec
index 08fed84..8dacd2b 100644
--- a/kdebase-workspace.spec
+++ b/kdebase-workspace.spec
@@ -8,7 +8,7 @@ Version: 4.6.0
# for .0 releases we have to use '00' as '0' is treated as null by cmake, dont' forget to update
%define kde4workspace_version 4.6.00
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2
Group: User Interface/Desktops
@@ -67,6 +67,9 @@ Patch50: kdebase-workspace-4.3.3-kde#171685.patch
## 4.6 patches
Patch100: kdebase-workspace-4.6.0-startkde_no_malloc_check.patch
+# https://bugs.kde.org/show_bug.cgi?id=265271
+# https://projects.kde.org/projects/kde/kdebase/kde-workspace/repository/revisions/375112824488df9a827a498b512eabeb5ce0deaf/diff/kstyles/oxygen/oxygenstyle.cpp?format=diff
+Patch101: kdebase-workspace-4.6.0-oxygen_qtoolbutton.patch
## Fedora specific patches
# HALsectomy
@@ -300,6 +303,7 @@ Requires: akonadi
# 4.6 patches
%patch100 -p1 -b .startkde_no_malloc_check
+%patch101 -p1 -b .oxygen_qtoolbutton
# trunk patches
@@ -698,6 +702,9 @@ fi
%changelog
+* Thu Feb 03 2011 Rex Dieter <rdieter at fedoraproject.org> 4.6.0-5
+- oxygen theme crasher (#674792, kde#265271)
+
* Wed Jan 26 2011 Rex Dieter <rdieter at fedoraproject.org> 4.6.0-4
- startkde: drop MALLOC_CHECK bits
More information about the scm-commits
mailing list