summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtestcase.qdoc')
-rw-r--r--src/testlib/qtestcase.qdoc209
1 files changed, 125 insertions, 84 deletions
diff --git a/src/testlib/qtestcase.qdoc b/src/testlib/qtestcase.qdoc
index 654687c880..6a067c351f 100644
--- a/src/testlib/qtestcase.qdoc
+++ b/src/testlib/qtestcase.qdoc
@@ -103,7 +103,7 @@
\snippet code/src_qtestlib_qtestcase.cpp 2
When comparing floating-point types (\c float, \c double, and \c qfloat16),
- \l {qFuzzyCompare()} is used for finite values. If \l {<QtGlobal>::}{qFuzzyIsNull()}
+ \l {qFuzzyCompare()} is used for finite values. If \l {<QtNumeric>::}{qFuzzyIsNull()}
is true for both values, they are also considered equal. Infinities
match if they have the same sign, and any NaN as actual value matches
with any NaN as expected value (even though NaN != NaN, even when
@@ -137,18 +137,18 @@
QCOMPARE_GT(), QCOMPARE_GE()
*/
-/*! \macro QCOMPARE_EQ(left, right)
+/*! \macro QCOMPARE_EQ(computed, baseline)
\since 6.4
\relates QTest
- The QCOMPARE_EQ() macro checks that \a left is equal to \a right using
+ The QCOMPARE_EQ() macro checks that \a computed is equal to \a baseline using
the equality operator. If that is true, execution continues. If not, a
failure is recorded in the test log and the test function returns without
attempting any later checks.
- It is generally similar to calling \c {QVERIFY(left == right);}
- but prints a formatted error message reporting \a left and \a right argument
+ It is generally similar to calling \c {QVERIFY(computed == baseline);}
+ but prints a formatted error message reporting \a computed and \a baseline argument
expressions and values in case of failure.
\include qtestcase.qdoc macro-usage-limitation
@@ -164,18 +164,18 @@
QCOMPARE_GE()
*/
-/*! \macro QCOMPARE_NE(left, right)
+/*! \macro QCOMPARE_NE(computed, baseline)
\since 6.4
\relates QTest
- The QCOMPARE_NE() macro checks that \a left is not equal to \a right using
+ The QCOMPARE_NE() macro checks that \a computed is not equal to \a baseline using
the inequality operator. If that is true, execution continues. If not, a
failure is recorded in the test log and the test function returns without
attempting any later checks.
- It is generally similar to calling \c {QVERIFY(left != right);}
- but prints a formatted error message reporting \a left and \a right argument
+ It is generally similar to calling \c {QVERIFY(computed != baseline);}
+ but prints a formatted error message reporting \a computed and \a baseline argument
expressions and values in case of failure.
\include qtestcase.qdoc macro-usage-limitation
@@ -185,18 +185,18 @@
\sa QCOMPARE_EQ(), QCOMPARE_LT(), QCOMPARE_LE(), QCOMPARE_GT(), QCOMPARE_GE()
*/
-/*! \macro QCOMPARE_LT(left, right)
+/*! \macro QCOMPARE_LT(computed, baseline)
\since 6.4
\relates QTest
- The QCOMPARE_LT() macro checks that \a left is less than \a right using the
+ The QCOMPARE_LT() macro checks that \a computed is less than \a baseline using the
less-than operator. If that is true, execution continues. If not, a failure
is recorded in the test log and the test function returns without attempting
any later checks.
- It is generally similar to calling \c {QVERIFY(left < right);}
- but prints a formatted error message reporting \a left and \a right argument
+ It is generally similar to calling \c {QVERIFY(computed < baseline);}
+ but prints a formatted error message reporting \a computed and \a baseline argument
expressions and values in case of failure.
\include qtestcase.qdoc macro-usage-limitation
@@ -206,18 +206,18 @@
\sa QCOMPARE_EQ(), QCOMPARE_NE(), QCOMPARE_LE(), QCOMPARE_GT(), QCOMPARE_GE()
*/
-/*! \macro QCOMPARE_LE(left, right)
+/*! \macro QCOMPARE_LE(computed, baseline)
\since 6.4
\relates QTest
- The QCOMPARE_LE() macro checks that \a left is at most \a right using the
+ The QCOMPARE_LE() macro checks that \a computed is at most \a baseline using the
less-than-or-equal-to operator. If that is true, execution continues. If
not, a failure is recorded in the test log and the test function returns
without attempting any later checks.
- It is generally similar to calling \c {QVERIFY(left <= right);}
- but prints a formatted error message reporting \a left and \a right argument
+ It is generally similar to calling \c {QVERIFY(computed <= baseline);}
+ but prints a formatted error message reporting \a computed and \a baseline argument
expressions and values in case of failure.
\include qtestcase.qdoc macro-usage-limitation
@@ -227,18 +227,18 @@
\sa QCOMPARE_EQ(), QCOMPARE_NE(), QCOMPARE_LT(), QCOMPARE_GT(), QCOMPARE_GE()
*/
-/*! \macro QCOMPARE_GT(left, right)
+/*! \macro QCOMPARE_GT(computed, baseline)
\since 6.4
\relates QTest
- The QCOMPARE_GT() macro checks that \a left is greater than \a right using
+ The QCOMPARE_GT() macro checks that \a computed is greater than \a baseline using
the greater-than operator. If that is true, execution continues. If not, a
failure is recorded in the test log and the test function returns without
attempting any later checks.
- It is generally similar to calling \c {QVERIFY(left > right);}
- but prints a formatted error message reporting \a left and \a right argument
+ It is generally similar to calling \c {QVERIFY(computed > baseline);}
+ but prints a formatted error message reporting \a computed and \a baseline argument
expressions and values in case of failure.
\include qtestcase.qdoc macro-usage-limitation
@@ -248,18 +248,18 @@
\sa QCOMPARE_EQ(), QCOMPARE_NE(), QCOMPARE_LT(), QCOMPARE_LE(), QCOMPARE_GE()
*/
-/*! \macro QCOMPARE_GE(left, right)
+/*! \macro QCOMPARE_GE(computed, baseline)
\since 6.4
\relates QTest
- The QCOMPARE_GE() macro checks that \a left is at least \a right using the
+ The QCOMPARE_GE() macro checks that \a computed is at least \a baseline using the
greater-than-or-equal-to operator. If that is true, execution continues. If
not, a failure is recorded in the test log and the test function returns
without attempting any later checks.
- It is generally similar to calling \c {QVERIFY(left >= right);}
- but prints a formatted error message reporting \a left and \a right argument
+ It is generally similar to calling \c {QVERIFY(computed >= baseline);}
+ but prints a formatted error message reporting \a computed and \a baseline argument
expressions and values in case of failure.
\include qtestcase.qdoc macro-usage-limitation
@@ -359,6 +359,10 @@
is reached, a failure is recorded in the test log and the test won't be
executed further.
+ //![chrono-timeout]
+ Since Qt 6.8, the \a timeout can also be a \c{std::chrono} literal such as \c{2s}.
+ //![chrono-timeout]
+
\note This macro can only be used in a test function that is invoked
by the test framework.
@@ -390,9 +394,11 @@
except that it outputs a verbose \a message when \a condition is still false
after the specified \a timeout (in milliseconds). The \a message is a plain C string.
+ \include qtestcase.qdoc chrono-timeout
+
Example:
\code
- QTRY_VERIFY2_WITH_TIMEOUT(list.size() > 2, QByteArray::number(list.size()).constData(), 10000);
+ QTRY_VERIFY2_WITH_TIMEOUT(list.size() > 2, QByteArray::number(list.size()).constData(), 10s);
\endcode
\note This macro can only be used in a test function that is invoked
@@ -413,7 +419,7 @@
Example:
\code
- QTRY_VERIFY2_WITH_TIMEOUT(list.size() > 2, QByteArray::number(list.size()).constData());
+ QTRY_VERIFY2(list.size() > 2, QByteArray::number(list.size()).constData());
\endcode
\note This macro can only be used in a test function that is invoked
@@ -434,6 +440,8 @@
will be processed. If the timeout is reached, a failure is recorded in the
test log and the test won't be executed further.
+ \include qtestcase.qdoc chrono-timeout
+
\note This macro can only be used in a test function that is invoked
by the test framework.
@@ -455,26 +463,28 @@
QEXPECT_FAIL()
*/
-/*! \macro QTRY_COMPARE_EQ_WITH_TIMEOUT(left, right, timeout)
+/*! \macro QTRY_COMPARE_EQ_WITH_TIMEOUT(computed, baseline, timeout)
\since 6.4
\relates QTest
This macro is similar to QCOMPARE_EQ(), but performs the comparison of the
- \a left and \a right values repeatedly, until either the comparison returns
+ \a computed and \a baseline values repeatedly, until either the comparison returns
\c true or the \a timeout (in milliseconds) is reached. Between each
comparison, events will be processed. If the timeout is reached, a failure
is recorded in the test log and the test won't be executed further.
+ \include qtestcase.qdoc chrono-timeout
+
\include qtestcase.qdoc macro-usage-limitation
\sa QCOMPARE_EQ(), QTRY_COMPARE_EQ()
*/
-/*! \macro QTRY_COMPARE_EQ(left, right)
+/*! \macro QTRY_COMPARE_EQ(computed, baseline)
\since 6.4
\relates QTest
- Performs comparison of \a left and \a right values by invoking
+ Performs comparison of \a computed and \a baseline values by invoking
QTRY_COMPARE_EQ_WITH_TIMEOUT with a timeout of five seconds.
\include qtestcase.qdoc macro-usage-limitation
@@ -482,26 +492,28 @@
\sa QCOMPARE_EQ(), QTRY_COMPARE_EQ_WITH_TIMEOUT()
*/
-/*! \macro QTRY_COMPARE_NE_WITH_TIMEOUT(left, right, timeout)
+/*! \macro QTRY_COMPARE_NE_WITH_TIMEOUT(computed, baseline, timeout)
\since 6.4
\relates QTest
This macro is similar to QCOMPARE_NE(), but performs the comparison of the
- \a left and \a right values repeatedly, until either the comparison returns
+ \a computed and \a baseline values repeatedly, until either the comparison returns
\c true or the \a timeout (in milliseconds) is reached. Between each
comparison, events will be processed. If the timeout is reached, a failure
is recorded in the test log and the test won't be executed further.
+ \include qtestcase.qdoc chrono-timeout
+
\include qtestcase.qdoc macro-usage-limitation
\sa QCOMPARE_NE(), QTRY_COMPARE_NE()
*/
-/*! \macro QTRY_COMPARE_NE(left, right)
+/*! \macro QTRY_COMPARE_NE(computed, baseline)
\since 6.4
\relates QTest
- Performs comparison of \a left and \a right values by invoking
+ Performs comparison of \a computed and \a baseline values by invoking
QTRY_COMPARE_NE_WITH_TIMEOUT with a timeout of five seconds.
\include qtestcase.qdoc macro-usage-limitation
@@ -509,26 +521,28 @@
\sa QCOMPARE_NE(), QTRY_COMPARE_NE_WITH_TIMEOUT()
*/
-/*! \macro QTRY_COMPARE_LT_WITH_TIMEOUT(left, right, timeout)
+/*! \macro QTRY_COMPARE_LT_WITH_TIMEOUT(computed, baseline, timeout)
\since 6.4
\relates QTest
This macro is similar to QCOMPARE_LT(), but performs the comparison of the
- \a left and \a right values repeatedly, until either the comparison returns
+ \a computed and \a baseline values repeatedly, until either the comparison returns
\c true or the \a timeout (in milliseconds) is reached. Between each
comparison, events will be processed. If the timeout is reached, a failure
is recorded in the test log and the test won't be executed further.
+ \include qtestcase.qdoc chrono-timeout
+
\include qtestcase.qdoc macro-usage-limitation
\sa QCOMPARE_LT(), QTRY_COMPARE_LT()
*/
-/*! \macro QTRY_COMPARE_LT(left, right)
+/*! \macro QTRY_COMPARE_LT(computed, baseline)
\since 6.4
\relates QTest
- Performs comparison of \a left and \a right values by invoking
+ Performs comparison of \a computed and \a baseline values by invoking
QTRY_COMPARE_LT_WITH_TIMEOUT with a timeout of five seconds.
\include qtestcase.qdoc macro-usage-limitation
@@ -536,26 +550,28 @@
\sa QCOMPARE_LT(), QTRY_COMPARE_LT_WITH_TIMEOUT()
*/
-/*! \macro QTRY_COMPARE_LE_WITH_TIMEOUT(left, right, timeout)
+/*! \macro QTRY_COMPARE_LE_WITH_TIMEOUT(computed, baseline, timeout)
\since 6.4
\relates QTest
This macro is similar to QCOMPARE_LE(), but performs the comparison of the
- \a left and \a right values repeatedly, until either the comparison returns
+ \a computed and \a baseline values repeatedly, until either the comparison returns
\c true or the \a timeout (in milliseconds) is reached. Between each
comparison, events will be processed. If the timeout is reached, a failure
is recorded in the test log and the test won't be executed further.
+ \include qtestcase.qdoc chrono-timeout
+
\include qtestcase.qdoc macro-usage-limitation
\sa QCOMPARE_LE(), QTRY_COMPARE_LE()
*/
-/*! \macro QTRY_COMPARE_LE(left, right)
+/*! \macro QTRY_COMPARE_LE(computed, baseline)
\since 6.4
\relates QTest
- Performs comparison of \a left and \a right values by invoking
+ Performs comparison of \a computed and \a baseline values by invoking
QTRY_COMPARE_LE_WITH_TIMEOUT with a timeout of five seconds.
\include qtestcase.qdoc macro-usage-limitation
@@ -563,26 +579,28 @@
\sa QCOMPARE_LE(), QTRY_COMPARE_LE_WITH_TIMEOUT()
*/
-/*! \macro QTRY_COMPARE_GT_WITH_TIMEOUT(left, right, timeout)
+/*! \macro QTRY_COMPARE_GT_WITH_TIMEOUT(computed, baseline, timeout)
\since 6.4
\relates QTest
This macro is similar to QCOMPARE_GT(), but performs the comparison of the
- \a left and \a right values repeatedly, until either the comparison returns
+ \a computed and \a baseline values repeatedly, until either the comparison returns
\c true or the \a timeout (in milliseconds) is reached. Between each
comparison, events will be processed. If the timeout is reached, a failure
is recorded in the test log and the test won't be executed further.
+ \include qtestcase.qdoc chrono-timeout
+
\include qtestcase.qdoc macro-usage-limitation
\sa QCOMPARE_GT(), QTRY_COMPARE_GT()
*/
-/*! \macro QTRY_COMPARE_GT(left, right)
+/*! \macro QTRY_COMPARE_GT(computed, baseline)
\since 6.4
\relates QTest
- Performs comparison of \a left and \a right values by invoking
+ Performs comparison of \a computed and \a baseline values by invoking
QTRY_COMPARE_GT_WITH_TIMEOUT with a timeout of five seconds.
\include qtestcase.qdoc macro-usage-limitation
@@ -590,26 +608,28 @@
\sa QCOMPARE_GT(), QTRY_COMPARE_GT_WITH_TIMEOUT()
*/
-/*! \macro QTRY_COMPARE_GE_WITH_TIMEOUT(left, right, timeout)
+/*! \macro QTRY_COMPARE_GE_WITH_TIMEOUT(computed, baseline, timeout)
\since 6.4
\relates QTest
This macro is similar to QCOMPARE_GE(), but performs the comparison of the
- \a left and \a right values repeatedly, until either the comparison returns
+ \a computed and \a baseline values repeatedly, until either the comparison returns
\c true or the \a timeout (in milliseconds) is reached. Between each
comparison, events will be processed. If the timeout is reached, a failure
is recorded in the test log and the test won't be executed further.
+ \include qtestcase.qdoc chrono-timeout
+
\include qtestcase.qdoc macro-usage-limitation
\sa QCOMPARE_GE(), QTRY_COMPARE_GE()
*/
-/*! \macro QTRY_COMPARE_GE(left, right)
+/*! \macro QTRY_COMPARE_GE(computed, baseline)
\since 6.4
\relates QTest
- Performs comparison of \a left and \a right values by invoking
+ Performs comparison of \a computed and \a baseline values by invoking
QTRY_COMPARE_GE_WITH_TIMEOUT with a timeout of five seconds.
\include qtestcase.qdoc macro-usage-limitation
@@ -782,7 +802,8 @@
failure will be reported.
If a \l QVERIFY() or \l QCOMPARE() is marked as an expected failure,
- but passes instead, an unexpected pass (XPASS) is written to the test log.
+ but passes instead, an unexpected pass (XPASS) is written to the test log
+ and will be counted as a test failure.
The parameter \a dataIndex describes for which entry in the test data the
failure is expected. Pass an empty string (\c{""}) if the failure
@@ -961,8 +982,8 @@
this macro.
Unlike QBENCHMARK, the contents of the contained code block is only run
- once. The elapsed time will be reported as "0" if it's to short to
- be measured by the selected backend. (Use)
+ once. The elapsed time will be reported as "0" if it's too short to
+ be measured by the selected backend.
\sa {Qt Test Overview#Creating a Benchmark}{Creating a Benchmark},
{Chapter 5: Writing a Benchmark}{Writing a Benchmark}
@@ -1230,7 +1251,7 @@
\sa QTest::keyClick()
*/
-/*! \fn void QTest::mousePress(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay=-1)
+/*! \fn void QTest::mousePress(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier, QPoint pos = QPoint(), int delay=-1)
Simulates pressing a mouse \a button with an optional \a modifier
on a \a widget. The position is defined by \a pos; the default
@@ -1241,7 +1262,7 @@
\sa QTest::mouseRelease(), QTest::mouseClick()
*/
-/*! \fn void QTest::mousePress(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey = 0, QPoint pos = QPoint(), int delay=-1)
+/*! \fn void QTest::mousePress(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos = QPoint(), int delay=-1)
\overload
\since 5.0
@@ -1254,18 +1275,27 @@
\sa QTest::mouseRelease(), QTest::mouseClick()
*/
-/*! \fn void QTest::mouseRelease(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay=-1)
+/*! \fn void QTest::mouseRelease(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier, QPoint pos = QPoint(), int delay=-1)
Simulates releasing a mouse \a button with an optional \a modifier
on a \a widget. The position of the release is defined by \a pos;
the default position is the center of the widget. If \a delay is
specified, the test will wait for the specified amount of
- milliseconds before releasing the button.
+ milliseconds before releasing the button; otherwise, it will wait for a
+ default amount of time (1 ms), which can be overridden via
+ \l {Testing Options}{command-line arguments}.
+
+ \note If you wish to test a double-click by sending events individually,
+ specify a short delay, greater than the default, on both mouse release events.
+ The total of the delays for the press, release, press and release must be
+ less than QStyleHints::mouseDoubleClickInterval(). But if you don't need
+ to check state between events, it's better to use QTest::mouseDClick().
+ \snippet code/src_qtestlib_qtestcase_snippet.cpp 35
\sa QTest::mousePress(), QTest::mouseClick()
*/
-/*! \fn void QTest::mouseRelease(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey = 0, QPoint pos = QPoint(), int delay=-1)
+/*! \fn void QTest::mouseRelease(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos = QPoint(), int delay=-1)
\overload
\since 5.0
@@ -1273,12 +1303,21 @@
on a \a window. The position of the release is defined by \a pos;
the default position is the center of the window. If \a delay is
specified, the test will wait for the specified amount of
- milliseconds before releasing the button.
+ milliseconds before releasing the button; otherwise, it will wait for a
+ default amount of time (1 ms), which can be overridden via
+ \l {Testing Options}{command-line arguments}.
+
+ \note If you wish to test a double-click by sending events individually,
+ specify a short delay, greater than the default, on both mouse release events.
+ The total of the delays for the press, release, press and release must be
+ less than QStyleHints::mouseDoubleClickInterval(). But if you don't need
+ to check state between events, it's better to use QTest::mouseDClick().
+ \snippet code/src_qtestlib_qtestcase_snippet.cpp 35
\sa QTest::mousePress(), QTest::mouseClick()
*/
-/*! \fn void QTest::mouseClick(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay=-1)
+/*! \fn void QTest::mouseClick(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier, QPoint pos = QPoint(), int delay=-1)
Simulates clicking a mouse \a button with an optional \a modifier
on a \a widget. The position of the click is defined by \a pos;
@@ -1289,7 +1328,7 @@
\sa QTest::mousePress(), QTest::mouseRelease()
*/
-/*! \fn void QTest::mouseClick(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey = 0, QPoint pos = QPoint(), int delay=-1)
+/*! \fn void QTest::mouseClick(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos = QPoint(), int delay=-1)
\overload
\since 5.0
@@ -1302,7 +1341,7 @@
\sa QTest::mousePress(), QTest::mouseRelease()
*/
-/*! \fn void QTest::mouseDClick(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay=-1)
+/*! \fn void QTest::mouseDClick(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier, QPoint pos = QPoint(), int delay=-1)
Simulates double clicking a mouse \a button with an optional \a
modifier on a \a widget. The position of the click is defined by
@@ -1313,7 +1352,7 @@
\sa QTest::mouseClick()
*/
-/*! \fn void QTest::mouseDClick(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey = 0, QPoint pos = QPoint(), int delay=-1)
+/*! \fn void QTest::mouseDClick(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos = QPoint(), int delay=-1)
\overload
\since 5.0
@@ -1344,11 +1383,15 @@
moving the mouse pointer.
*/
-/*!
- \fn template <typename T1, typename T2> char *QTest::toString(const QPair<T1, T2> &pair)
- \overload
- \since 5.11
- Returns a textual representation of the \a pair.
+/*! \fn void QTest::wheelEvent(QWindow *window, QPointF pos, QPoint angleDelta, QPoint pixelDelta = QPoint(0, 0), Qt::KeyboardModifiers stateKey = Qt::NoModifier, Qt::ScrollPhase phase = Qt::NoScrollPhase)
+ \since 6.8
+
+ Simulates a wheel event within \a window at position \a pos in local
+ window coordinates. \a angleDelta contains the wheel rotation angle.
+ A positive value means forward rotation, and a negative one means backward.
+ \a pixelDelta contains the scrolling distance in pixels on screen. This value can be null.
+ The keyboard states at the time of the event are specified by \a stateKey.
+ The scrolling phase of the event is specified by \a phase.
*/
/*!
@@ -1380,7 +1423,7 @@
*/
/*!
- \fn template<typename T> char *QTest::toString(const T &value)
+ \fn template<typename T, QTest::Internal::is_suitable_type_v<T> = true> char *QTest::toString(const T &value)
Returns a textual representation of \a value. This function is used by
\l QCOMPARE() to output verbose information in case of a test failure.
@@ -1565,7 +1608,8 @@
*/
/*!
- \fn char *QTest::toString(QSizePolicy::ControlType ct)
+ \fn char *toString(QSizePolicy::ControlType ct)
+ \relates QTest
\overload
\since 5.5
@@ -1573,7 +1617,8 @@
*/
/*!
- \fn char *QTest::toString(QSizePolicy::ControlTypes cts)
+ \fn char *toString(QSizePolicy::ControlTypes cts)
+ \relates QTest
\overload
\since 5.5
@@ -1581,7 +1626,8 @@
*/
/*!
- \fn char *QTest::toString(QSizePolicy::Policy p)
+ \fn char *toString(QSizePolicy::Policy p)
+ \relates QTest
\overload
\since 5.5
@@ -1589,7 +1635,8 @@
*/
/*!
- \fn char *QTest::toString(QSizePolicy sp)
+ \fn char *toString(QSizePolicy sp)
+ \relates QTest
\overload
\since 5.5
@@ -1604,22 +1651,16 @@
*/
/*!
- \fn template <typename Tuple, int... I> char *QTest::toString(const Tuple &tuple, QtPrivate::IndexesList<I...> )
- \internal
- \since 5.12
-*/
-
-/*!
\fn QPointingDevice * QTest::createTouchDevice(QInputDevice::DeviceType devType = QInputDevice::DeviceType::TouchScreen, QInputDevice::Capabilities caps = QInputDevice::Capability::Position)
\since 5.8
Creates a dummy touch device of type \a devType with capabilities \a caps for
simulation of touch events.
- The touch device will be registered with the QPA window system interface,
- and deleted automatically when the QCoreApplication is deleted. So you
- should typically use createTouchDevice() to initialize a QPointingDevice
- member variable in your test case class, and use the same instance for all tests.
+ The touch device will be registered with the Qt window system interface.
+ You should typically use createTouchDevice() to initialize a QPointingDevice
+ member variable in your test case class, use the same instance for all tests and
+ delete it when no longer needed.
\sa QTest::QTouchEventSequence, touchEvent()
*/