diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-22 10:12:38 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-23 14:01:11 +0200 |
commit | 29c99bddbf48f97b054a34354f55b36a3f84a62c (patch) | |
tree | ca0116c45cc3cb04e13a953316f468012d3dc2d2 /examples/widgets/itemviews/simpletreemodel/treemodel.cpp | |
parent | d7efb2a419a88c8f512b98194c8f7bc81dbe942b (diff) |
Use QList instead of QVector in examples
Task-number: QTBUG-84469
Change-Id: Id14119168bb1bf11f99bda7ef6ee9cf51bcfab2e
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'examples/widgets/itemviews/simpletreemodel/treemodel.cpp')
-rw-r--r-- | examples/widgets/itemviews/simpletreemodel/treemodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/itemviews/simpletreemodel/treemodel.cpp b/examples/widgets/itemviews/simpletreemodel/treemodel.cpp index 28640d6433..d94fdb08cd 100644 --- a/examples/widgets/itemviews/simpletreemodel/treemodel.cpp +++ b/examples/widgets/itemviews/simpletreemodel/treemodel.cpp @@ -175,8 +175,8 @@ int TreeModel::rowCount(const QModelIndex &parent) const void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent) { - QVector<TreeItem*> parents; - QVector<int> indentations; + QList<TreeItem *> parents; + QList<int> indentations; parents << parent; indentations << 0; @@ -196,7 +196,7 @@ void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent) // Read the column data from the rest of the line. const QStringList columnStrings = lineData.split(QLatin1Char('\t'), Qt::SkipEmptyParts); - QVector<QVariant> columnData; + QList<QVariant> columnData; columnData.reserve(columnStrings.count()); for (const QString &columnString : columnStrings) columnData << columnString; |