From 29c99bddbf48f97b054a34354f55b36a3f84a62c Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 22 Jun 2020 10:12:38 +0200 Subject: Use QList instead of QVector in examples Task-number: QTBUG-84469 Change-Id: Id14119168bb1bf11f99bda7ef6ee9cf51bcfab2e Reviewed-by: Sona Kurazyan --- examples/widgets/doc/src/addressbook.qdoc | 6 +++--- examples/widgets/doc/src/calendar.qdoc | 2 +- examples/widgets/doc/src/icons.qdoc | 2 +- examples/widgets/doc/src/syntaxhighlighter.qdoc | 4 ++-- examples/widgets/doc/src/tooltips.qdoc | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/widgets/doc/src') diff --git a/examples/widgets/doc/src/addressbook.qdoc b/examples/widgets/doc/src/addressbook.qdoc index ed2b8e90e6..22769cb270 100644 --- a/examples/widgets/doc/src/addressbook.qdoc +++ b/examples/widgets/doc/src/addressbook.qdoc @@ -90,8 +90,8 @@ \snippet itemviews/addressbook/tablemodel.h 0 Two constructors are used, a default constructor which uses - \c TableModel's own \c {QVector} and one that takes - \c {QVector} as an argument, for convenience. + \c TableModel's own \c {QList} and one that takes + \c {QList} as an argument, for convenience. \section1 TableModel Class Implementation @@ -161,7 +161,7 @@ them here so that we can reuse the model in other programs. The last function in \c {TableModel}, \c getContacts() returns the - QVector object that holds all the contacts in the address + QList object that holds all the contacts in the address book. We use this function later to obtain the list of contacts to check for existing entries, write the contacts to a file and read them back. Further explanation is given with \c AddressWidget. diff --git a/examples/widgets/doc/src/calendar.qdoc b/examples/widgets/doc/src/calendar.qdoc index 431815d0c1..4a6a482ff2 100644 --- a/examples/widgets/doc/src/calendar.qdoc +++ b/examples/widgets/doc/src/calendar.qdoc @@ -128,7 +128,7 @@ Each cell in the table will be padded and spaced to make the text easier to read. - We want the columns to have equal widths, so we provide a vector containing + We want the columns to have equal widths, so we provide a list containing percentage widths for each of them and set the constraints in the QTextTableFormat: diff --git a/examples/widgets/doc/src/icons.qdoc b/examples/widgets/doc/src/icons.qdoc index 24be09a7a9..16cb0656db 100644 --- a/examples/widgets/doc/src/icons.qdoc +++ b/examples/widgets/doc/src/icons.qdoc @@ -260,7 +260,7 @@ QIcon::Active, QIcon::Disabled, QIcon::Selected and the rows in the order QIcon::Off, QIcon::On, which does not match the enumeration. The above code provides arrays allowing to map from enumeration value to row/column - (by using QVector::indexOf()) and back by using the array index and lists + (by using QList::indexOf()) and back by using the array index and lists of the matching strings. Qt's containers can be easily populated by using C++ 11 initializer lists. diff --git a/examples/widgets/doc/src/syntaxhighlighter.qdoc b/examples/widgets/doc/src/syntaxhighlighter.qdoc index 618b387ed5..30dc685843 100644 --- a/examples/widgets/doc/src/syntaxhighlighter.qdoc +++ b/examples/widgets/doc/src/syntaxhighlighter.qdoc @@ -66,7 +66,7 @@ We have chosen to store our highlighting rules using a private struct: A rule consists of a QRegularExpression pattern and a QTextCharFormat instance. The various rules are then stored using a - QVector. + QList. The QTextCharFormat class provides formatting information for characters in a QTextDocument specifying the visual properties of @@ -137,7 +137,7 @@ blocks that have changed. First we apply the syntax highlighting rules that we stored in the - \c highlightingRules vector. For each rule (i.e. for each + \c highlightingRules list. For each rule (i.e. for each HighlightingRule object) we search for the pattern in the given text block using the QString::indexOf() function. When the first occurrence of the pattern is found, we use the diff --git a/examples/widgets/doc/src/tooltips.qdoc b/examples/widgets/doc/src/tooltips.qdoc index 35e3b1e29f..a278215503 100644 --- a/examples/widgets/doc/src/tooltips.qdoc +++ b/examples/widgets/doc/src/tooltips.qdoc @@ -95,7 +95,7 @@ \snippet widgets/tooltips/sortingbox.h 2 - We keep all the shape items in a QVector, and we keep three + We keep all the shape items in a QList, and we keep three QPainterPath objects holding the shapes of a circle, a square and a triangle. We also need to have a pointer to an item when it is moving, and we need to know its previous position. -- cgit v1.2.3