diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-11 18:21:31 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-08-13 14:15:37 +0000 |
commit | c39d2ab482c1f11e30d7a80f92d65c4982a12703 (patch) | |
tree | 8511576df0832705b3692e9b6e5daab9cb9c5e16 /src/corelib/tools | |
parent | a7f2c32657b791b5ac470ca9ff5358e15b6817da (diff) |
QCollatorPrivate: initialize in declarations rather than constructor
Change-Id: If5f240418e6a538ef44af973929b5c84e63b70d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qcollator_p.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/corelib/tools/qcollator_p.h b/src/corelib/tools/qcollator_p.h index c03a3431db..71095f845d 100644 --- a/src/corelib/tools/qcollator_p.h +++ b/src/corelib/tools/qcollator_p.h @@ -88,7 +88,7 @@ typedef int CollatorType; class QCollatorPrivate { public: - QAtomicInt ref; + QAtomicInt ref = 1; QLocale locale; #if defined(Q_OS_WIN) && !QT_CONFIG(icu) #ifdef USE_COMPARESTRINGEX @@ -97,12 +97,12 @@ public: LCID localeID; #endif #endif - Qt::CaseSensitivity caseSensitivity; - bool numericMode; - bool ignorePunctuation; - bool dirty; + Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive; + bool numericMode = false; + bool ignorePunctuation = false; + bool dirty = true; - CollatorType collator; + CollatorType collator = 0; void clear() { cleanup(); @@ -113,12 +113,6 @@ public: void cleanup(); QCollatorPrivate() - : ref(1), - caseSensitivity(Qt::CaseSensitive), - numericMode(false), - ignorePunctuation(false), - dirty(true), - collator(0) { cleanup(); } ~QCollatorPrivate() { cleanup(); } |