Removed faked resize / show / hide events.
authorSamuel Rødal <samuel.rodal@nokia.com>
Mon, 8 Aug 2011 10:40:42 +0000 (12:40 +0200)
committerGunnar Sletta <gunnar.sletta@nokia.com>
Wed, 10 Aug 2011 06:17:50 +0000 (08:17 +0200)
Change-Id: I441af093ffc394101cc38486472dd1af0957994f
Reviewed-on: http://codereview.qt.nokia.com/2742
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>

src/declarative/items/qsgcanvas.cpp

index 94d220b..5717ce8 100644 (file)
@@ -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) {