summaryrefslogtreecommitdiffstats
path: root/tools/qml
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-09-06 06:46:28 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-09-06 06:51:54 (GMT)
commitdc7f31dbd698e00cd25d36b4568b03dd83032ecc (patch)
tree51b8c20ea51ea56bdbf957009ea9b2693a9b2c05 /tools/qml
parent09e5d137e27702e6e5dd781ac77940c907b0b9f4 (diff)
downloadQt-dc7f31dbd698e00cd25d36b4568b03dd83032ecc.zip
Qt-dc7f31dbd698e00cd25d36b4568b03dd83032ecc.tar.gz
Qt-dc7f31dbd698e00cd25d36b4568b03dd83032ecc.tar.bz2
Fix recording of QML visual tests when using a QGLWidget viewport.
In order for the event filter to work, we need to set the QGLWidget as the viewport before constructing the QDeclarativeTester.
Diffstat (limited to 'tools/qml')
-rw-r--r--tools/qml/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 7421b5e..78cd64d 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -441,6 +441,7 @@ static QDeclarativeViewer *createViewer()
QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags);
viewer->setAttribute(Qt::WA_DeleteOnClose, true);
+ viewer->setUseGL(opts.useGL);
if (!opts.scriptopts.isEmpty()) {
viewer->setScriptOptions(opts.scriptOptions);
@@ -492,8 +493,6 @@ void showViewer(QDeclarativeViewer *viewer)
viewer->showMaximized();
else
viewer->show();
-
- viewer->setUseGL(opts.useGL);
viewer->raise();
}