rpms/kdebase-workspace/devel kdebase-workspace-4.3.90-kde#221871.patch, NONE, 1.1 kdebase-workspace.spec, 1.343, 1.344

Rex Dieter rdieter at fedoraproject.org
Sat Jan 9 05:00:16 UTC 2010


Author: rdieter

Update of /cvs/pkgs/rpms/kdebase-workspace/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15913

Modified Files:
	kdebase-workspace.spec 
Added Files:
	kdebase-workspace-4.3.90-kde#221871.patch 
Log Message:
* Fri Jan 09 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.3.90-4
- krunner crasher (kde#221871)


kdebase-workspace-4.3.90-kde#221871.patch:
 resultitem.cpp |   53 +++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 39 insertions(+), 14 deletions(-)

--- NEW FILE kdebase-workspace-4.3.90-kde#221871.patch ---
--- branches/KDE/4.4/kdebase/workspace/krunner/interfaces/default/resultitem.cpp	2010/01/06 22:46:33	1070858
+++ branches/KDE/4.4/kdebase/workspace/krunner/interfaces/default/resultitem.cpp	2010/01/09 01:52:23	1071933
@@ -90,9 +90,9 @@
 
 QGraphicsWidget* ResultItem::arrangeTabOrder(QGraphicsWidget* last)
 {
-    QGraphicsWidget* sceneWidget = static_cast<QGraphicsWidget*>(parent());
+    QGraphicsWidget *sceneWidget = static_cast<QGraphicsWidget*>(parent());
     sceneWidget->setTabOrder(last, this);
-    QGraphicsWidget* currentWidget = this;
+    QGraphicsWidget *currentWidget = this;
 
     if (m_configButton) {
         sceneWidget->setTabOrder(this, m_configButton);
@@ -103,8 +103,8 @@
         }
     }
     if (m_actionsWidget) {
-        for (int i = 0; i< m_actionsLayout->count(); i++) {
-            QGraphicsWidget* button = static_cast<QGraphicsWidget*>(m_actionsLayout->itemAt(i));
+        for (int i = 0; i < m_actionsLayout->count(); ++i) {
+            QGraphicsWidget *button = static_cast<QGraphicsWidget*>(m_actionsLayout->itemAt(i));
             sceneWidget->setTabOrder(currentWidget, button);
             currentWidget = button;
         }
@@ -118,13 +118,19 @@
     m_icon = KIcon(match.icon());
 
     if (m_configWidget) {
-        scene()->removeItem(m_configWidget);
+        if (scene()) {
+            scene()->removeItem(m_configWidget);
+        }
+
         delete m_configWidget;
         m_configWidget = 0;
     }
 
     if (m_actionsWidget) {
-        scene()->removeItem(m_actionsWidget);
+        if (scene()) {
+            scene()->removeItem(m_actionsWidget);
+        }
+
         delete m_actionsWidget;
         m_actionsWidget = 0;
     }
@@ -142,7 +148,10 @@
             m_configButton->installEventFilter(this);
         }
     } else if (m_configButton) {
-        scene()->removeItem(m_configButton);
+        if (scene()) {
+            scene()->removeItem(m_configButton);
+        }
+
         delete m_configButton;
         m_configButton = 0;
     }
@@ -161,7 +170,7 @@
         m_actionsWidget = new QGraphicsWidget(this);
         m_actionsLayout = new QGraphicsLinearLayout(Qt::Horizontal, m_actionsWidget);
 
-        foreach ( QAction* action, actionList ) {
+        foreach (QAction* action, actionList) {
             Plasma::ToolButton * actionButton = new Plasma::ToolButton(m_actionsWidget);
             actionButton->setFlag(QGraphicsItem::ItemIsFocusable);
             actionButton->setAction(action);
@@ -183,7 +192,9 @@
 
     if (actionButton) {
         if (event->type() == QEvent::GraphicsSceneHoverEnter) {
-            scene()->setFocusItem(actionButton);
+            if (scene()) {
+                scene()->setFocusItem(actionButton);
+            }
         } else if (event->type() == QEvent::FocusIn) {
             focusInEvent(static_cast<QFocusEvent*>(event));
             actionButton->setAutoRaise(false);
@@ -230,6 +241,10 @@
 
 QString ResultItem::description() const
 {
+    if (!scene()) {
+        return QString();
+    }
+
     Plasma::ToolButton* actionButton = qobject_cast<Plasma::ToolButton*>(static_cast<QGraphicsWidget*>(scene()->focusItem()));
 
     //if a button is focused and it  belongs to the item
@@ -429,7 +444,11 @@
 {
     QGraphicsItem::hoverEnterEvent(e);
     setFocus(Qt::MouseFocusReason);
-    scene()->clearSelection();
+
+    if (scene()) {
+        scene()->clearSelection();
+    }
+
     setSelected(true);
 }
 
@@ -463,7 +482,10 @@
 
     m_mouseHovered = (event->reason() == Qt::MouseFocusReason);
 
-    scene()->clearSelection();
+    if (scene()) {
+        scene()->clearSelection();
+    }
+
     setSelected(true);
     emit ensureVisibility(this);
 
@@ -497,7 +519,7 @@
 
 QVariant ResultItem::itemChange(GraphicsItemChange change, const QVariant &value)
 {
-    if (change == QGraphicsItem::ItemSceneHasChanged && scene()) {
+    if (change == QGraphicsItem::ItemSceneHasChanged) {
         calculateSize();
     }
 
@@ -521,7 +543,10 @@
 void ResultItem::showConfig()
 {
     if (m_configWidget) {
-        scene()->removeItem(m_configWidget);
+        if (scene()) {
+            scene()->removeItem(m_configWidget);
+        }
+
         delete m_configWidget;
         m_configWidget = 0;
     } else {
@@ -542,7 +567,7 @@
 void ResultItem::calculateSize()
 {
     if (scene()) {
-        calculateSize(scene()->width(),scene()->height());
+        calculateSize(scene()->width(), scene()->height());
     }
 }
 


Index: kdebase-workspace.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase-workspace/devel/kdebase-workspace.spec,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -p -r1.343 -r1.344
--- kdebase-workspace.spec	8 Jan 2010 19:53:27 -0000	1.343
+++ kdebase-workspace.spec	9 Jan 2010 05:00:16 -0000	1.344
@@ -20,7 +20,7 @@
 Summary: KDE Workspace
 Name:    kdebase-workspace
 Version: 4.3.90
-Release: 3%{?dist}
+Release: 4%{?dist}
 
 License: GPLv2
 Group:   User Interface/Desktops
@@ -59,6 +59,8 @@ Patch50: kdebase-workspace-4.3.3-kde#171
 # FIXME: Not upstreamed yet --Ben (4.3.80)
 #Patch51: http://bazaar.launchpad.net/~kubuntu-members/kdebase-workspace/ubuntu/annotate/head%3A/debian/patches/kubuntu_101_brightness_fn_keys_and_osd.diff
 Patch51: kdebase-workspace-4.3.85-brightness_keys.patch
+# 
+Patch101: kdebase-workspace-4.3.90-kde#221871.patch
 
 # moving to non-multilib hack
 Obsoletes: kdebase-workspace < 4.3.0-2
@@ -304,6 +306,7 @@ Requires: akonadi
 %patch50 -p1 -b .kde#171685
 # kubuntu patches
 %patch51 -p1 -b .brightness_keys
+%patch101 -p5 -b .kde#221871
 
 
 %build
@@ -654,6 +657,9 @@ fi
 
 
 %changelog
+* Fri Jan 09 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.3.90-4
+- krunner crasher (kde#221871)
+
 * Fri Jan 08 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.3.90-3
 - rebuild (kdelibs polkit-1 macros)
 




More information about the fedora-extras-commits mailing list