summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-29 01:02:53 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-29 01:02:53 (GMT)
commit24a4c2815d0dfed7ed925b22ab92b8b6aeb7924b (patch)
tree95c0a657ff444a2db62b2f5eaa7d2222ca980ea6
parent1a06c319df618f8b91eaac08797f03d0d4272478 (diff)
parent63e010a09d53e0269182902a17dd2e79738f2e23 (diff)
downloadQt-24a4c2815d0dfed7ed925b22ab92b8b6aeb7924b.zip
Qt-24a4c2815d0dfed7ed925b22ab92b8b6aeb7924b.tar.gz
Qt-24a4c2815d0dfed7ed925b22ab92b8b6aeb7924b.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging: Fixed instability of tst_qdatetime::currentDateTime(Utc) on Linux
-rw-r--r--tests/auto/qdatetime/tst_qdatetime.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp
index 1a82a4c..1841487 100644
--- a/tests/auto/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/qdatetime/tst_qdatetime.cpp
@@ -959,7 +959,9 @@ void tst_QDateTime::currentDateTime()
#endif
QDateTime upperBound;
upperBound.setTime_t(buf2);
- upperBound = upperBound.addSecs(1);
+ // Note we must add 2 seconds here because time() may return up to
+ // 1 second difference from the more accurate method used by QDateTime::currentDateTime()
+ upperBound = upperBound.addSecs(2);
QString details = QString("\n"
"lowerBound: %1\n"
@@ -1010,7 +1012,9 @@ void tst_QDateTime::currentDateTimeUtc()
#endif
QDateTime upperBound;
upperBound.setTime_t(buf2);
- upperBound = upperBound.addSecs(1);
+ // Note we must add 2 seconds here because time() may return up to
+ // 1 second difference from the more accurate method used by QDateTime::currentDateTime()
+ upperBound = upperBound.addSecs(2);
QString details = QString("\n"
"lowerBound: %1\n"