QCollatorPrivate: initialize in declarations rather than constructor

Change-Id: If5f240418e6a538ef44af973929b5c84e63b70d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Edward Welbourne 2018-07-11 18:21:31 +02:00
parent a7f2c32657
commit c39d2ab482

View File

@ -88,7 +88,7 @@ typedef int CollatorType;
class QCollatorPrivate class QCollatorPrivate
{ {
public: public:
QAtomicInt ref; QAtomicInt ref = 1;
QLocale locale; QLocale locale;
#if defined(Q_OS_WIN) && !QT_CONFIG(icu) #if defined(Q_OS_WIN) && !QT_CONFIG(icu)
#ifdef USE_COMPARESTRINGEX #ifdef USE_COMPARESTRINGEX
@ -97,12 +97,12 @@ public:
LCID localeID; LCID localeID;
#endif #endif
#endif #endif
Qt::CaseSensitivity caseSensitivity; Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive;
bool numericMode; bool numericMode = false;
bool ignorePunctuation; bool ignorePunctuation = false;
bool dirty; bool dirty = true;
CollatorType collator; CollatorType collator = 0;
void clear() { void clear() {
cleanup(); cleanup();
@ -113,12 +113,6 @@ public:
void cleanup(); void cleanup();
QCollatorPrivate() QCollatorPrivate()
: ref(1),
caseSensitivity(Qt::CaseSensitive),
numericMode(false),
ignorePunctuation(false),
dirty(true),
collator(0)
{ cleanup(); } { cleanup(); }
~QCollatorPrivate() { cleanup(); } ~QCollatorPrivate() { cleanup(); }