diff options
author | Filippo Cucchetto <filippocucchetto@gmail.com> | 2015-08-04 19:29:51 +0200 |
---|---|---|
committer | Filippo Cucchetto <filippocucchetto@gmail.com> | 2015-08-16 16:53:42 +0000 |
commit | 7b8050c0d3bc1e4743f5d5a3f6d688ff71ffb5b6 (patch) | |
tree | db2c23fa62dbb406a4c2fcd40e937771c2d77172 /src/imports | |
parent | 6e3c6458cad5078c2bde44d73220510dfc8ebfce (diff) |
Change TestEvent key default event routing behavior
The current behavior of the TestEvent is to send all the
key events to the test window. For this reason is not possible routing
events to custom windows created inside the test suite.
The new behavior is to send the key events to the current focused window
[Change][QuickTest][TestCase]
Changed default routing behavior for key events in TestCase.
The key events are sent to the window with active focus
Change-Id: I6ff3113eb9f1cbc25f6cfd2dd7bfdff178ee6ac3
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/testlib/TestCase.qml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 4c48611e79..8bedad40e9 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -876,6 +876,9 @@ Item { focused item. If \a delay is larger than 0, the test will wait for \a delay milliseconds. + The event will be sent to the TestCase window or, in case of multiple windows, + to the current active window. See \l QGuiApplication::focusWindow() for more details. + \b{Note:} At some point you should release the key using keyRelease(). \sa keyRelease(), keyClick() @@ -901,6 +904,9 @@ Item { focused item. If \a delay is larger than 0, the test will wait for \a delay milliseconds. + The event will be sent to the TestCase window or, in case of multiple windows, + to the current active window. See \l QGuiApplication::focusWindow() for more details. + \sa keyPress(), keyClick() */ function keyRelease(key, modifiers, delay) { @@ -924,6 +930,9 @@ Item { focused item. If \a delay is larger than 0, the test will wait for \a delay milliseconds. + The event will be sent to the TestCase window or, in case of multiple windows, + to the current active window. See \l QGuiApplication::focusWindow() for more details. + \sa keyPress(), keyRelease() */ function keyClick(key, modifiers, delay) { |