diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-08-17 13:40:07 +0200 |
---|---|---|
committer | Chris Adams <chris.adams@qinetic.com.au> | 2020-11-02 13:17:22 +1000 |
commit | d282398570e9ca8f3bdae2c7a6b61ac2bd951539 (patch) | |
tree | 123f38946830f8b5608193995525aedab681eb25 | |
parent | cfdeb1637b96dcfb729c00a10430b03c293abc77 (diff) |
Use non-static data member initialization for default constructor
The flags parameters were exercising the deprecated construction from
int; simply leaving them defualt-constructed does what that intends.
Two other member initializations could be set with NSDMI, so do that.
Change-Id: I60a825999e82af712cda9e45f63c783aaef8df2f
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Christopher Adams <chris.adams@jolla.com>
-rw-r--r-- | src/contacts/filters/qcontactdetailrangefilter_p.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/contacts/filters/qcontactdetailrangefilter_p.h b/src/contacts/filters/qcontactdetailrangefilter_p.h index aa0e10102..c652bbc85 100644 --- a/src/contacts/filters/qcontactdetailrangefilter_p.h +++ b/src/contacts/filters/qcontactdetailrangefilter_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtContacts module of the Qt Toolkit. @@ -59,14 +59,7 @@ QT_BEGIN_NAMESPACE_CONTACTS class QContactDetailRangeFilterPrivate : public QContactFilterPrivate { public: - QContactDetailRangeFilterPrivate() - : QContactFilterPrivate(), - m_typeId(QContactDetail::TypeUndefined), - m_fieldId(-1), - m_flags(0), - m_rangeflags(0) - { - } + QContactDetailRangeFilterPrivate() = default; QContactDetailRangeFilterPrivate(const QContactDetailRangeFilterPrivate& other) : QContactFilterPrivate(other), @@ -138,8 +131,8 @@ public: Q_IMPLEMENT_CONTACTFILTER_VIRTUALCTORS(QContactDetailRangeFilter, QContactFilter::ContactDetailRangeFilter) - QContactDetail::DetailType m_typeId; - int m_fieldId; + QContactDetail::DetailType m_typeId = QContactDetail::TypeUndefined; + int m_fieldId = -1; QVariant m_minValue; QVariant m_maxValue; QContactFilter::MatchFlags m_flags; |