From: Martin Jones Date: Wed, 5 Oct 2011 23:28:24 +0000 (+1000) Subject: Add QTest::keyRelease() accepting a Qt::Key value X-Git-Tag: qt-v5.0.0-alpha1~3336 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=083a30b1d6ea023f36f3fe6cabea775e4e1e78dd;p=profile%2Fivi%2Fqtbase.git Add QTest::keyRelease() accepting a Qt::Key value Change-Id: Id7943820a71472ab1e3c81ea76701738d7600815 Reviewed-on: http://codereview.qt-project.org/6085 Reviewed-by: Qt Sanity Bot Reviewed-by: Martin Jones --- diff --git a/src/testlib/qtestkeyboard.h b/src/testlib/qtestkeyboard.h index c084029..e2c02ac 100644 --- a/src/testlib/qtestkeyboard.h +++ b/src/testlib/qtestkeyboard.h @@ -150,6 +150,8 @@ namespace QTest { keyEvent(Click, window, key, modifier, delay); } inline static void keyRelease(QWindow *window, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) { keyEvent(Release, window, key, modifier, delay); } + inline static void keyRelease(QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) + { keyEvent(Release, window, key, modifier, delay); } inline static void keyPress(QWindow *window, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) { keyEvent(Press, window, key, modifier, delay); } inline static void keyPress(QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)