diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-11 08:33:06 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-11 08:33:06 (GMT) |
commit | fe9b8d7d2cf9c25ad8c594dda3339c32ea8e876b (patch) | |
tree | 4461c374ec61fb2d8d85a521020f1bcf4de0ba70 /src/testlib/qtestcase.cpp | |
parent | feb1351592b55b2a97db737b91f301b69f42cdc9 (diff) | |
download | Qt-fe9b8d7d2cf9c25ad8c594dda3339c32ea8e876b.zip Qt-fe9b8d7d2cf9c25ad8c594dda3339c32ea8e876b.tar.gz Qt-fe9b8d7d2cf9c25ad8c594dda3339c32ea8e876b.tar.bz2 |
Changed Symbian tests to sleep only when run on emulator.
Changed comment to be more accurate and changed ifdefs so that this
will only be done for emulator.
This issue needs more comprehensive analysis and wide test runs to
determine what the pratical impact of removing this delay entirely
would be.
Task-number: 247270
Reviewed-by: Janne Anttila
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r-- | src/testlib/qtestcase.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 830a5ae..b7b2327 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -367,9 +367,9 @@ QT_BEGIN_NAMESPACE 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 + once. The elapsed time will be reported as "0" if it's to short to be measured by the selected backend. (Use) - + \sa {QTestLib Manual#Creating a Benchmark}{Creating a Benchmark}, {Chapter 5: Writing a Benchmark}{Writing a Benchmark} */ @@ -738,7 +738,7 @@ QT_BEGIN_NAMESPACE \brief The QTouchEventSequence class is used to simulate a sequence of touch events. - To simulate a sequence of touch events on a specific device for a widget, call + To simulate a sequence of touch events on a specific device for a widget, call QTest::touchEvent to create a QTouchEventSequence instance. Add touch events to the sequence by calling press(), move(), release() and stationary(), and let the instance run out of scope to commit the sequence to the event system. @@ -756,7 +756,7 @@ QT_BEGIN_NAMESPACE Adds a press event for touchpoint \a touchId at position \a pt to this sequence and returns a reference to this QTouchEventSequence. - The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then + The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then \a pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence. Simulates that the user pressed the touch screen or pad with the finger identified by \a touchId. @@ -768,7 +768,7 @@ QT_BEGIN_NAMESPACE Adds a move event for touchpoint \a touchId at position \a pt to this sequence and returns a reference to this QTouchEventSequence. - The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then + The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then \a pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence. Simulates that the user moved the finger identified by \a touchId. @@ -779,8 +779,8 @@ QT_BEGIN_NAMESPACE Adds a release event for touchpoint \a touchId at position \a pt to this sequence and returns a reference to this QTouchEventSequence. - - The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then + + The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then \a pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence. Simulates that the user lifted the finger identified by \a touchId. @@ -791,7 +791,7 @@ QT_BEGIN_NAMESPACE Adds a stationary event for touchpoint \a touchId to this sequence and returns a reference to this QTouchEventSequence. - + Simulates that the user did not move the finger identified by \a touchId. */ @@ -1612,8 +1612,11 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) } #endif -#ifdef Q_OS_SYMBIAN -//### FIX THIS temporary hack to delay execution of symbian os tests. Used to get emulator to stable state before running testcase +#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) + // Delay execution of tests in Symbian emulator. + // Needed to allow worst of other higher priority apps and services launched by emulator + // to get out of the way before we run our test. Otherwise some of the timing sensitive tests + // will not work properly. qSleep(3000); #endif @@ -2124,7 +2127,7 @@ bool QTest::compare_string_helper(const char *t1, const char *t2, const char *ac /*! \fn bool QTest::qCompare(bool const &t1, int const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ - + /*! \fn bool QTest::qTest(const T& actual, const char *elementName, const char *actualStr, const char *expected, const char *file, int line) \internal */ |