OpenCoverage

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

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