fixed to work with qsgcanvas
authorMatthew Cattell <matthew.cattell@nokia.com>
Tue, 6 Sep 2011 14:36:01 +0000 (16:36 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Tue, 6 Sep 2011 14:38:00 +0000 (16:38 +0200)
Change-Id: Ia044bb738469fdd2c9ecc6154ac51851db3e0e7f
Reviewed-on: http://codereview.qt.nokia.com/4270
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
tests/auto/declarative/qsgitem/tst_qsgitem.cpp

index 05e59a6..99c1cf6 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "qsgitem.h"
 #include "qsgcanvas.h"
+#include <QtWidgets/QGraphicsSceneMouseEvent>
 #include "private/qsgfocusscope_p.h"
 #include "../../../shared/util.h"
 #include <QDebug>
@@ -132,9 +133,10 @@ private slots:
     void hoverEventInParent();
 
 private:
-    void ensureFocus(QWidget *w) {
+
+    void ensureFocus(QWindow *w) {
         w->show();
-        qApp->setActiveWindow(w);
+        w->requestActivateWindow();
         qApp->processEvents();
 
 #ifdef Q_WS_X11