[CRASH] QGraphicsView::mapFromScene buggy
Alex Merry
kde at randomguy3.me.uk
Mon Oct 20 21:43:22 CEST 2008
On Monday 20 October 2008 10:34:54 Alexis Ménard wrote:
> QSize s = dialog->size();
> QPoint pos = q->view()->mapFromScene(q->scenePos());
>
> Here is the code from popup applet. Three things that can crash :
>
> First q->view() return null so you call mapFromScene to a null or broken
> pointer. Run gdb and test the variable (or print it with kDebug).
>
> Second, q->scenePos() return crazy value (check).
>
> Third, q is null or broken. Test.
Since the crash was in mapFromScene(), q is certainly not the problem. I
doubt a crazy value from q->scenePos() would cause a segfault. So the problem
is almost certainly the result of q->view().
Alex
--
Proud KDE hacker: http://www.kde.org
Get KDE 4.1 - out now!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20081020/b35ae315/attachment.sig
More information about the Plasma-devel
mailing list