QAbstractAnimation: initialize the private members while declaring them
Change-Id: I5de0510d06b7d8e10c3cb0d4f23fb7991b8d6c51 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
2c5a35f6ed
commit
726330c9c0
@ -911,7 +911,7 @@ void QDefaultAnimationDriver::stopTimer()
|
||||
m_timer.stop();
|
||||
}
|
||||
|
||||
|
||||
QAbstractAnimationPrivate::~QAbstractAnimationPrivate() { }
|
||||
|
||||
void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
|
||||
{
|
||||
|
@ -67,43 +67,28 @@ class QAbstractAnimation;
|
||||
class QAbstractAnimationPrivate : public QObjectPrivate
|
||||
{
|
||||
public:
|
||||
QAbstractAnimationPrivate()
|
||||
: state(QAbstractAnimation::Stopped),
|
||||
direction(QAbstractAnimation::Forward),
|
||||
totalCurrentTime(0),
|
||||
currentTime(0),
|
||||
loopCount(1),
|
||||
currentLoop(0),
|
||||
deleteWhenStopped(false),
|
||||
hasRegisteredTimer(false),
|
||||
isPause(false),
|
||||
isGroup(false),
|
||||
group(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~QAbstractAnimationPrivate() {}
|
||||
virtual ~QAbstractAnimationPrivate();
|
||||
|
||||
static QAbstractAnimationPrivate *get(QAbstractAnimation *q)
|
||||
{
|
||||
return q->d_func();
|
||||
}
|
||||
|
||||
QAbstractAnimation::State state;
|
||||
QAbstractAnimation::Direction direction;
|
||||
QAbstractAnimation::State state = QAbstractAnimation::Stopped;
|
||||
QAbstractAnimation::Direction direction = QAbstractAnimation::Forward;
|
||||
void setState(QAbstractAnimation::State state);
|
||||
|
||||
int totalCurrentTime;
|
||||
int currentTime;
|
||||
int loopCount;
|
||||
int currentLoop;
|
||||
int totalCurrentTime = 0;
|
||||
int currentTime = 0;
|
||||
int loopCount = 1;
|
||||
int currentLoop = 0;
|
||||
|
||||
bool deleteWhenStopped;
|
||||
bool hasRegisteredTimer;
|
||||
bool isPause;
|
||||
bool isGroup;
|
||||
bool deleteWhenStopped = false;
|
||||
bool hasRegisteredTimer = false;
|
||||
bool isPause = false;
|
||||
bool isGroup = false;
|
||||
|
||||
QAnimationGroup *group;
|
||||
QAnimationGroup *group = nullptr;
|
||||
|
||||
private:
|
||||
Q_DECLARE_PUBLIC(QAbstractAnimation)
|
||||
|
Loading…
x
Reference in New Issue
Block a user