Fixed memory leak in windowing system event handling
processWindowSystemEvent does not delete the event, so allocate it on the stack instead. Change-Id: Iffda940ffc86ef1fabfbf101e08956fa07c49689 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
parent
09404c072f
commit
32ce1172ba
@ -95,8 +95,8 @@ void QWindowSystemInterface::handleGeometryChange(QWindow *tlw, const QRect &new
|
|||||||
|
|
||||||
void QWindowSystemInterface::handleSynchronousGeometryChange(QWindow *tlw, const QRect &newRect)
|
void QWindowSystemInterface::handleSynchronousGeometryChange(QWindow *tlw, const QRect &newRect)
|
||||||
{
|
{
|
||||||
QWindowSystemInterfacePrivate::GeometryChangeEvent *e = new QWindowSystemInterfacePrivate::GeometryChangeEvent(tlw,newRect);
|
QWindowSystemInterfacePrivate::GeometryChangeEvent e(tlw,newRect);
|
||||||
QGuiApplicationPrivate::processWindowSystemEvent(e); // send event immediately.
|
QGuiApplicationPrivate::processWindowSystemEvent(&e); // send event immediately.
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWindowSystemInterface::handleCloseEvent(QWindow *tlw)
|
void QWindowSystemInterface::handleCloseEvent(QWindow *tlw)
|
||||||
@ -284,8 +284,8 @@ void QWindowSystemInterface::handleUnmapEvent(QWindow *tlw)
|
|||||||
|
|
||||||
void QWindowSystemInterface::handleSynchronousExposeEvent(QWindow *tlw, const QRegion ®ion)
|
void QWindowSystemInterface::handleSynchronousExposeEvent(QWindow *tlw, const QRegion ®ion)
|
||||||
{
|
{
|
||||||
QWindowSystemInterfacePrivate::ExposeEvent *e = new QWindowSystemInterfacePrivate::ExposeEvent(tlw, region);
|
QWindowSystemInterfacePrivate::ExposeEvent e(tlw, region);
|
||||||
QGuiApplicationPrivate::processWindowSystemEvent(e); // send event immediately.
|
QGuiApplicationPrivate::processWindowSystemEvent(&e); // send event immediately.
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QWindowSystemInterface::sendWindowSystemEvents(QAbstractEventDispatcher *eventDispatcher, QEventLoop::ProcessEventsFlags flags)
|
bool QWindowSystemInterface::sendWindowSystemEvents(QAbstractEventDispatcher *eventDispatcher, QEventLoop::ProcessEventsFlags flags)
|
||||||
|
Loading…
Reference in New Issue
Block a user