QMovie: initialize the private members while declaring them
Change-Id: Ie9c1484c8ad3483da3d559e1703770cdf22cec5e 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
f0ab1c02d7
commit
67ced4da5a
@ -247,20 +247,20 @@ public:
|
|||||||
void _q_loadNextFrame();
|
void _q_loadNextFrame();
|
||||||
void _q_loadNextFrame(bool starting);
|
void _q_loadNextFrame(bool starting);
|
||||||
|
|
||||||
QImageReader *reader;
|
QImageReader *reader = nullptr;
|
||||||
int speed;
|
int speed = 100;
|
||||||
QMovie::MovieState movieState;
|
QMovie::MovieState movieState = QMovie::NotRunning;
|
||||||
QRect frameRect;
|
QRect frameRect;
|
||||||
QPixmap currentPixmap;
|
QPixmap currentPixmap;
|
||||||
int currentFrameNumber;
|
int currentFrameNumber = -1;
|
||||||
int nextFrameNumber;
|
int nextFrameNumber = 0;
|
||||||
int greatestFrameNumber;
|
int greatestFrameNumber = -1;
|
||||||
int nextDelay;
|
int nextDelay = 0;
|
||||||
int playCounter;
|
int playCounter = -1;
|
||||||
qint64 initialDevicePos;
|
qint64 initialDevicePos = 0;
|
||||||
QMovie::CacheMode cacheMode;
|
QMovie::CacheMode cacheMode = QMovie::CacheNone;
|
||||||
bool haveReadAll;
|
bool haveReadAll = false;
|
||||||
bool isFirstIteration;
|
bool isFirstIteration = true;
|
||||||
QMap<int, QFrameInfo> frameMap;
|
QMap<int, QFrameInfo> frameMap;
|
||||||
QString absoluteFilePath;
|
QString absoluteFilePath;
|
||||||
|
|
||||||
@ -270,10 +270,6 @@ public:
|
|||||||
/*! \internal
|
/*! \internal
|
||||||
*/
|
*/
|
||||||
QMoviePrivate::QMoviePrivate(QMovie *qq)
|
QMoviePrivate::QMoviePrivate(QMovie *qq)
|
||||||
: reader(nullptr), speed(100), movieState(QMovie::NotRunning),
|
|
||||||
currentFrameNumber(-1), nextFrameNumber(0), greatestFrameNumber(-1),
|
|
||||||
nextDelay(0), playCounter(-1),
|
|
||||||
cacheMode(QMovie::CacheNone), haveReadAll(false), isFirstIteration(true)
|
|
||||||
{
|
{
|
||||||
q_ptr = qq;
|
q_ptr = qq;
|
||||||
nextImageTimer.setSingleShot(true);
|
nextImageTimer.setSingleShot(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user