qabstractanimation.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/animation/qabstractanimation.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2015 The Qt Company Ltd.-
4** Contact: http://www.qt.io/licensing/-
5**-
6** This file is part of the QtCore module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL21$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see http://www.qt.io/terms-conditions. For further-
15** information use the contact form at http://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 2.1 or version 3 as published by the Free-
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
22** following information to ensure the GNU Lesser General Public License-
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
25**-
26** As a special exception, The Qt Company gives you certain additional-
27** rights. These rights are described in The Qt Company LGPL Exception-
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
29**-
30** $QT_END_LICENSE$-
31**-
32****************************************************************************/-
33-
34/*!-
35 \class QAbstractAnimation-
36 \inmodule QtCore-
37 \ingroup animation-
38 \brief The QAbstractAnimation class is the base of all animations.-
39 \since 4.6-
40-
41 The class defines the functions for the functionality shared by-
42 all animations. By inheriting this class, you can create custom-
43 animations that plug into the rest of the animation framework.-
44-
45 The progress of an animation is given by its current time-
46 (currentLoopTime()), which is measured in milliseconds from the start-
47 of the animation (0) to its end (duration()). The value is updated-
48 automatically while the animation is running. It can also be set-
49 directly with setCurrentTime().-
50-
51 At any point an animation is in one of three states:-
52 \l{QAbstractAnimation::}{Running},-
53 \l{QAbstractAnimation::}{Stopped}, or-
54 \l{QAbstractAnimation::}{Paused}--as defined by the-
55 \l{QAbstractAnimation::}{State} enum. The current state can be-
56 changed by calling start(), stop(), pause(), or resume(). An-
57 animation will always reset its \l{currentTime()}{current time}-
58 when it is started. If paused, it will continue with the same-
59 current time when resumed. When an animation is stopped, it cannot-
60 be resumed, but will keep its current time (until started again).-
61 QAbstractAnimation will emit stateChanged() whenever its state-
62 changes.-
63-
64 An animation can loop any number of times by setting the loopCount-
65 property. When an animation's current time reaches its duration(),-
66 it will reset the current time and keep running. A loop count of 1-
67 (the default value) means that the animation will run one time.-
68 Note that a duration of -1 means that the animation will run until-
69 stopped; the current time will increase indefinitely. When the-
70 current time equals duration() and the animation is in its-
71 final loop, the \l{QAbstractAnimation::}{Stopped} state is-
72 entered, and the finished() signal is emitted.-
73-
74 QAbstractAnimation provides pure virtual functions used by-
75 subclasses to track the progress of the animation: duration() and-
76 updateCurrentTime(). The duration() function lets you report a-
77 duration for the animation (as discussed above). The animation-
78 framework calls updateCurrentTime() when current time has changed.-
79 By reimplementing this function, you can track the animation-
80 progress. Note that neither the interval between calls nor the-
81 number of calls to this function are defined; though, it will-
82 normally be 60 updates per second.-
83-
84 By reimplementing updateState(), you can track the animation's-
85 state changes, which is particularly useful for animations that-
86 are not driven by time.-
87-
88 \sa QVariantAnimation, QPropertyAnimation, QAnimationGroup, {The Animation Framework}-
89*/-
90-
91/*!-
92 \enum QAbstractAnimation::DeletionPolicy-
93-
94 \value KeepWhenStopped The animation will not be deleted when stopped.-
95 \value DeleteWhenStopped The animation will be automatically deleted when-
96 stopped.-
97*/-
98-
99/*!-
100 \fn QAbstractAnimation::finished()-
101-
102 QAbstractAnimation emits this signal after the animation has stopped and-
103 has reached the end.-
104-
105 This signal is emitted after stateChanged().-
106-
107 \sa stateChanged()-
108*/-
109-
110/*!-
111 \fn QAbstractAnimation::stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)-
112-
113 QAbstractAnimation emits this signal whenever the state of the animation has-
114 changed from \a oldState to \a newState. This signal is emitted after the virtual-
115 updateState() function is called.-
116-
117 \sa updateState()-
118*/-
119-
120/*!-
121 \fn QAbstractAnimation::currentLoopChanged(int currentLoop)-
122-
123 QAbstractAnimation emits this signal whenever the current loop-
124 changes. \a currentLoop is the current loop.-
125-
126 \sa currentLoop(), loopCount()-
127*/-
128-
129/*!-
130 \fn QAbstractAnimation::directionChanged(QAbstractAnimation::Direction newDirection);-
131-
132 QAbstractAnimation emits this signal whenever the direction has been-
133 changed. \a newDirection is the new direction.-
134-
135 \sa direction-
136*/-
137-
138#include "qabstractanimation.h"-
139#include "qanimationgroup.h"-
140-
141#include <QtCore/qdebug.h>-
142-
143#include "qabstractanimation_p.h"-
144-
145#include <QtCore/qmath.h>-
146#include <QtCore/qthreadstorage.h>-
147#include <QtCore/qcoreevent.h>-
148#include <QtCore/qpointer.h>-
149-
150#ifndef QT_NO_ANIMATION-
151-
152#define DEFAULT_TIMER_INTERVAL 16-
153#define PAUSE_TIMER_COARSE_THRESHOLD 2000-
154-
155QT_BEGIN_NAMESPACE-
156-
157typedef QList<QAbstractAnimationTimer*>::ConstIterator TimerListConstIt;-
158typedef QList<QAbstractAnimation*>::ConstIterator AnimationListConstIt;-
159-
160/*!-
161 \class QAbstractAnimationTimer-
162 \inmodule QtCore-
163 \brief QAbstractAnimationTimer is the base class for animation timers.-
164 \internal-
165-
166 Subclass QAbstractAnimationTimer to provide an animation timer that is run by-
167 QUnifiedTimer and can in turn be used to run any number of animations.-
168-
169 Currently two subclasses have been implemented: QAnimationTimer to drive the Qt C++-
170 animation framework (QAbstractAnimation and subclasses) and QDeclarativeAnimationTimer-
171 to drive the Qt QML animation framework.-
172*/-
173-
174/*!-
175 \fn virtual void QAbstractAnimationTimer::updateAnimationsTime(qint64 delta) = 0;-
176 \internal-
177-
178 This pure virtual function is called when the animation timer needs to update-
179 the current time for all animations it is running.-
180*/-
181-
182/*!-
183 \fn virtual void QAbstractAnimationTimer::restartAnimationTimer() = 0;-
184 \internal-
185-
186 This pure virtual function restarts the animation timer as needed.-
187-
188 Classes implementing this function may choose to pause or resume the timer-
189 as appropriate, or conditionally restart it.-
190*/-
191-
192/*!-
193 \fn virtual int QAbstractAnimationTimer::runningAnimationCount() = 0;-
194 \internal-
195-
196 This pure virtual function returns the number of animations the timer is running.-
197 This information is useful for profiling.-
198*/-
199-
200/*!-
201 \class QUnifiedTimer-
202 \inmodule QtCore-
203 \brief QUnifiedTimer provides a unified timing mechanism for animations in Qt C++ and QML.-
204 \internal-
205-
206 QUnifiedTimer allows animations run by Qt to share a single timer. This keeps animations-
207 visually in sync, as well as being more efficient than running numerous timers.-
208-
209 QUnifiedTimer drives animations indirectly, via QAbstractAnimationTimer.-
210*/-
211-
212#ifndef QT_NO_THREAD-
213Q_GLOBAL_STATIC(QThreadStorage<QUnifiedTimer *>, unifiedTimer)
executed 28 times by 28 tests: end of block
Executed by:
  • tst_gestures - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qaccessibility - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qcolumnview - unknown status
  • tst_qdockwidget - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qmdisubwindow - unknown status
  • tst_qmenu - unknown status
  • tst_qparallelanimationgroup - unknown status
  • tst_qpauseanimation - unknown status
  • tst_qprinter - unknown status
  • tst_qprogressbar - unknown status
  • tst_qpropertyanimation - unknown status
  • tst_qscroller - unknown status
  • tst_qsequentialanimationgroup - unknown status
  • tst_qshortcut - unknown status
  • tst_qstatemachine - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtoolbar - unknown status
  • tst_qtreeview - unknown status
  • tst_qtreewidget - unknown status
  • ...
executed 28 times by 28 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_gestures - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qaccessibility - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qcolumnview - unknown status
  • tst_qdockwidget - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qmdisubwindow - unknown status
  • tst_qmenu - unknown status
  • tst_qparallelanimationgroup - unknown status
  • tst_qpauseanimation - unknown status
  • tst_qprinter - unknown status
  • tst_qprogressbar - unknown status
  • tst_qpropertyanimation - unknown status
  • tst_qscroller - unknown status
  • tst_qsequentialanimationgroup - unknown status
  • tst_qshortcut - unknown status
  • tst_qstatemachine - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtoolbar - unknown status
  • tst_qtreeview - unknown status
  • tst_qtreewidget - unknown status
  • ...
executed 9634 times by 54 tests: return &holder.value;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 28 times by 28 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qaccessibility - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qcolumnview - unknown status
  • tst_qdockwidget - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qmdisubwindow - unknown status
  • tst_qmenu - unknown status
  • tst_qparallelanimationgroup - unknown status
  • tst_qpauseanimation - unknown status
  • tst_qprinter - unknown status
  • tst_qprogressbar - unknown status
  • tst_qpropertyanimation - unknown status
  • tst_qscroller - unknown status
  • tst_qsequentialanimationgroup - unknown status
  • tst_qshortcut - unknown status
  • tst_qstatemachine - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtoolbar - unknown status
  • tst_qtreeview - unknown status
  • tst_qtreewidget - unknown status
  • ...
FALSEnever evaluated
0-9634
214#endif-
215-
216QUnifiedTimer::QUnifiedTimer() :-
217 QObject(), defaultDriver(this), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL),-
218 currentAnimationIdx(0), insideTick(false), insideRestart(false), consistentTiming(false), slowMode(false),-
219 startTimersPending(false), stopTimerPending(false),-
220 slowdownFactor(5.0f), profilerCallback(0),-
221 driverStartTime(0), temporalDrift(0)-
222{-
223 time.invalidate();-
224 driver = &defaultDriver;-
225}
executed 26 times by 26 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
26
226-
227-
228QUnifiedTimer *QUnifiedTimer::instance(bool create)-
229{-
230 QUnifiedTimer *inst;-
231#ifndef QT_NO_THREAD-
232 if (create && !unifiedTimer()->hasLocalData()) {
createDescription
TRUEevaluated 2356 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
FALSEevaluated 1296 times by 54 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
!unifiedTimer(...hasLocalData()Description
TRUEevaluated 26 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
FALSEevaluated 2330 times by 23 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWindowContainer
26-2356
233 inst = new QUnifiedTimer;-
234 unifiedTimer()->setLocalData(inst);-
235 } else {
executed 26 times by 26 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
26
236 inst = unifiedTimer() ? unifiedTimer()->localData() : 0;
unifiedTimer()Description
TRUEevaluated 3626 times by 54 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEnever evaluated
0-3626
237 }
executed 3626 times by 54 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
3626
238#else-
239 static QUnifiedTimer unifiedTimer;-
240 inst = &unifiedTimer;-
241#endif-
242 return inst;
executed 3652 times by 54 tests: return inst;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
3652
243}-
244-
245QUnifiedTimer *QUnifiedTimer::instance()-
246{-
247 return instance(true);
executed 2235 times by 26 tests: return instance(true);
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
2235
248}-
249-
250void QUnifiedTimer::maybeUpdateAnimationsToCurrentTime()-
251{-
252 if (elapsed() - lastTick > 50)
elapsed() - lastTick > 50Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractAnimation
FALSEevaluated 283 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
2-283
253 updateAnimationTimers(-1);
executed 2 times by 1 test: updateAnimationTimers(-1);
Executed by:
  • tst_QAbstractAnimation
2
254}
executed 285 times by 26 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
285
255-
256qint64 QUnifiedTimer::elapsed() const-
257{-
258 if (driver->isRunning())
driver->isRunning()Description
TRUEevaluated 2054 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 397 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
397-2054
259 return driverStartTime + driver->elapsed();
executed 2054 times by 12 tests: return driverStartTime + driver->elapsed();
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
2054
260 else if (time.isValid())
time.isValid()Description
TRUEevaluated 147 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 250 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
147-250
261 return time.elapsed() + temporalDrift;
executed 147 times by 12 tests: return time.elapsed() + temporalDrift;
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
147
262-
263 // Reaching here would normally indicate that the function is called-
264 // under the wrong circumstances as neither pauses nor actual animations-
265 // are running and there should be no need to query for elapsed().-
266 return 0;
executed 250 times by 26 tests: return 0;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
250
267}-
268-
269void QUnifiedTimer::startAnimationDriver()-
270{-
271 if (driver->isRunning()) {
driver->isRunning()Description
TRUEnever evaluated
FALSEevaluated 123 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
0-123
272 qWarning("QUnifiedTimer::startAnimationDriver: driver is already running...");-
273 return;
never executed: return;
0
274 }-
275 // Set the start time to the currently elapsed() value before starting.-
276 // This means we get the animation system time including the temporal drift-
277 // which is what we want.-
278 driverStartTime = elapsed();-
279 driver->start();-
280}
executed 123 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
123
281-
282void QUnifiedTimer::stopAnimationDriver()-
283{-
284 if (!driver->isRunning()) {
!driver->isRunning()Description
TRUEnever evaluated
FALSEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
0-118
285 qWarning("QUnifiedTimer::stopAnimationDriver: driver is not running");-
286 return;
never executed: return;
0
287 }-
288 // Update temporal drift. Since the driver is running, elapsed() will-
289 // return the total animation time in driver-time. Subtract the current-
290 // wall time to get the delta.-
291 temporalDrift = elapsed() - time.elapsed();-
292 driver->stop();-
293}
executed 118 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
118
294-
295void QUnifiedTimer::updateAnimationTimers(qint64)-
296{-
297 //setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations-
298 if(insideTick)
insideTickDescription
TRUEnever evaluated
FALSEevaluated 1925 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
0-1925
299 return;
never executed: return;
0
300-
301 qint64 totalElapsed = elapsed();-
302-
303 // ignore consistentTiming in case the pause timer is active-
304 qint64 delta = (consistentTiming && !pauseTimer.isActive()) ?
consistentTimingDescription
TRUEevaluated 96 times by 1 test
Evaluated by:
  • tst_QPauseAnimation
FALSEevaluated 1829 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
!pauseTimer.isActive()Description
TRUEevaluated 78 times by 1 test
Evaluated by:
  • tst_QPauseAnimation
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_QPauseAnimation
18-1829
305 timingInterval : totalElapsed - lastTick;-
306 if (slowMode) {
slowModeDescription
TRUEnever evaluated
FALSEevaluated 1925 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
0-1925
307 if (slowdownFactor > 0)
slowdownFactor > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
308 delta = qRound(delta / slowdownFactor);
never executed: delta = qRound(delta / slowdownFactor);
0
309 else-
310 delta = 0;
never executed: delta = 0;
0
311 }-
312-
313 lastTick = totalElapsed;-
314-
315 //we make sure we only call update time if the time has actually advanced-
316 //* it might happen in some cases that the time doesn't change because events are delayed-
317 // when the CPU load is high-
318 //* it might happen in some cases that the delta is negative because the animation driver-
319 // advances faster than time.elapsed()-
320 if (delta > 0) {
delta > 0Description
TRUEevaluated 1923 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractAnimation
2-1923
321 insideTick = true;-
322 if (profilerCallback)
profilerCallbackDescription
TRUEnever evaluated
FALSEevaluated 1923 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
0-1923
323 profilerCallback(delta);
never executed: profilerCallback(delta);
0
324 for (currentAnimationIdx = 0; currentAnimationIdx < animationTimers.count(); ++currentAnimationIdx) {
currentAnimati...Timers.count()Description
TRUEevaluated 1905 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 1923 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1905-1923
325 QAbstractAnimationTimer *animation = animationTimers.at(currentAnimationIdx);-
326 animation->updateAnimationsTime(delta);-
327 }
executed 1905 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1905
328 insideTick = false;-
329 currentAnimationIdx = 0;-
330 }
executed 1923 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1923
331}
executed 1925 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1925
332-
333int QUnifiedTimer::runningAnimationCount()-
334{-
335 int count = 0;-
336 for (int i = 0; i < animationTimers.count(); ++i)
i < animationTimers.count()Description
TRUEnever evaluated
FALSEnever evaluated
0
337 count += animationTimers.at(i)->runningAnimationCount();
never executed: count += animationTimers.at(i)->runningAnimationCount();
0
338 return count;
never executed: return count;
0
339}-
340-
341void QUnifiedTimer::registerProfilerCallback(void (*cb)(qint64))-
342{-
343 profilerCallback = cb;-
344}
never executed: end of block
0
345-
346void QUnifiedTimer::localRestart()-
347{-
348 if (insideRestart)
insideRestartDescription
TRUEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 2053 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
21-2053
349 return;
executed 21 times by 2 tests: return;
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
21
350-
351 if (!pausedAnimationTimers.isEmpty() && (animationTimers.count() + animationTimersToStart.count() == pausedAnimationTimers.count())) {
!pausedAnimati...mers.isEmpty()Description
TRUEevaluated 31 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 2022 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
(animationTime...imers.count())Description
TRUEevaluated 31 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEnever evaluated
0-2022
352 driver->stop();-
353 int closestTimeToFinish = closestPausedAnimationTimerTimeToFinish();-
354 // use a precise timer if the pause will be short-
355 Qt::TimerType timerType = closestTimeToFinish < PAUSE_TIMER_COARSE_THRESHOLD ? Qt::PreciseTimer : Qt::CoarseTimer;
closestTimeToFinish < 2000Description
TRUEevaluated 31 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEnever evaluated
0-31
356 pauseTimer.start(closestTimeToFinish, timerType, this);-
357 } else if (!driver->isRunning()) {
executed 31 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
!driver->isRunning()Description
TRUEevaluated 123 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 1899 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
31-1899
358 if (pauseTimer.isActive())
pauseTimer.isActive()Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 112 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
11-112
359 pauseTimer.stop();
executed 11 times by 2 tests: pauseTimer.stop();
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
11
360 startAnimationDriver();-
361 }
executed 123 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
123
362-
363}
executed 2053 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
2053
364-
365void QUnifiedTimer::restart()-
366{-
367 insideRestart = true;-
368 for (int i = 0; i < animationTimers.count(); ++i)
i < animationTimers.count()Description
TRUEevaluated 1902 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 1920 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1902-1920
369 animationTimers.at(i)->restartAnimationTimer();
executed 1902 times by 12 tests: animationTimers.at(i)->restartAnimationTimer();
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1902
370 insideRestart = false;-
371-
372 localRestart();-
373}
executed 1920 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1920
374-
375void QUnifiedTimer::setTimingInterval(int interval)-
376{-
377 timingInterval = interval;-
378-
379 if (driver->isRunning() && !pauseTimer.isActive()) {
driver->isRunning()Description
TRUEnever evaluated
FALSEnever evaluated
!pauseTimer.isActive()Description
TRUEnever evaluated
FALSEnever evaluated
0
380 //we changed the timing interval-
381 stopAnimationDriver();-
382 startAnimationDriver();-
383 }
never executed: end of block
0
384}
never executed: end of block
0
385-
386void QUnifiedTimer::startTimers()-
387{-
388 startTimersPending = false;-
389-
390 //we transfer the waiting animations into the "really running" state-
391 animationTimers += animationTimersToStart;-
392 animationTimersToStart.clear();-
393 if (!animationTimers.isEmpty()) {
!animationTimers.isEmpty()Description
TRUEevaluated 121 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-121
394 if (!time.isValid()) {
!time.isValid()Description
TRUEevaluated 121 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-121
395 lastTick = 0;-
396 time.start();-
397 temporalDrift = 0;-
398 driverStartTime = 0;-
399 }
executed 121 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
121
400 localRestart();-
401 }
executed 121 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
121
402}
executed 121 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
121
403-
404void QUnifiedTimer::stopTimer()-
405{-
406 stopTimerPending = false;-
407 if (animationTimers.isEmpty()) {
animationTimers.isEmpty()Description
TRUEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-118
408 stopAnimationDriver();-
409 pauseTimer.stop();-
410 // invalidate the start reference time-
411 time.invalidate();-
412 }
executed 118 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
118
413}
executed 118 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
118
414-
415void QUnifiedTimer::timerEvent(QTimerEvent *event)-
416{-
417 //in the case of consistent timing we make sure the order in which events come is always the same-
418 //for that purpose we do as if the startstoptimer would always fire before the animation timer-
419 if (consistentTiming) {
consistentTimingDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_QPauseAnimation
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
3-16
420 if (stopTimerPending)
stopTimerPendingDescription
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_QPauseAnimation
0-16
421 stopTimer();
never executed: stopTimer();
0
422 if (startTimersPending)
startTimersPendingDescription
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_QPauseAnimation
0-16
423 startTimers();
never executed: startTimers();
0
424 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_QPauseAnimation
16
425-
426 if (event->timerId() == pauseTimer.timerId()) {
event->timerId...imer.timerId()Description
TRUEevaluated 19 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEnever evaluated
0-19
427 // update current time on all timers-
428 updateAnimationTimers(-1);-
429 restart();-
430 }
executed 19 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
19
431}
executed 19 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
19
432-
433void QUnifiedTimer::startAnimationTimer(QAbstractAnimationTimer *timer)-
434{-
435 if (timer->isRegistered)
timer->isRegisteredDescription
TRUEnever evaluated
FALSEevaluated 121 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
0-121
436 return;
never executed: return;
0
437 timer->isRegistered = true;-
438-
439 QUnifiedTimer *inst = instance(true); //we create the instance if needed-
440 inst->animationTimersToStart << timer;-
441 if (!inst->startTimersPending) {
!inst->startTimersPendingDescription
TRUEevaluated 121 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-121
442 inst->startTimersPending = true;-
443 QMetaObject::invokeMethod(inst, "startTimers", Qt::QueuedConnection);-
444 }
executed 121 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
121
445}
executed 121 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
121
446-
447void QUnifiedTimer::stopAnimationTimer(QAbstractAnimationTimer *timer)-
448{-
449 QUnifiedTimer *inst = QUnifiedTimer::instance(false);-
450 if (inst) {
instDescription
TRUEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-118
451 //at this point the unified timer should have been created-
452 //but it might also have been already destroyed in case the application is shutting down-
453-
454 if (!timer->isRegistered)
!timer->isRegisteredDescription
TRUEnever evaluated
FALSEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
0-118
455 return;
never executed: return;
0
456 timer->isRegistered = false;-
457-
458 int idx = inst->animationTimers.indexOf(timer);-
459 if (idx != -1) {
idx != -1Description
TRUEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-118
460 inst->animationTimers.removeAt(idx);-
461 // this is needed if we unregister an animation while its running-
462 if (idx <= inst->currentAnimationIdx)
idx <= inst->c...ntAnimationIdxDescription
TRUEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-118
463 --inst->currentAnimationIdx;
executed 118 times by 10 tests: --inst->currentAnimationIdx;
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
118
464-
465 if (inst->animationTimers.isEmpty() && !inst->stopTimerPending) {
inst->animatio...mers.isEmpty()Description
TRUEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
!inst->stopTimerPendingDescription
TRUEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-118
466 inst->stopTimerPending = true;-
467 QMetaObject::invokeMethod(inst, "stopTimer", Qt::QueuedConnection);-
468 }
executed 118 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
118
469 } else {
executed 118 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
118
470 inst->animationTimersToStart.removeOne(timer);-
471 }
never executed: end of block
0
472 }-
473}
executed 118 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
118
474-
475void QUnifiedTimer::pauseAnimationTimer(QAbstractAnimationTimer *timer, int duration)-
476{-
477 QUnifiedTimer *inst = QUnifiedTimer::instance();-
478 if (!timer->isRegistered)
!timer->isRegisteredDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
9-13
479 inst->startAnimationTimer(timer);
executed 9 times by 2 tests: inst->startAnimationTimer(timer);
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
9
480-
481 bool timerWasPaused = timer->isPaused;-
482 timer->isPaused = true;-
483 timer->pauseDuration = duration;-
484 if (!timerWasPaused)
!timerWasPausedDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
11
485 inst->pausedAnimationTimers << timer;
executed 11 times by 2 tests: inst->pausedAnimationTimers << timer;
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
11
486 inst->localRestart();-
487}
executed 22 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
22
488-
489void QUnifiedTimer::resumeAnimationTimer(QAbstractAnimationTimer *timer)-
490{-
491 if (!timer->isPaused)
!timer->isPausedDescription
TRUEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
11-118
492 return;
executed 118 times by 10 tests: return;
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
118
493-
494 timer->isPaused = false;-
495 QUnifiedTimer *inst = QUnifiedTimer::instance();-
496 inst->pausedAnimationTimers.removeOne(timer);-
497 inst->localRestart();-
498}
executed 11 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
11
499-
500int QUnifiedTimer::closestPausedAnimationTimerTimeToFinish()-
501{-
502 int closestTimeToFinish = INT_MAX;-
503 for (TimerListConstIt it = pausedAnimationTimers.constBegin(), cend = pausedAnimationTimers.constEnd(); it != cend; ++it) {
it != cendDescription
TRUEevaluated 31 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 31 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
31
504 const int timeToFinish = (*it)->pauseDuration;-
505 if (timeToFinish < closestTimeToFinish)
timeToFinish <...stTimeToFinishDescription
TRUEevaluated 31 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEnever evaluated
0-31
506 closestTimeToFinish = timeToFinish;
executed 31 times by 2 tests: closestTimeToFinish = timeToFinish;
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
31
507 }
executed 31 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
31
508 return closestTimeToFinish;
executed 31 times by 2 tests: return closestTimeToFinish;
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
31
509}-
510-
511void QUnifiedTimer::installAnimationDriver(QAnimationDriver *d)-
512{-
513 if (driver != &defaultDriver) {
driver != &defaultDriverDescription
TRUEnever evaluated
FALSEnever evaluated
0
514 qWarning("QUnifiedTimer: animation driver already installed...");-
515 return;
never executed: return;
0
516 }-
517-
518 bool running = driver->isRunning();-
519 if (running)
runningDescription
TRUEnever evaluated
FALSEnever evaluated
0
520 stopAnimationDriver();
never executed: stopAnimationDriver();
0
521 driver = d;-
522 if (running)
runningDescription
TRUEnever evaluated
FALSEnever evaluated
0
523 startAnimationDriver();
never executed: startAnimationDriver();
0
524}
never executed: end of block
0
525-
526void QUnifiedTimer::uninstallAnimationDriver(QAnimationDriver *d)-
527{-
528 if (driver != d) {
driver != dDescription
TRUEnever evaluated
FALSEnever evaluated
0
529 qWarning("QUnifiedTimer: trying to uninstall a driver that is not installed...");-
530 return;
never executed: return;
0
531 }-
532-
533 bool running = driver->isRunning();-
534 if (running)
runningDescription
TRUEnever evaluated
FALSEnever evaluated
0
535 stopAnimationDriver();
never executed: stopAnimationDriver();
0
536 driver = &defaultDriver;-
537 if (running)
runningDescription
TRUEnever evaluated
FALSEnever evaluated
0
538 startAnimationDriver();
never executed: startAnimationDriver();
0
539}
never executed: end of block
0
540-
541/*!-
542 Returns \c true if \a d is the currently installed animation driver-
543 and is not the default animation driver (which can never be uninstalled).-
544*/-
545bool QUnifiedTimer::canUninstallAnimationDriver(QAnimationDriver *d)-
546{-
547 return d == driver && driver != &defaultDriver;
never executed: return d == driver && driver != &defaultDriver;
d == driverDescription
TRUEnever evaluated
FALSEnever evaluated
driver != &defaultDriverDescription
TRUEnever evaluated
FALSEnever evaluated
0
548}-
549-
550#ifndef QT_NO_THREAD-
551Q_GLOBAL_STATIC(QThreadStorage<QAnimationTimer *>, animationTimer)
executed 28 times by 28 tests: end of block
Executed by:
  • tst_gestures - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qaccessibility - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qcolumnview - unknown status
  • tst_qdockwidget - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qmdisubwindow - unknown status
  • tst_qmenu - unknown status
  • tst_qparallelanimationgroup - unknown status
  • tst_qpauseanimation - unknown status
  • tst_qprinter - unknown status
  • tst_qprogressbar - unknown status
  • tst_qpropertyanimation - unknown status
  • tst_qscroller - unknown status
  • tst_qsequentialanimationgroup - unknown status
  • tst_qshortcut - unknown status
  • tst_qstatemachine - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtoolbar - unknown status
  • tst_qtreeview - unknown status
  • tst_qtreewidget - unknown status
  • ...
executed 28 times by 28 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_gestures - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qaccessibility - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qcolumnview - unknown status
  • tst_qdockwidget - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qmdisubwindow - unknown status
  • tst_qmenu - unknown status
  • tst_qparallelanimationgroup - unknown status
  • tst_qpauseanimation - unknown status
  • tst_qprinter - unknown status
  • tst_qprogressbar - unknown status
  • tst_qpropertyanimation - unknown status
  • tst_qscroller - unknown status
  • tst_qsequentialanimationgroup - unknown status
  • tst_qshortcut - unknown status
  • tst_qstatemachine - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtoolbar - unknown status
  • tst_qtreeview - unknown status
  • tst_qtreewidget - unknown status
  • ...
executed 9981 times by 28 tests: return &holder.value;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 28 times by 28 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qaccessibility - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qcolumnview - unknown status
  • tst_qdockwidget - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qmdisubwindow - unknown status
  • tst_qmenu - unknown status
  • tst_qparallelanimationgroup - unknown status
  • tst_qpauseanimation - unknown status
  • tst_qprinter - unknown status
  • tst_qprogressbar - unknown status
  • tst_qpropertyanimation - unknown status
  • tst_qscroller - unknown status
  • tst_qsequentialanimationgroup - unknown status
  • tst_qshortcut - unknown status
  • tst_qstatemachine - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtoolbar - unknown status
  • tst_qtreeview - unknown status
  • tst_qtreewidget - unknown status
  • ...
FALSEnever evaluated
0-9981
552#endif-
553-
554QAnimationTimer::QAnimationTimer() :-
555 QAbstractAnimationTimer(), lastTick(0),-
556 currentAnimationIdx(0), insideTick(false),-
557 startAnimationPending(false), stopTimerPending(false),-
558 runningLeafAnimations(0)-
559{-
560}
executed 28 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
28
561-
562QAnimationTimer *QAnimationTimer::instance(bool create)-
563{-
564 QAnimationTimer *inst;-
565#ifndef QT_NO_THREAD-
566 if (create && !animationTimer()->hasLocalData()) {
createDescription
TRUEevaluated 1537 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 2699 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
!animationTime...hasLocalData()Description
TRUEevaluated 28 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 1509 times by 27 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • ...
28-2699
567 inst = new QAnimationTimer;-
568 animationTimer()->setLocalData(inst);-
569 } else {
executed 28 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
28
570 inst = animationTimer() ? animationTimer()->localData() : 0;
animationTimer()Description
TRUEevaluated 4208 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEnever evaluated
0-4208
571 }
executed 4208 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
4208
572#else-
573 static QAnimationTimer animationTimer;-
574 inst = &animationTimer;-
575#endif-
576 return inst;
executed 4236 times by 28 tests: return inst;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
4236
577}-
578-
579QAnimationTimer *QAnimationTimer::instance()-
580{-
581 return instance(true);
never executed: return instance(true);
0
582}-
583-
584void QAnimationTimer::ensureTimerUpdate()-
585{-
586 QAnimationTimer *inst = QAnimationTimer::instance(false);-
587 QUnifiedTimer *instU = QUnifiedTimer::instance(false);-
588 if (instU && inst && inst->isPaused)
instUDescription
TRUEevaluated 759 times by 23 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWindowContainer
FALSEevaluated 393 times by 27 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QWidget
  • ...
instDescription
TRUEevaluated 759 times by 23 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWindowContainer
FALSEnever evaluated
inst->isPausedDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QPauseAnimation
FALSEevaluated 756 times by 23 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWindowContainer
0-759
589 instU->updateAnimationTimers(-1);
executed 3 times by 1 test: instU->updateAnimationTimers(-1);
Executed by:
  • tst_QPauseAnimation
3
590}
executed 1152 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1152
591-
592void QAnimationTimer::updateAnimationsTime(qint64 delta)-
593{-
594 //setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations-
595 if (insideTick)
insideTickDescription
TRUEnever evaluated
FALSEevaluated 1905 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
0-1905
596 return;
never executed: return;
0
597-
598 lastTick += delta;-
599-
600 //we make sure we only call update time if the time has actually changed-
601 //it might happen in some cases that the time doesn't change because events are delayed-
602 //when the CPU load is high-
603 if (delta) {
deltaDescription
TRUEevaluated 1905 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-1905
604 insideTick = true;-
605 for (currentAnimationIdx = 0; currentAnimationIdx < animations.count(); ++currentAnimationIdx) {
currentAnimati...ations.count()Description
TRUEevaluated 2091 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 1905 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1905-2091
606 QAbstractAnimation *animation = animations.at(currentAnimationIdx);-
607 int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime-
608 + (animation->direction() == QAbstractAnimation::Forward ? delta : -delta);
animation->dir...ation::ForwardDescription
TRUEevaluated 2036 times by 11 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 55 times by 3 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QTreeView
55-2036
609 animation->setCurrentTime(elapsed);-
610 }
executed 2091 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
2091
611 insideTick = false;-
612 currentAnimationIdx = 0;-
613 }
executed 1905 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1905
614}
executed 1905 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1905
615-
616void QAnimationTimer::updateAnimationTimer()-
617{-
618 QAnimationTimer *inst = QAnimationTimer::instance(false);-
619 if (inst)
instDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QTreeView
FALSEnever evaluated
0-10
620 inst->restartAnimationTimer();
executed 10 times by 2 tests: inst->restartAnimationTimer();
Executed by:
  • tst_QPauseAnimation
  • tst_QTreeView
10
621}
executed 10 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QTreeView
10
622-
623void QAnimationTimer::restartAnimationTimer()-
624{-
625 if (runningLeafAnimations == 0 && !runningPauseAnimations.isEmpty())
runningLeafAnimations == 0Description
TRUEevaluated 138 times by 9 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 1916 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
!runningPauseA...ions.isEmpty()Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 116 times by 9 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
22-1916
626 QUnifiedTimer::pauseAnimationTimer(this, closestPauseAnimationTimeToFinish());
executed 22 times by 2 tests: QUnifiedTimer::pauseAnimationTimer(this, closestPauseAnimationTimeToFinish());
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
22
627 else if (isPaused)
isPausedDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 2021 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
11-2021
628 QUnifiedTimer::resumeAnimationTimer(this);
executed 11 times by 2 tests: QUnifiedTimer::resumeAnimationTimer(this);
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
11
629 else if (!isRegistered)
!isRegisteredDescription
TRUEevaluated 112 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 1909 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
112-1909
630 QUnifiedTimer::startAnimationTimer(this);
executed 112 times by 12 tests: QUnifiedTimer::startAnimationTimer(this);
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
112
631}
executed 2054 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
2054
632-
633void QAnimationTimer::startAnimations()-
634{-
635 if (!startAnimationPending)
!startAnimationPendingDescription
TRUEnever evaluated
FALSEevaluated 285 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
0-285
636 return;
never executed: return;
0
637 startAnimationPending = false;-
638-
639 //force timer to update, which prevents large deltas for our newly added animations-
640 QUnifiedTimer::instance()->maybeUpdateAnimationsToCurrentTime();-
641-
642 //we transfer the waiting animations into the "really running" state-
643 animations += animationsToStart;-
644 animationsToStart.clear();-
645 if (!animations.isEmpty())
!animations.isEmpty()Description
TRUEevaluated 142 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 143 times by 18 tests
Evaluated by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
142-143
646 restartAnimationTimer();
executed 142 times by 12 tests: restartAnimationTimer();
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
142
647}
executed 285 times by 26 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
285
648-
649void QAnimationTimer::stopTimer()-
650{-
651 stopTimerPending = false;-
652 bool pendingStart = startAnimationPending && animationsToStart.size() > 0;
startAnimationPendingDescription
TRUEevaluated 31 times by 7 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 106 times by 9 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
animationsToStart.size() > 0Description
TRUEevaluated 18 times by 6 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QMainWindow
  • tst_QStateMachine
13-106
653 if (animations.isEmpty() && !pendingStart) {
animations.isEmpty()Description
TRUEevaluated 136 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
!pendingStartDescription
TRUEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 18 times by 6 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
1-136
654 QUnifiedTimer::resumeAnimationTimer(this);-
655 QUnifiedTimer::stopAnimationTimer(this);-
656 // invalidate the start reference time-
657 lastTick = 0;-
658 }
executed 118 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
118
659}
executed 137 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
137
660-
661void QAnimationTimer::registerAnimation(QAbstractAnimation *animation, bool isTopLevel)-
662{-
663 QAnimationTimer *inst = instance(true); //we create the instance if needed-
664 inst->registerRunningAnimation(animation);-
665 if (isTopLevel) {
isTopLevelDescription
TRUEevaluated 1120 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 417 times by 6 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
417-1120
666 Q_ASSERT(!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer);-
667 QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = true;-
668 inst->animationsToStart << animation;-
669 if (!inst->startAnimationPending) {
!inst->startAnimationPendingDescription
TRUEevaluated 290 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 830 times by 22 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
290-830
670 inst->startAnimationPending = true;-
671 QMetaObject::invokeMethod(inst, "startAnimations", Qt::QueuedConnection);-
672 }
executed 290 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
290
673 }
executed 1120 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1120
674}
executed 1537 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1537
675-
676void QAnimationTimer::unregisterAnimation(QAbstractAnimation *animation)-
677{-
678 QAnimationTimer *inst = QAnimationTimer::instance(false);-
679 if (inst) {
instDescription
TRUEevaluated 1537 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEnever evaluated
0-1537
680 //at this point the unified timer should have been created-
681 //but it might also have been already destroyed in case the application is shutting down-
682-
683 inst->unregisterRunningAnimation(animation);-
684-
685 if (!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer)
!QAbstractAnim...egisteredTimerDescription
TRUEevaluated 417 times by 6 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 1120 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
417-1120
686 return;
executed 417 times by 6 tests: return;
Executed by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
417
687-
688 int idx = inst->animations.indexOf(animation);-
689 if (idx != -1) {
idx != -1Description
TRUEevaluated 156 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 964 times by 23 tests
Evaluated by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
156-964
690 inst->animations.removeAt(idx);-
691 // this is needed if we unregister an animation while its running-
692 if (idx <= inst->currentAnimationIdx)
idx <= inst->c...ntAnimationIdxDescription
TRUEevaluated 149 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 7 times by 3 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QPropertyAnimation
  • tst_QStateMachine
7-149
693 --inst->currentAnimationIdx;
executed 149 times by 12 tests: --inst->currentAnimationIdx;
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
149
694-
695 if (inst->animations.isEmpty() && !inst->stopTimerPending) {
inst->animations.isEmpty()Description
TRUEevaluated 140 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 16 times by 4 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QStateMachine
!inst->stopTimerPendingDescription
TRUEevaluated 140 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-140
696 inst->stopTimerPending = true;-
697 QMetaObject::invokeMethod(inst, "stopTimer", Qt::QueuedConnection);-
698 }
executed 140 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
140
699 } else {
executed 156 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
156
700 inst->animationsToStart.removeOne(animation);-
701 }
executed 964 times by 23 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
964
702 }-
703 QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = false;-
704}
executed 1120 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1120
705-
706void QAnimationTimer::registerRunningAnimation(QAbstractAnimation *animation)-
707{-
708 if (QAbstractAnimationPrivate::get(animation)->isGroup)
QAbstractAnima...tion)->isGroupDescription
TRUEevaluated 112 times by 6 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 1425 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
112-1425
709 return;
executed 112 times by 6 tests: return;
Executed by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
112
710-
711 if (QAbstractAnimationPrivate::get(animation)->isPause) {
QAbstractAnima...tion)->isPauseDescription
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 1398 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
27-1398
712 runningPauseAnimations << animation;-
713 } else
executed 27 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
27
714 runningLeafAnimations++;
executed 1398 times by 28 tests: runningLeafAnimations++;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1398
715}-
716-
717void QAnimationTimer::unregisterRunningAnimation(QAbstractAnimation *animation)-
718{-
719 if (QAbstractAnimationPrivate::get(animation)->isGroup)
QAbstractAnima...tion)->isGroupDescription
TRUEevaluated 112 times by 6 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 1425 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
112-1425
720 return;
executed 112 times by 6 tests: return;
Executed by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
112
721-
722 if (QAbstractAnimationPrivate::get(animation)->isPause)
QAbstractAnima...tion)->isPauseDescription
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 1398 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
27-1398
723 runningPauseAnimations.removeOne(animation);
executed 27 times by 2 tests: runningPauseAnimations.removeOne(animation);
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
27
724 else-
725 runningLeafAnimations--;
executed 1398 times by 28 tests: runningLeafAnimations--;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1398
726 Q_ASSERT(runningLeafAnimations >= 0);-
727}
executed 1425 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1425
728-
729int QAnimationTimer::closestPauseAnimationTimeToFinish()-
730{-
731 int closestTimeToFinish = INT_MAX;-
732 for (AnimationListConstIt it = runningPauseAnimations.constBegin(), cend = runningPauseAnimations.constEnd(); it != cend; ++it) {
it != cendDescription
TRUEevaluated 39 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
22-39
733 const QAbstractAnimation *animation = *it;-
734 int timeToFinish;-
735-
736 if (animation->direction() == QAbstractAnimation::Forward)
animation->dir...ation::ForwardDescription
TRUEevaluated 38 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPauseAnimation
1-38
737 timeToFinish = animation->duration() - animation->currentLoopTime();
executed 38 times by 2 tests: timeToFinish = animation->duration() - animation->currentLoopTime();
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
38
738 else-
739 timeToFinish = animation->currentLoopTime();
executed 1 time by 1 test: timeToFinish = animation->currentLoopTime();
Executed by:
  • tst_QPauseAnimation
1
740-
741 if (timeToFinish < closestTimeToFinish)
timeToFinish <...stTimeToFinishDescription
TRUEevaluated 26 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QPauseAnimation
13-26
742 closestTimeToFinish = timeToFinish;
executed 26 times by 2 tests: closestTimeToFinish = timeToFinish;
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
26
743 }
executed 39 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
39
744 return closestTimeToFinish;
executed 22 times by 2 tests: return closestTimeToFinish;
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
22
745}-
746-
747/*!-
748 \class QAnimationDriver-
749 \inmodule QtCore-
750-
751 \brief The QAnimationDriver class is used to exchange the mechanism that drives animations.-
752-
753 The default animation system is driven by a timer that fires at regular intervals.-
754 In some scenarios, it is better to drive the animation based on other synchronization-
755 mechanisms, such as the vertical refresh rate of the screen.-
756-
757 \internal-
758 */-
759-
760QAnimationDriver::QAnimationDriver(QObject *parent)-
761 : QObject(*(new QAnimationDriverPrivate), parent)-
762{-
763}
executed 26 times by 26 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
26
764-
765QAnimationDriver::QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent)-
766 : QObject(dd, parent)-
767{-
768}
never executed: end of block
0
769-
770QAnimationDriver::~QAnimationDriver()-
771{-
772 QUnifiedTimer *timer = QUnifiedTimer::instance(false);-
773 if (timer && timer->canUninstallAnimationDriver(this))
timerDescription
TRUEnever evaluated
FALSEevaluated 26 times by 26 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qaccessibility - unknown status
  • tst_qcolumnview - unknown status
  • tst_qdockwidget - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qmdisubwindow - unknown status
  • tst_qmenu - unknown status
  • tst_qparallelanimationgroup - unknown status
  • tst_qpauseanimation - unknown status
  • tst_qprinter - unknown status
  • tst_qprogressbar - unknown status
  • tst_qpropertyanimation - unknown status
  • tst_qscroller - unknown status
  • tst_qsequentialanimationgroup - unknown status
  • tst_qshortcut - unknown status
  • tst_qstatemachine - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtoolbar - unknown status
  • tst_qtreeview - unknown status
  • tst_qwidget - unknown status
  • tst_qwidget_window - unknown status
  • ...
timer->canUnin...onDriver(this)Description
TRUEnever evaluated
FALSEnever evaluated
0-26
774 uninstall();
never executed: uninstall();
0
775}
executed 26 times by 26 tests: end of block
Executed by:
  • tst_gestures - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qaccessibility - unknown status
  • tst_qcolumnview - unknown status
  • tst_qdockwidget - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qmdisubwindow - unknown status
  • tst_qmenu - unknown status
  • tst_qparallelanimationgroup - unknown status
  • tst_qpauseanimation - unknown status
  • tst_qprinter - unknown status
  • tst_qprogressbar - unknown status
  • tst_qpropertyanimation - unknown status
  • tst_qscroller - unknown status
  • tst_qsequentialanimationgroup - unknown status
  • tst_qshortcut - unknown status
  • tst_qstatemachine - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtoolbar - unknown status
  • tst_qtreeview - unknown status
  • tst_qwidget - unknown status
  • tst_qwidget_window - unknown status
  • ...
26
776-
777-
778/*!-
779 Sets the time at which an animation driver should start at.-
780-
781 This is to take into account that pauses can occur in running-
782 animations which will stop the driver, but the time still-
783 increases.-
784-
785 \obsolete-
786-
787 This logic is now handled internally in the animation system.-
788 */-
789void QAnimationDriver::setStartTime(qint64)-
790{-
791}-
792-
793/*!-
794 Returns the start time of the animation.-
795-
796 \obsolete-
797-
798 This logic is now handled internally in the animation system.-
799 */-
800qint64 QAnimationDriver::startTime() const-
801{-
802 return 0;
never executed: return 0;
0
803}-
804-
805-
806/*!-
807 Advances the animation based to the specified \a timeStep. This function should-
808 be continuously called by the driver subclasses while the animation is running.-
809-
810 If \a timeStep is positive, it will be used as the current time in the-
811 calculations; otherwise, the current clock time will be used.-
812-
813 Since 5.4, the timeStep argument is ignored and elapsed() will be-
814 used instead in combination with the internal time offsets of the-
815 animation system.-
816 */-
817-
818void QAnimationDriver::advanceAnimation(qint64 timeStep)-
819{-
820 QUnifiedTimer *instance = QUnifiedTimer::instance();-
821-
822 // update current time on all top level animations-
823 instance->updateAnimationTimers(timeStep);-
824 instance->restart();-
825}
executed 1901 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1901
826-
827-
828-
829/*!-
830 Advances the animation. This function should be continously called-
831 by the driver while the animation is running.-
832 */-
833-
834void QAnimationDriver::advance()-
835{-
836 advanceAnimation(-1);-
837}
executed 1901 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1901
838-
839-
840-
841/*!-
842 Installs this animation driver. The animation driver is thread local and-
843 will only apply for the thread its installed in.-
844 */-
845-
846void QAnimationDriver::install()-
847{-
848 QUnifiedTimer *timer = QUnifiedTimer::instance(true);-
849 timer->installAnimationDriver(this);-
850}
never executed: end of block
0
851-
852-
853-
854/*!-
855 Uninstalls this animation driver.-
856 */-
857-
858void QAnimationDriver::uninstall()-
859{-
860 QUnifiedTimer *timer = QUnifiedTimer::instance(true);-
861 timer->uninstallAnimationDriver(this);-
862}
never executed: end of block
0
863-
864bool QAnimationDriver::isRunning() const-
865{-
866 return d_func()->running;
executed 4714 times by 26 tests: return d_func()->running;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
4714
867}-
868-
869-
870void QAnimationDriver::start()-
871{-
872 Q_D(QAnimationDriver);-
873 if (!d->running) {
!d->runningDescription
TRUEevaluated 123 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-123
874 d->running = true;-
875 d->timer.start();-
876 emit started();-
877 }
executed 123 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
123
878}
executed 123 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
123
879-
880-
881void QAnimationDriver::stop()-
882{-
883 Q_D(QAnimationDriver);-
884 if (d->running) {
d->runningDescription
TRUEevaluated 120 times by 10 tests
Evaluated by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 29 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
29-120
885 d->running = false;-
886 emit stopped();-
887 }
executed 120 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
120
888}
executed 149 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
149
889-
890-
891/*!-
892 \fn qint64 QAnimationDriver::elapsed() const-
893-
894 Returns the number of milliseconds since the animations was started.-
895 */-
896-
897qint64 QAnimationDriver::elapsed() const-
898{-
899 Q_D(const QAnimationDriver);-
900 return d->running ? d->timer.elapsed() : 0;
executed 2054 times by 12 tests: return d->running ? d->timer.elapsed() : 0;
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
d->runningDescription
TRUEevaluated 2054 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
0-2054
901}-
902-
903/*!-
904 \fn QAnimationDriver::started()-
905-
906 This signal is emitted by the animation framework to notify the driver-
907 that continuous animation has started.-
908-
909 \internal-
910 */-
911-
912/*!-
913 \fn QAnimationDriver::stopped()-
914-
915 This signal is emitted by the animation framework to notify the driver-
916 that continuous animation has stopped.-
917-
918 \internal-
919 */-
920-
921/*!-
922 The default animation driver just spins the timer...-
923 */-
924QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer)-
925 : QAnimationDriver(0), m_unified_timer(timer)-
926{-
927 connect(this, SIGNAL(started()), this, SLOT(startTimer()));-
928 connect(this, SIGNAL(stopped()), this, SLOT(stopTimer()));-
929}
executed 26 times by 26 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
26
930-
931void QDefaultAnimationDriver::timerEvent(QTimerEvent *e)-
932{-
933 Q_ASSERT(e->timerId() == m_timer.timerId());-
934 Q_UNUSED(e); // if the assertions are disabled-
935 advance();-
936}
executed 1901 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1901
937-
938void QDefaultAnimationDriver::startTimer()-
939{-
940 // always use a precise timer to drive animations-
941 m_timer.start(m_unified_timer->timingInterval, Qt::PreciseTimer, this);-
942}
executed 123 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
123
943-
944void QDefaultAnimationDriver::stopTimer()-
945{-
946 m_timer.stop();-
947}
executed 120 times by 10 tests: end of block
Executed by:
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
120
948-
949-
950-
951void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)-
952{-
953 Q_Q(QAbstractAnimation);-
954 if (state == newState)
state == newStateDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
FALSEevaluated 3035 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1-3035
955 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QPropertyAnimation
1
956-
957 if (loopCount == 0)
loopCount == 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
FALSEevaluated 3034 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1-3034
958 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QPropertyAnimation
1
959-
960 QAbstractAnimation::State oldState = state;-
961 int oldCurrentTime = currentTime;-
962 int oldCurrentLoop = currentLoop;-
963 QAbstractAnimation::Direction oldDirection = direction;-
964-
965 // check if we should Rewind-
966 if ((newState == QAbstractAnimation::Paused || newState == QAbstractAnimation::Running)
newState == QA...mation::PausedDescription
TRUEevaluated 58 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 2976 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
newState == QA...ation::RunningDescription
TRUEevaluated 1537 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 1439 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
58-2976
967 && oldState == QAbstractAnimation::Stopped) {
oldState == QA...ation::StoppedDescription
TRUEevaluated 1525 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 70 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
70-1525
968 //here we reset the time if needed-
969 //we don't call setCurrentTime because this might change the way the animation-
970 //behaves: changing the state or changing the current value-
971 totalCurrentTime = currentTime = (direction == QAbstractAnimation::Forward) ?
(direction == ...tion::Forward)Description
TRUEevaluated 1406 times by 27 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • ...
FALSEevaluated 119 times by 3 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QTreeWidget
119-1406
972 0 : (loopCount == -1 ? q->duration() : q->totalDuration());
loopCount == -1Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QParallelAnimationGroup
FALSEevaluated 116 times by 3 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QTreeWidget
3-116
973 }
executed 1525 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1525
974-
975 state = newState;-
976 QPointer<QAbstractAnimation> guard(q);-
977-
978 //(un)registration of the animation must always happen before calls to-
979 //virtual function (updateState) to ensure a correct state of the timer-
980 bool isTopLevel = !group || group->state() == QAbstractAnimation::Stopped;
!groupDescription
TRUEevaluated 2216 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 818 times by 6 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
group->state()...ation::StoppedDescription
TRUEevaluated 37 times by 3 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QSequentialAnimationGroup
FALSEevaluated 781 times by 6 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
37-2216
981 if (oldState == QAbstractAnimation::Running) {
oldState == QA...ation::RunningDescription
TRUEevaluated 1455 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
FALSEevaluated 1579 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1455-1579
982 if (newState == QAbstractAnimation::Paused && hasRegisteredTimer)
newState == QA...mation::PausedDescription
TRUEevaluated 58 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 1397 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
hasRegisteredTimerDescription
TRUEevaluated 29 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 29 times by 2 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QSequentialAnimationGroup
29-1397
983 QAnimationTimer::ensureTimerUpdate();
executed 29 times by 4 tests: QAnimationTimer::ensureTimerUpdate();
Executed by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
29
984 //the animation, is not running any more-
985 QAnimationTimer::unregisterAnimation(q);-
986 } else if (newState == QAbstractAnimation::Running) {
executed 1455 times by 26 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
newState == QA...ation::RunningDescription
TRUEevaluated 1537 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 42 times by 3 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
42-1537
987 QAnimationTimer::registerAnimation(q, isTopLevel);-
988 }
executed 1537 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1537
989-
990 q->updateState(newState, oldState);-
991 if (!guard || newState != state) //this is to be safe if updateState changes the state
!guardDescription
TRUEnever evaluated
FALSEevaluated 3034 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
newState != stateDescription
TRUEnever evaluated
FALSEevaluated 3034 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
0-3034
992 return;
never executed: return;
0
993-
994 // Notify state change-
995 emit q->stateChanged(newState, oldState);-
996 if (!guard || newState != state) //this is to be safe if updateState changes the state
!guardDescription
TRUEnever evaluated
FALSEevaluated 3034 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
newState != stateDescription
TRUEnever evaluated
FALSEevaluated 3034 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
0-3034
997 return;
never executed: return;
0
998-
999 switch (state) {-
1000 case QAbstractAnimation::Paused:
executed 58 times by 4 tests: case QAbstractAnimation::Paused:
Executed by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
58
1001 break;
executed 58 times by 4 tests: break;
Executed by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
58
1002 case QAbstractAnimation::Running:
executed 1537 times by 28 tests: case QAbstractAnimation::Running:
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1537
1003 {-
1004-
1005 // this ensures that the value is updated now that the animation is running-
1006 if (oldState == QAbstractAnimation::Stopped) {
oldState == QA...ation::StoppedDescription
TRUEevaluated 1525 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 12 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
12-1525
1007 if (isTopLevel) {
isTopLevelDescription
TRUEevaluated 1113 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
FALSEevaluated 412 times by 6 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
412-1113
1008 // currentTime needs to be updated if pauseTimer is active-
1009 QAnimationTimer::ensureTimerUpdate();-
1010 q->setCurrentTime(totalCurrentTime);-
1011 }
executed 1113 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1113
1012 }
executed 1525 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1525
1013 }-
1014 break;
executed 1537 times by 28 tests: break;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1537
1015 case QAbstractAnimation::Stopped:
executed 1439 times by 26 tests: case QAbstractAnimation::Stopped:
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
1439
1016 // Leave running state.-
1017 int dura = q->duration();-
1018-
1019 if (deleteWhenStopped)
deleteWhenStoppedDescription
TRUEevaluated 854 times by 17 tests
Evaluated by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QShortcut
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
FALSEevaluated 585 times by 10 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
585-854
1020 q->deleteLater();
executed 854 times by 17 tests: q->deleteLater();
Executed by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QShortcut
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
854
1021-
1022 if (dura == -1 || loopCount < 0
dura == -1Description
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QScroller
  • tst_QSequentialAnimationGroup
FALSEevaluated 1423 times by 25 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
loopCount < 0Description
TRUEevaluated 9 times by 3 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QSequentialAnimationGroup
FALSEevaluated 1414 times by 25 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
9-1423
1023 || (oldDirection == QAbstractAnimation::Forward && (oldCurrentTime * (oldCurrentLoop + 1)) == (dura * loopCount))
oldDirection =...ation::ForwardDescription
TRUEevaluated 1322 times by 24 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
FALSEevaluated 92 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QTreeView
(oldCurrentTim...a * loopCount)Description
TRUEevaluated 1222 times by 23 tests
Evaluated by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
FALSEevaluated 100 times by 7 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QLineEdit
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
92-1322
1024 || (oldDirection == QAbstractAnimation::Backward && oldCurrentTime == 0)) {
oldDirection =...tion::BackwardDescription
TRUEevaluated 92 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QTreeView
FALSEevaluated 100 times by 7 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QLineEdit
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
oldCurrentTime == 0Description
TRUEevaluated 87 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QTreeView
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
5-100
1025 emit q->finished();-
1026 }
executed 1334 times by 25 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
1334
1027 break;
executed 1439 times by 26 tests: break;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
1439
1028 }-
1029}
executed 3034 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
3034
1030-
1031/*!-
1032 Constructs the QAbstractAnimation base class, and passes \a parent to-
1033 QObject's constructor.-
1034-
1035 \sa QVariantAnimation, QAnimationGroup-
1036*/-
1037QAbstractAnimation::QAbstractAnimation(QObject *parent)-
1038 : QObject(*new QAbstractAnimationPrivate, 0)-
1039{-
1040 // Allow auto-add on reparent-
1041 setParent(parent);-
1042}
executed 27 times by 3 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QProgressBar
  • tst_QScroller
27
1043-
1044/*!-
1045 \internal-
1046*/-
1047QAbstractAnimation::QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *parent)-
1048 : QObject(dd, 0)-
1049{-
1050 // Allow auto-add on reparent-
1051 setParent(parent);-
1052}
executed 2163 times by 43 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractAnimation
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • ...
2163
1053-
1054/*!-
1055 Stops the animation if it's running, then destroys the-
1056 QAbstractAnimation. If the animation is part of a QAnimationGroup, it is-
1057 automatically removed before it's destroyed.-
1058*/-
1059QAbstractAnimation::~QAbstractAnimation()-
1060{-
1061 Q_D(QAbstractAnimation);-
1062 //we can't call stop here. Otherwise we get pure virtual calls-
1063 if (d->state != Stopped) {
d->state != StoppedDescription
TRUEevaluated 86 times by 6 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QProgressBar
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 1979 times by 44 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractAnimation
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • ...
86-1979
1064 QAbstractAnimation::State oldState = d->state;-
1065 d->state = Stopped;-
1066 emit stateChanged(oldState, d->state);-
1067 if (oldState == QAbstractAnimation::Running)
oldState == QA...ation::RunningDescription
TRUEevaluated 82 times by 6 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QProgressBar
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QSequentialAnimationGroup
4-82
1068 QAnimationTimer::unregisterAnimation(this);
executed 82 times by 6 tests: QAnimationTimer::unregisterAnimation(this);
Executed by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QProgressBar
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
  • tst_QTreeWidget
82
1069 }
executed 86 times by 6 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QProgressBar
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
  • tst_QTreeWidget
86
1070}
executed 2065 times by 45 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractAnimation
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • ...
2065
1071-
1072/*!-
1073 \property QAbstractAnimation::state-
1074 \brief state of the animation.-
1075-
1076 This property describes the current state of the animation. When the-
1077 animation state changes, QAbstractAnimation emits the stateChanged()-
1078 signal.-
1079*/-
1080QAbstractAnimation::State QAbstractAnimation::state() const-
1081{-
1082 Q_D(const QAbstractAnimation);-
1083 return d->state;
executed 3985 times by 10 tests: return d->state;
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
  • tst_QTreeWidget
3985
1084}-
1085-
1086/*!-
1087 If this animation is part of a QAnimationGroup, this function returns a-
1088 pointer to the group; otherwise, it returns 0.-
1089-
1090 \sa QAnimationGroup::addAnimation()-
1091*/-
1092QAnimationGroup *QAbstractAnimation::group() const-
1093{-
1094 Q_D(const QAbstractAnimation);-
1095 return d->group;
executed 701 times by 7 tests: return d->group;
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
701
1096}-
1097-
1098/*!-
1099 \enum QAbstractAnimation::State-
1100-
1101 This enum describes the state of the animation.-
1102-
1103 \value Stopped The animation is not running. This is the initial state-
1104 of QAbstractAnimation, and the state QAbstractAnimation reenters when finished. The current-
1105 time remain unchanged until either setCurrentTime() is-
1106 called, or the animation is started by calling start().-
1107-
1108 \value Paused The animation is paused (i.e., temporarily-
1109 suspended). Calling resume() will resume animation activity.-
1110-
1111 \value Running The animation is running. While control is in the event-
1112 loop, QAbstractAnimation will update its current time at regular intervals,-
1113 calling updateCurrentTime() when appropriate.-
1114-
1115 \sa state(), stateChanged()-
1116*/-
1117-
1118/*!-
1119 \enum QAbstractAnimation::Direction-
1120-
1121 This enum describes the direction of the animation when in \l Running state.-
1122-
1123 \value Forward The current time of the animation increases with time (i.e.,-
1124 moves from 0 and towards the end / duration).-
1125-
1126 \value Backward The current time of the animation decreases with time (i.e.,-
1127 moves from the end / duration and towards 0).-
1128-
1129 \sa direction-
1130*/-
1131-
1132/*!-
1133 \property QAbstractAnimation::direction-
1134 \brief the direction of the animation when it is in \l Running-
1135 state.-
1136-
1137 This direction indicates whether the time moves from 0 towards the-
1138 animation duration, or from the value of the duration and towards 0 after-
1139 start() has been called.-
1140-
1141 By default, this property is set to \l Forward.-
1142*/-
1143QAbstractAnimation::Direction QAbstractAnimation::direction() const-
1144{-
1145 Q_D(const QAbstractAnimation);-
1146 return d->direction;
executed 2154 times by 13 tests: return d->direction;
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
  • tst_QTreeWidget
2154
1147}-
1148void QAbstractAnimation::setDirection(Direction direction)-
1149{-
1150 Q_D(QAbstractAnimation);-
1151 if (d->direction == direction)
d->direction == directionDescription
TRUEevaluated 232 times by 7 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 100 times by 7 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
  • tst_QTreeWidget
100-232
1152 return;
executed 232 times by 7 tests: return;
Executed by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
232
1153-
1154 if (state() == Stopped) {
state() == StoppedDescription
TRUEevaluated 90 times by 5 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeWidget
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QTreeView
10-90
1155 if (direction == Backward) {
direction == BackwardDescription
TRUEevaluated 88 times by 5 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeWidget
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QPropertyAnimation
2-88
1156 d->currentTime = duration();-
1157 d->currentLoop = d->loopCount - 1;-
1158 } else {
executed 88 times by 5 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeWidget
88
1159 d->currentTime = 0;-
1160 d->currentLoop = 0;-
1161 }
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QPropertyAnimation
2
1162 }-
1163-
1164 // the commands order below is important: first we need to setCurrentTime with the old direction,-
1165 // then update the direction on this and all children and finally restart the pauseTimer if needed-
1166 if (d->hasRegisteredTimer)
d->hasRegisteredTimerDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QTreeView
FALSEevaluated 90 times by 5 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeWidget
10-90
1167 QAnimationTimer::ensureTimerUpdate();
executed 10 times by 2 tests: QAnimationTimer::ensureTimerUpdate();
Executed by:
  • tst_QPauseAnimation
  • tst_QTreeView
10
1168-
1169 d->direction = direction;-
1170 updateDirection(direction);-
1171-
1172 if (d->hasRegisteredTimer)
d->hasRegisteredTimerDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QTreeView
FALSEevaluated 90 times by 5 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeWidget
10-90
1173 // needed to update the timer interval in case of a pause animation-
1174 QAnimationTimer::updateAnimationTimer();
executed 10 times by 2 tests: QAnimationTimer::updateAnimationTimer();
Executed by:
  • tst_QPauseAnimation
  • tst_QTreeView
10
1175-
1176 emit directionChanged(direction);-
1177}
executed 100 times by 7 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
  • tst_QTreeWidget
100
1178-
1179/*!-
1180 \property QAbstractAnimation::duration-
1181 \brief the duration of the animation.-
1182-
1183 If the duration is -1, it means that the duration is undefined.-
1184 In this case, loopCount is ignored.-
1185*/-
1186-
1187/*!-
1188 \property QAbstractAnimation::loopCount-
1189 \brief the loop count of the animation-
1190-
1191 This property describes the loop count of the animation as an integer.-
1192 By default this value is 1, indicating that the animation-
1193 should run once only, and then stop. By changing it you can let the-
1194 animation loop several times. With a value of 0, the animation will not-
1195 run at all, and with a value of -1, the animation will loop forever-
1196 until stopped.-
1197 It is not supported to have loop on an animation that has an undefined-
1198 duration. It will only run once.-
1199*/-
1200int QAbstractAnimation::loopCount() const-
1201{-
1202 Q_D(const QAbstractAnimation);-
1203 return d->loopCount;
executed 8125 times by 8 tests: return d->loopCount;
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeWidget
8125
1204}-
1205void QAbstractAnimation::setLoopCount(int loopCount)-
1206{-
1207 Q_D(QAbstractAnimation);-
1208 d->loopCount = loopCount;-
1209}
executed 146 times by 6 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
146
1210-
1211/*!-
1212 \property QAbstractAnimation::currentLoop-
1213 \brief the current loop of the animation-
1214-
1215 This property describes the current loop of the animation. By default,-
1216 the animation's loop count is 1, and so the current loop will-
1217 always be 0. If the loop count is 2 and the animation runs past its-
1218 duration, it will automatically rewind and restart at current time 0, and-
1219 current loop 1, and so on.-
1220-
1221 When the current loop changes, QAbstractAnimation emits the-
1222 currentLoopChanged() signal.-
1223*/-
1224int QAbstractAnimation::currentLoop() const-
1225{-
1226 Q_D(const QAbstractAnimation);-
1227 return d->currentLoop;
executed 138 times by 7 tests: return d->currentLoop;
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
138
1228}-
1229-
1230/*!-
1231 \fn virtual int QAbstractAnimation::duration() const = 0-
1232-
1233 This pure virtual function returns the duration of the animation, and-
1234 defines for how long QAbstractAnimation should update the current-
1235 time. This duration is local, and does not include the loop count.-
1236-
1237 A return value of -1 indicates that the animation has no defined duration;-
1238 the animation should run forever until stopped. This is useful for-
1239 animations that are not time driven, or where you cannot easily predict-
1240 its duration (e.g., event driven audio playback in a game).-
1241-
1242 If the animation is a parallel QAnimationGroup, the duration will be the longest-
1243 duration of all its animations. If the animation is a sequential QAnimationGroup,-
1244 the duration will be the sum of the duration of all its animations.-
1245 \sa loopCount-
1246*/-
1247-
1248/*!-
1249 Returns the total and effective duration of the animation, including the-
1250 loop count.-
1251-
1252 \sa duration(), currentTime-
1253*/-
1254int QAbstractAnimation::totalDuration() const-
1255{-
1256 int dura = duration();-
1257 if (dura <= 0)
dura <= 0Description
TRUEevaluated 1190 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 7955 times by 8 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeWidget
1190-7955
1258 return dura;
executed 1190 times by 5 tests: return dura;
Executed by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
1190
1259 int loopcount = loopCount();-
1260 if (loopcount < 0)
loopcount < 0Description
TRUEevaluated 32 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 7923 times by 8 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeWidget
32-7923
1261 return -1;
executed 32 times by 4 tests: return -1;
Executed by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
32
1262 return dura * loopcount;
executed 7923 times by 8 tests: return dura * loopcount;
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeWidget
7923
1263}-
1264-
1265/*!-
1266 Returns the current time inside the current loop. It can go from 0 to duration().-
1267-
1268 \sa duration(), currentTime-
1269*/-
1270-
1271int QAbstractAnimation::currentLoopTime() const-
1272{-
1273 Q_D(const QAbstractAnimation);-
1274 return d->currentTime;
executed 483 times by 6 tests: return d->currentTime;
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
483
1275}-
1276-
1277/*!-
1278 \property QAbstractAnimation::currentTime-
1279 \brief the current time and progress of the animation-
1280-
1281 This property describes the animation's current time. You can change the-
1282 current time by calling setCurrentTime, or you can call start() and let-
1283 the animation run, setting the current time automatically as the animation-
1284 progresses.-
1285-
1286 The animation's current time starts at 0, and ends at totalDuration().-
1287-
1288 \sa loopCount, currentLoopTime()-
1289 */-
1290int QAbstractAnimation::currentTime() const-
1291{-
1292 Q_D(const QAbstractAnimation);-
1293 return d->totalCurrentTime;
executed 142 times by 8 tests: return d->totalCurrentTime;
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
142
1294}-
1295void QAbstractAnimation::setCurrentTime(int msecs)-
1296{-
1297 Q_D(QAbstractAnimation);-
1298 msecs = qMax(msecs, 0);-
1299-
1300 // Calculate new time and loop.-
1301 int dura = duration();-
1302 int totalDura = dura <= 0 ? dura : ((d->loopCount < 0) ? -1 : dura * d->loopCount);
dura <= 0Description
TRUEevaluated 1305 times by 22 tests
Evaluated by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
FALSEevaluated 3845 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
  • tst_QTreeWidget
(d->loopCount < 0)Description
TRUEevaluated 37 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 3808 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
  • tst_QTreeWidget
37-3845
1303 if (totalDura != -1)
totalDura != -1Description
TRUEevaluated 4809 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QWidget
  • tst_QWidget_window
  • ...
FALSEevaluated 341 times by 6 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
341-4809
1304 msecs = qMin(totalDura, msecs);
executed 4809 times by 26 tests: msecs = qMin(totalDura, msecs);
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QWidget
  • tst_QWidget_window
  • ...
4809
1305 d->totalCurrentTime = msecs;-
1306-
1307 // Update new values.-
1308 int oldLoop = d->currentLoop;-
1309 d->currentLoop = ((dura <= 0) ? 0 : (msecs / dura));
(dura <= 0)Description
TRUEevaluated 1305 times by 22 tests
Evaluated by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
FALSEevaluated 3845 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
  • tst_QTreeWidget
1305-3845
1310 if (d->currentLoop == d->loopCount) {
d->currentLoop == d->loopCountDescription
TRUEevaluated 415 times by 11 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeWidget
FALSEevaluated 4735 times by 27 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • ...
415-4735
1311 //we're at the end-
1312 d->currentTime = qMax(0, dura);-
1313 d->currentLoop = qMax(0, d->loopCount - 1);-
1314 } else {
executed 415 times by 11 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeWidget
415
1315 if (d->direction == Forward) {
d->direction == ForwardDescription
TRUEevaluated 4502 times by 27 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • ...
FALSEevaluated 233 times by 5 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
233-4502
1316 d->currentTime = (dura <= 0) ? msecs : (msecs % dura);
(dura <= 0)Description
TRUEevaluated 1275 times by 22 tests
Evaluated by:
  • tst_Gestures
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
FALSEevaluated 3227 times by 11 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
1275-3227
1317 } else {
executed 4502 times by 27 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • ...
4502
1318 d->currentTime = (dura <= 0) ? msecs : ((msecs - 1) % dura) + 1;
(dura <= 0)Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
FALSEevaluated 203 times by 5 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
30-203
1319 if (d->currentTime == dura)
d->currentTime == duraDescription
TRUEevaluated 46 times by 2 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
FALSEevaluated 187 times by 5 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
46-187
1320 --d->currentLoop;
executed 46 times by 2 tests: --d->currentLoop;
Executed by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
46
1321 }
executed 233 times by 5 tests: end of block
Executed by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
233
1322 }-
1323-
1324 updateCurrentTime(d->currentTime);-
1325 if (d->currentLoop != oldLoop)
d->currentLoop != oldLoopDescription
TRUEevaluated 237 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 4913 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
237-4913
1326 emit currentLoopChanged(d->currentLoop);
executed 237 times by 5 tests: currentLoopChanged(d->currentLoop);
Executed by:
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
237
1327-
1328 // All animations are responsible for stopping the animation when their-
1329 // own end state is reached; in this case the animation is time driven,-
1330 // and has reached the end.-
1331 if ((d->direction == Forward && d->totalCurrentTime == totalDura)
d->direction == ForwardDescription
TRUEevaluated 4840 times by 27 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • ...
FALSEevaluated 310 times by 6 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
  • tst_QTreeWidget
d->totalCurren...e == totalDuraDescription
TRUEevaluated 1307 times by 24 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
FALSEevaluated 3533 times by 13 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
310-4840
1332 || (d->direction == Backward && d->totalCurrentTime == 0)) {
d->direction == BackwardDescription
TRUEevaluated 310 times by 6 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 3533 times by 13 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
d->totalCurrentTime == 0Description
TRUEevaluated 74 times by 5 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeView
FALSEevaluated 236 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QTreeWidget
74-3533
1333 stop();-
1334 }
executed 1381 times by 25 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
1381
1335}
executed 5150 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
5150
1336-
1337/*!-
1338 Starts the animation. The \a policy argument says whether or not the-
1339 animation should be deleted when it's done. When the animation starts, the-
1340 stateChanged() signal is emitted, and state() returns Running. When control-
1341 reaches the event loop, the animation will run by itself, periodically-
1342 calling updateCurrentTime() as the animation progresses.-
1343-
1344 If the animation is currently stopped or has already reached the end,-
1345 calling start() will rewind the animation and start again from the beginning.-
1346 When the animation reaches the end, the animation will either stop, or-
1347 if the loop level is more than 1, it will rewind and continue from the beginning.-
1348-
1349 If the animation is already running, this function does nothing.-
1350-
1351 \sa stop(), state()-
1352*/-
1353void QAbstractAnimation::start(DeletionPolicy policy)-
1354{-
1355 Q_D(QAbstractAnimation);-
1356 if (d->state == Running)
d->state == RunningDescription
TRUEevaluated 476 times by 7 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEevaluated 1533 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
476-1533
1357 return;
executed 476 times by 7 tests: return;
Executed by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
476
1358 d->deleteWhenStopped = policy;-
1359 d->setState(Running);-
1360}
executed 1533 times by 28 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
1533
1361-
1362/*!-
1363 Stops the animation. When the animation is stopped, it emits the stateChanged()-
1364 signal, and state() returns Stopped. The current time is not changed.-
1365-
1366 If the animation stops by itself after reaching the end (i.e.,-
1367 currentLoopTime() == duration() and currentLoop() > loopCount() - 1), the-
1368 finished() signal is emitted.-
1369-
1370 \sa start(), state()-
1371 */-
1372void QAbstractAnimation::stop()-
1373{-
1374 Q_D(QAbstractAnimation);-
1375-
1376 if (d->state == Stopped)
d->state == StoppedDescription
TRUEevaluated 2742 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
  • ...
FALSEevaluated 1439 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
1439-2742
1377 return;
executed 2742 times by 26 tests: return;
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
  • ...
2742
1378-
1379 d->setState(Stopped);-
1380}
executed 1439 times by 26 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QColumnView
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QTreeView
  • tst_QWidget
  • tst_QWidget_window
  • ...
1439
1381-
1382/*!-
1383 Pauses the animation. When the animation is paused, state() returns Paused.-
1384 The value of currentTime will remain unchanged until resume() or start()-
1385 is called. If you want to continue from the current time, call resume().-
1386-
1387 \sa start(), state(), resume()-
1388 */-
1389void QAbstractAnimation::pause()-
1390{-
1391 Q_D(QAbstractAnimation);-
1392 if (d->state == Stopped) {
d->state == StoppedDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPropertyAnimation
FALSEevaluated 59 times by 4 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
2-59
1393 qWarning("QAbstractAnimation::pause: Cannot pause a stopped animation");-
1394 return;
executed 2 times by 2 tests: return;
Executed by:
  • tst_QAnimationGroup
  • tst_QPropertyAnimation
2
1395 }-
1396-
1397 d->setState(Paused);-
1398}
executed 59 times by 4 tests: end of block
Executed by:
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
59
1399-
1400/*!-
1401 Resumes the animation after it was paused. When the animation is resumed,-
1402 it emits the resumed() and stateChanged() signals. The currenttime is not-
1403 changed.-
1404-
1405 \sa start(), pause(), state()-
1406 */-
1407void QAbstractAnimation::resume()-
1408{-
1409 Q_D(QAbstractAnimation);-
1410 if (d->state != Paused) {
d->state != PausedDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QPropertyAnimation
FALSEevaluated 5 times by 3 tests
Evaluated by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
2-5
1411 qWarning("QAbstractAnimation::resume: "-
1412 "Cannot resume an animation that is not paused");-
1413 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_QPropertyAnimation
2
1414 }-
1415-
1416 d->setState(Running);-
1417}
executed 5 times by 3 tests: end of block
Executed by:
  • tst_QParallelAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
5
1418-
1419/*!-
1420 If \a paused is true, the animation is paused.-
1421 If \a paused is false, the animation is resumed.-
1422-
1423 \sa state(), pause(), resume()-
1424*/-
1425void QAbstractAnimation::setPaused(bool paused)-
1426{-
1427 if (paused)
pausedDescription
TRUEnever evaluated
FALSEnever evaluated
0
1428 pause();
never executed: pause();
0
1429 else-
1430 resume();
never executed: resume();
0
1431}-
1432-
1433-
1434/*!-
1435 \reimp-
1436*/-
1437bool QAbstractAnimation::event(QEvent *event)-
1438{-
1439 return QObject::event(event);
executed 1235 times by 23 tests: return QObject::event(event);
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QDockWidget
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolBar
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
1235
1440}-
1441-
1442/*!-
1443 \fn virtual void QAbstractAnimation::updateCurrentTime(int currentTime) = 0;-
1444-
1445 This pure virtual function is called every time the animation's-
1446 \a currentTime changes.-
1447-
1448 \sa updateState()-
1449*/-
1450-
1451/*!-
1452 This virtual function is called by QAbstractAnimation when the state-
1453 of the animation is changed from \a oldState to \a newState.-
1454-
1455 \sa start(), stop(), pause(), resume()-
1456*/-
1457void QAbstractAnimation::updateState(QAbstractAnimation::State newState,-
1458 QAbstractAnimation::State oldState)-
1459{-
1460 Q_UNUSED(oldState);-
1461 Q_UNUSED(newState);-
1462}
executed 304 times by 9 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QAnimationGroup
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
304
1463-
1464/*!-
1465 This virtual function is called by QAbstractAnimation when the direction-
1466 of the animation is changed. The \a direction argument is the new direction.-
1467-
1468 \sa setDirection(), direction()-
1469*/-
1470void QAbstractAnimation::updateDirection(QAbstractAnimation::Direction direction)-
1471{-
1472 Q_UNUSED(direction);-
1473}
executed 79 times by 6 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QTreeView
  • tst_QTreeWidget
79
1474-
1475-
1476QT_END_NAMESPACE-
1477-
1478#include "moc_qabstractanimation.cpp"-
1479-
1480#endif //QT_NO_ANIMATION-
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9