aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcontainer_p_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-05-03 11:23:56 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2018-05-04 12:53:00 +0000
commitaea55d29d2555c5649c13d3bc11bde4799c6bac5 (patch)
tree52434edff3041005f98b6899566fce119855efae /src/quicktemplates2/qquickcontainer_p_p.h
parenta5d2731b1ec56580a79784759307d3b3c21ab87f (diff)
Templates: use C++11 default member initialization
The code is more readable and less error-prone (this patch caught a few uninitialized members) when the members are initialized in the same place where they are declared. In many cases, empty default destructors can be entirely removed, and we get faster implicitly declared inline default constructors defined by the compiler. Change-Id: I14c5448afc901f9b2ac5965f28c1c26c0b646c08 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickcontainer_p_p.h')
-rw-r--r--src/quicktemplates2/qquickcontainer_p_p.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/quicktemplates2/qquickcontainer_p_p.h b/src/quicktemplates2/qquickcontainer_p_p.h
index 7791b69c..4e53aa8f 100644
--- a/src/quicktemplates2/qquickcontainer_p_p.h
+++ b/src/quicktemplates2/qquickcontainer_p_p.h
@@ -60,8 +60,6 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickContainerPrivate : public QQuickCon
Q_DECLARE_PUBLIC(QQuickContainer)
public:
- QQuickContainerPrivate();
-
static QQuickContainerPrivate *get(QQuickContainer *container)
{
return container->d_func();
@@ -94,10 +92,10 @@ public:
static void contentChildren_clear(QQmlListProperty<QQuickItem> *prop);
QObjectList contentData;
- QQmlObjectModel *contentModel;
- int currentIndex;
- bool updatingCurrent;
- QQuickItemPrivate::ChangeTypes changeTypes;
+ QQmlObjectModel *contentModel = nullptr;
+ int currentIndex = -1;
+ bool updatingCurrent = false;
+ QQuickItemPrivate::ChangeTypes changeTypes = Destroyed | Parent | SiblingOrder;
};
QT_END_NAMESPACE