diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-01-31 14:25:18 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-31 18:28:40 +0100 |
commit | b18779b61fc9ce0f9ac420d44575f4322c95993b (patch) | |
tree | 1597954c8a0543c20e1748cd51a341324bbc60d7 | |
parent | 65b26acb7c86b8d278c4edb8308b09520ae09c9f (diff) |
QWizard: Fix QWizardPrivate::QWizardPrivate()
Initialize wizStyle and other variables, silencing a purify warning
about uninitialized memory read; use std::fill to initialize the
button array.
Change-Id: I29ad90a29d406be62179fd33688f05bb5f6b7368
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 2953c9d64d..b294e98c30 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -76,6 +76,7 @@ extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp #endif #include <string.h> // for memset() +#include <algorithm> QT_BEGIN_NAMESPACE @@ -561,6 +562,7 @@ public: , canContinue(false) , canFinish(false) , disableUpdatesCount(0) + , wizStyle(QWizard::ClassicStyle) , opts(0) , buttonsHaveCustomLayout(false) , titleFmt(Qt::AutoText) @@ -570,10 +572,12 @@ public: , headerWidget(0) , watermarkLabel(0) , sideWidget(0) + , pageFrame(0) , titleLabel(0) , subTitleLabel(0) , bottomRuler(0) #if !defined(QT_NO_STYLE_WINDOWSVISTA) + , vistaHelper(0) , vistaInitPending(false) , vistaState(QVistaHelper::Dirty) , vistaStateChanged(false) @@ -584,8 +588,7 @@ public: , maximumWidth(QWIDGETSIZE_MAX) , maximumHeight(QWIDGETSIZE_MAX) { - for (int i = 0; i < QWizard::NButtons; ++i) - btns[i] = 0; + std::fill(btns, btns + QWizard::NButtons, static_cast<QAbstractButton *>(0)); #if !defined(QT_NO_STYLE_WINDOWSVISTA) if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA |