From a297bdfc574b757e2f6cebb897a4dddafd6e15a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20R=C3=B8dal?= Date: Mon, 8 Aug 2011 12:40:42 +0200 Subject: [PATCH] Removed faked resize / show / hide events. Change-Id: I441af093ffc394101cc38486472dd1af0957994f Reviewed-on: http://codereview.qt.nokia.com/2742 Reviewed-by: Qt Sanity Bot Reviewed-by: Gunnar Sletta --- src/declarative/items/qsgcanvas.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index 94d220b..5717ce8 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -174,24 +174,13 @@ void QSGCanvas::exposeEvent(QExposeEvent *) void QSGCanvas::resizeEvent(QResizeEvent *e) { - // Since we are faking resizeEvent from QEvent::Map in event(), spit - // out a warning when it starts to work properly - if (e) - qDebug("Resize events are working, remove this code: %s : %d", __FILE__, __LINE__); - Q_D(QSGCanvas); d->thread->resize(size()); } void QSGCanvas::showEvent(QShowEvent *e) { - // Since we are faking the showEvent from QEvent::Map in ::event(), spit - // out a warning when it starts to work properly... - if (e) - qDebug("Show events are working, remove this code: %s : %d", __FILE__, __LINE__); - Q_D(QSGCanvas); - if (d->vsyncAnimations) { if (!d->animationDriver) { d->animationDriver = d->context->createAnimationDriver(this); @@ -209,11 +198,6 @@ void QSGCanvas::showEvent(QShowEvent *e) void QSGCanvas::hideEvent(QHideEvent *e) { - // Since we are faking the showEvent from QEvent::Map in ::event(), spit - // out a warning when it starts to work properly... - if (e) - qDebug("Hide events are working, remove this code: %s : %d", __FILE__, __LINE__); - Q_D(QSGCanvas); d->thread->stopRenderThread(); } @@ -845,14 +829,6 @@ void QSGCanvasPrivate::clearHover() bool QSGCanvas::event(QEvent *e) { - // Fake a resize/show/hide events until QWindow starts sending events properly. - if (e->type() == QEvent::Map) { - resizeEvent(0); - showEvent(0); - } else if(e->type() == QEvent::Unmap) { - hideEvent(0); - } - Q_D(QSGCanvas); if (e->type() == QEvent::User) { -- 2.7.4