[Marble-commits] KDE/kdeedu/marble/src/plugins/render/fileview
Thibaut Gridel
tgridel at free.fr
Sun Aug 2 23:05:46 CEST 2009
SVN commit 1006028 by tgridel:
memory leak with mouse events
M +2 -2 FileViewFloatItem.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/render/fileview/FileViewFloatItem.cpp #1006027:1006028
@@ -167,10 +167,10 @@
} else if( reinterpret_cast<QScrollBar*>( child ) == m_fileView->verticalScrollBar() ) {
shiftedPos -= QPoint( m_fileView->viewport()->size().width(), 0 );
}
- QMouseEvent* shiftedEvent = new QMouseEvent( e->type(), shiftedPos,
+ QMouseEvent shiftedEvent( e->type(), shiftedPos,
event->globalPos(), event->button(), event->buttons(),
event->modifiers() );
- if( QApplication::sendEvent(child, shiftedEvent) ) {
+ if( QApplication::sendEvent(child, &shiftedEvent) ) {
if( e->type() == QEvent::MouseButtonPress ||
e->type() == QEvent::MouseButtonRelease ||
e->type() == QEvent::MouseButtonDblClick ||
More information about the Marble-commits
mailing list