From nobody@FreeBSD.org  Tue Feb 12 03:50:20 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 4C8BFC8F
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Feb 2013 03:50:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 1EDD697
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Feb 2013 03:50:20 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r1C3oJqW043882
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Feb 2013 03:50:19 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r1C3oJHD043881;
	Tue, 12 Feb 2013 03:50:19 GMT
	(envelope-from nobody)
Message-Id: <201302120350.r1C3oJHD043881@red.freebsd.org>
Date: Tue, 12 Feb 2013 03:50:19 GMT
From: Anish Mistry <amistry@unitedware.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: kdepim44 - kalarm crashed when trying to create or edit an alarm
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         176046
>Category:       ports
>Synopsis:       deskutils/kdepim44 - kalarm crashed when trying to create or edit an alarm
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kde
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 12 04:00:00 UTC 2013
>Closed-Date:    Wed Feb 27 12:47:38 UTC 2013
>Last-Modified:  Wed Feb 27 12:50:00 UTC 2013
>Originator:     Anish Mistry
>Release:        9.1-RELEASE amd64
>Organization:
UnitedWare
>Environment:
FreeBSD bigguy.am-productions.biz 9.1-RELEASE FreeBSD 9.1-RELEASE #2: Sat Feb  2 11:55:10 EST 2013     root@bigguy.am-productions.biz:/usr/obj/usr/src/sys/BIGGUY  amd64
>Description:
When using kalarm as part of kdepim-4.4.11.1_4, kalarm will crash (segfault) when attempting to create or edit an alarm.  
>How-To-Repeat:
Start kalarm.  Create or edit an alarm.  Kalarm will then segfault.
>Fix:
This has been fixed upstream with the attached patch.  Recompiling kdepim-4.4.11.1_4 with the patch fixed the problem for me.

Patch attached with submission follows:

--- kalarm/lib/spinbox2.cpp
+++ kalarm/lib/spinbox2.cpp
@@ -28,7 +28,7 @@
 #include <QMouseEvent>
 #include <QStyleOptionSpinBox>
 #include <QGraphicsPixmapItem>
-#include <QPaintEngine>
+#include <QPainter>
 #include <QTimer>
 #include <QFrame>
 #include <QBrush>
@@ -588,8 +588,9 @@ void SpinMirror::setFrame()
 		p = grabWidget(mMainSpinbox, QRect(x, 0, 1, height()));
 		// Blot out edit field stuff from the middle of the slice
 		QPixmap dot = grabWidget(mMainSpinbox, QRect(x, editOffsetY, 1, 1));
-		QPaintEngine* pe = p.paintEngine();
-		pe->drawTiledPixmap(QRectF(0, editOffsetY, 1, height() - 2*editOffsetY), dot, QPointF(0, 0));
+		QPainter painter(&p);
+		painter.drawTiledPixmap(0, editOffsetY, 1, height() - 2*editOffsetY, dot, 0, 0);
+		painter.end();
 		// Horizontally fill the mirror widget with the vertical slice
 		p = p.scaled(size());
 		// Grab the left hand border of the main spinbox, and draw it into the mirror widget.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->kde 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Tue Feb 12 10:04:17 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176046 
State-Changed-From-To: open->closed 
State-Changed-By: makc 
State-Changed-When: Wed Feb 27 12:47:37 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176046 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/176046: commit references a PR
Date: Wed, 27 Feb 2013 12:47:28 +0000 (UTC)

 Author: makc
 Date: Wed Feb 27 12:47:21 2013
 New Revision: 313049
 URL: http://svnweb.freebsd.org/changeset/ports/313049
 
 Log:
   Add upstream patch to fix Kalarm segfault.
   
   PR:		ports/176046
   Submitted by:	Anish Mistry <amistry@unitedware.com>
 
 Added:
   head/deskutils/kdepim44/files/patch-kalarm__lib__spinbox2.cpp   (contents, props changed)
 Modified:
   head/deskutils/kdepim44/Makefile
 
 Modified: head/deskutils/kdepim44/Makefile
 ==============================================================================
 --- head/deskutils/kdepim44/Makefile	Wed Feb 27 12:25:18 2013	(r313048)
 +++ head/deskutils/kdepim44/Makefile	Wed Feb 27 12:47:21 2013	(r313049)
 @@ -3,7 +3,7 @@
  
  PORTNAME=	kdepim
  PORTVERSION=	4.4.11.1
 -PORTREVISION=	4
 +PORTREVISION=	5
  CATEGORIES=	deskutils kde ipv6
  MASTER_SITES=	${MASTER_SITE_KDE}
  MASTER_SITE_SUBDIR=	stable/kdepim-${PORTVERSION}/src
 
 Added: head/deskutils/kdepim44/files/patch-kalarm__lib__spinbox2.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/deskutils/kdepim44/files/patch-kalarm__lib__spinbox2.cpp	Wed Feb 27 12:47:21 2013	(r313049)
 @@ -0,0 +1,23 @@
 +--- kalarm/lib/spinbox2.cpp
 ++++ kalarm/lib/spinbox2.cpp
 +@@ -28,7 +28,7 @@
 + #include <QMouseEvent>
 + #include <QStyleOptionSpinBox>
 + #include <QGraphicsPixmapItem>
 +-#include <QPaintEngine>
 ++#include <QPainter>
 + #include <QTimer>
 + #include <QFrame>
 + #include <QBrush>
 +@@ -588,8 +588,9 @@ void SpinMirror::setFrame()
 + 		p = grabWidget(mMainSpinbox, QRect(x, 0, 1, height()));
 + 		// Blot out edit field stuff from the middle of the slice
 + 		QPixmap dot = grabWidget(mMainSpinbox, QRect(x, editOffsetY, 1, 1));
 +-		QPaintEngine* pe = p.paintEngine();
 +-		pe->drawTiledPixmap(QRectF(0, editOffsetY, 1, height() - 2*editOffsetY), dot, QPointF(0, 0));
 ++		QPainter painter(&p);
 ++		painter.drawTiledPixmap(0, editOffsetY, 1, height() - 2*editOffsetY, dot, 0, 0);
 ++		painter.end();
 + 		// Horizontally fill the mirror widget with the vertical slice
 + 		p = p.scaled(size());
 + 		// Grab the left hand border of the main spinbox, and draw it into the mirror widget.
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
