Member initialization and default constructor for QProgressDialogPrivate
Change QProgressDialogPrivate to use default member initializers, allowing its constructor to be explicitly defaulted since it was only used for its member initializer list. Reduces #ifdefery. Change-Id: Id3885e6d520cde47de96f3b475f6a6bba1ed001f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
0efe79f80d
commit
dc19327751
@ -68,21 +68,7 @@ class QProgressDialogPrivate : public QDialogPrivate
|
|||||||
Q_DECLARE_PUBLIC(QProgressDialog)
|
Q_DECLARE_PUBLIC(QProgressDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QProgressDialogPrivate() : label(nullptr), cancel(nullptr), bar(nullptr),
|
QProgressDialogPrivate() = default;
|
||||||
#ifndef QT_NO_SHORTCUT
|
|
||||||
escapeShortcut(nullptr),
|
|
||||||
#endif
|
|
||||||
showTime(defaultShowTime),
|
|
||||||
processingEvents(false),
|
|
||||||
shownOnce(false),
|
|
||||||
autoClose(true),
|
|
||||||
autoReset(true),
|
|
||||||
forceHide(false),
|
|
||||||
cancellationFlag(false),
|
|
||||||
setValueCalled(false),
|
|
||||||
useDefaultCancelText(false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void init(const QString &labelText, const QString &cancelText, int min, int max);
|
void init(const QString &labelText, const QString &cancelText, int min, int max);
|
||||||
void layout();
|
void layout();
|
||||||
@ -92,25 +78,25 @@ public:
|
|||||||
void ensureSizeIsAtLeastSizeHint();
|
void ensureSizeIsAtLeastSizeHint();
|
||||||
void _q_disconnectOnClose();
|
void _q_disconnectOnClose();
|
||||||
|
|
||||||
QLabel *label;
|
QLabel *label = nullptr;
|
||||||
QPushButton *cancel;
|
QPushButton *cancel = nullptr;
|
||||||
QProgressBar *bar;
|
QProgressBar *bar = nullptr;
|
||||||
QTimer *forceTimer;
|
QTimer *forceTimer = nullptr;
|
||||||
#ifndef QT_NO_SHORTCUT
|
#ifndef QT_NO_SHORTCUT
|
||||||
QShortcut *escapeShortcut;
|
QShortcut *escapeShortcut = nullptr;
|
||||||
#endif
|
#endif
|
||||||
QPointer<QObject> receiverToDisconnectOnClose;
|
QPointer<QObject> receiverToDisconnectOnClose;
|
||||||
QElapsedTimer starttime;
|
QElapsedTimer starttime;
|
||||||
QByteArray memberToDisconnectOnClose;
|
QByteArray memberToDisconnectOnClose;
|
||||||
int showTime;
|
int showTime = defaultShowTime;
|
||||||
bool processingEvents;
|
bool processingEvents = false;
|
||||||
bool shownOnce;
|
bool shownOnce = false;
|
||||||
bool autoClose;
|
bool autoClose = true;
|
||||||
bool autoReset;
|
bool autoReset = true;
|
||||||
bool forceHide;
|
bool forceHide = false;
|
||||||
bool cancellationFlag;
|
bool cancellationFlag = false;
|
||||||
bool setValueCalled;
|
bool setValueCalled = false;
|
||||||
bool useDefaultCancelText;
|
bool useDefaultCancelText = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
void QProgressDialogPrivate::init(const QString &labelText, const QString &cancelText,
|
void QProgressDialogPrivate::init(const QString &labelText, const QString &cancelText,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user