summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-12-14 17:54:13 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-15 01:57:57 +0100
commitdc98d585624d5f1de529dab86bbc061f6b64f89d (patch)
tree9765b5204612403a64189fd7b14b9440234b93f6 /src/testlib/qtestcase.cpp
parent5b413852ddf3304876d3685558f8ec73ab9af96b (diff)
Improve QTest::keyClick documentation.
Make it clear that the delay is applied before each key-click is simulated. Change-Id: Id100f1f2db1a5b1651c3046905719d7eb06ec1a0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r--src/testlib/qtestcase.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 54bd1bb7f0..202d53eada 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -514,7 +514,8 @@ QT_BEGIN_NAMESPACE
\overload
Simulates clicking of \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before clicking the key.
Example:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 13
@@ -528,7 +529,8 @@ QT_BEGIN_NAMESPACE
/*! \fn void QTest::keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
Simulates clicking of \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before clicking the key.
Examples:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 14
@@ -536,7 +538,7 @@ QT_BEGIN_NAMESPACE
The first example above simulates clicking the \c escape key on \c
myWidget without any keyboard modifiers and without delay. The
second example simulates clicking \c shift-escape on \c myWidget
- with a following 200 ms delay of the test.
+ following a 200 ms delay of the test.
\sa QTest::keyClicks()
*/
@@ -561,7 +563,7 @@ QT_BEGIN_NAMESPACE
/*! \fn void QTest::keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
Simulates pressing a \a key with an optional \a modifier on a \a widget. If \a delay
- is larger than 0, the test will wait for \a delay milliseconds.
+ is larger than 0, the test will wait for \a delay milliseconds before pressing the key.
\bold {Note:} At some point you should release the key using \l keyRelease().
@@ -573,7 +575,8 @@ QT_BEGIN_NAMESPACE
\overload
Simulates pressing a \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before pressing the key.
\bold {Note:} At some point you should release the key using \l keyRelease().
@@ -583,7 +586,8 @@ QT_BEGIN_NAMESPACE
/*! \fn void QTest::keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
Simulates releasing a \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before releasing the key.
\sa QTest::keyPress(), QTest::keyClick()
*/
@@ -593,7 +597,8 @@ QT_BEGIN_NAMESPACE
\overload
Simulates releasing a \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before releasing the key.
\sa QTest::keyClick()
*/