[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    1_1_BRANCH segfault fix for kiconedit
From:       Espen Sand <espensa () online ! no>
Date:       1999-08-21 22:47:24
[Download RAW message or body]

Somebody please verify this and commit the fix:

This is a segfault bugfix for kiconedit/1_1_BRANCH. In "kdragsource.cpp"
in "void KDragSource::mousePressEvent( QMouseEvent * )"
the dragsource must be allocated with "new".

You can provoke the segfault by starting kiconedit twice and drag
an icon from one to the other: The "source" program will segfault.

Note: this will not happen if you open kiconedit once and from the menu 
open a new window and drag an icon between these. 

Here is the code that works (at least for me).  Sorry no patch but it should be 
simple to understand what must be replaced.

QImageDrag *di = new QImageDrag( img, this );
if( di == 0 ) { return; }
#if QT_VERSION > 140
QPixmap pm(Icon("image.xpm"));
QPoint pp(pm.width()/2, pm.height()/2);
di->setPixmap(pm, pp);
#endif
di->dragCopy();



-- 
Espen Sand

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic