summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-23 19:56:59 +0100
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-23 19:56:59 +0100
commit0be215ea57fa7bd0787d995381b24faaf23d1b7b (patch)
tree4a2977fd232abaa9d9b7058ad1389ec08090c6e5 /src/corelib/animation
parente3999a4f91194b7508dbd1d3e6f595f729022ed7 (diff)
parent237b528f518f541d2f6c2ffcbaccca1a776a6f8b (diff)
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (114 commits) Fix the test of QDirIterator with NoDot and NoDotDot Split QDir::NoDotAndDotDot into QDir::NoDot and QDir::NoDotDot QFSFileEngine: don't look through NTFS junctions After showing modal windows, WM_LBUTTONUP for double click is ignored. Possible fix for missing QML properties in the qt.qhp file. Use standard theme icons in Linguist where possible Use more standard icons from the theme in Assistant Use more standard icons for standard actions in Designer Drag & drop operations wont end while using Remote Desktop sessions _close(fd) closes the associated handle and not the other way around Fixed locale mapping on Symbian. Revert change 7bf4512659 on Cocoa. Extended the high_attributes array, since we have more than 127 widget attributes now. Added instructions for MinGW users wanting to build the MySQL driver. Designer: Fix broken resource view. Add missing ,. get rid of build warning messages Quiet unnecessary configure/qmake warnings when EPOCROOT is not set. Add configure test for Maemo Internet Connection Daemon. fix warning ...
Diffstat (limited to 'src/corelib/animation')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp1
-rw-r--r--src/corelib/animation/qabstractanimation_p.h57
2 files changed, 3 insertions, 55 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index f834a80ee6..82b30036cf 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -170,6 +170,7 @@ QUnifiedTimer::QUnifiedTimer() :
currentAnimationIdx(0), consistentTiming(false), slowMode(false),
isPauseTimerActive(false), runningLeafAnimations(0)
{
+ time.invalidate();
}
QUnifiedTimer *QUnifiedTimer::instance()
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index 8bc3224be2..2282cdbc34 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -56,6 +56,7 @@
#include <QtCore/qbasictimer.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qtimer.h>
+#include <QtCore/qelapsedtimer.h>
#include <private/qobject_p.h>
#ifdef Q_OS_WIN
@@ -113,61 +114,7 @@ private:
Q_DECLARE_PUBLIC(QAbstractAnimation)
};
-class ElapsedTimer
-{
-public:
- ElapsedTimer() {
- invalidate();
- }
-
- void invalidate() {
- m_started = -1;
- }
-
- bool isValid() const {
- return m_started >= 0;
- }
-
- void start() {
- m_started = getTickCount_sys();
- }
-
- qint64 elapsed() const {
- qint64 current = getTickCount_sys();
- qint64 delta = current - m_started;
- if (delta < 0)
- delta += getPeriod_sys(); //we wrapped around
- return delta;
- }
-
-private:
- enum {
- MSECS_PER_HOUR = 3600000,
- MSECS_PER_MIN = 60000
- };
-
- qint64 m_started;
-
- quint64 getPeriod_sys() const {
-#ifdef Q_OS_WIN
- return Q_UINT64_C(0x100000000);
-#else
- // fallback
- return 86400 * 1000;
-#endif
- }
-
- qint64 getTickCount_sys() const {
-#ifdef Q_OS_WIN
- return ::GetTickCount();
-#else
- // fallback
- const QTime t = QTime::currentTime();
- return MSECS_PER_HOUR * t.hour() + MSECS_PER_MIN * t.minute() + 1000 * t.second() + t.msec();
-#endif
- }
-};
-
+typedef QElapsedTimer ElapsedTimer;
class QUnifiedTimer : public QObject
{