summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-06 13:13:05 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-07-07 11:48:45 +0200
commit77bb50de8f3f7defe1329e6c4a6e066d510afc55 (patch)
tree758b5aab51211aaba887e3ffe9bb4d46f9e740cf /src/widgets
parent989fca660c3556fa957ed9a3f7cd3b948a4166a2 (diff)
Use QList instead of QVector in qtbase
Fixes all other QVector occurrences Task-number: QTBUG-84469 Change-Id: I5f9311298d341a9a3061a6a640539583d1618939 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/doc/snippets/code/doc_src_layout.cpp10
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/layout.qdoc2
-rw-r--r--src/widgets/util/qcolormap.qdoc10
3 files changed, 11 insertions, 11 deletions
diff --git a/src/widgets/doc/snippets/code/doc_src_layout.cpp b/src/widgets/doc/snippets/code/doc_src_layout.cpp
index 7bbd781bb2..3cf5ffbef4 100644
--- a/src/widgets/doc/snippets/code/doc_src_layout.cpp
+++ b/src/widgets/doc/snippets/code/doc_src_layout.cpp
@@ -53,7 +53,7 @@
#define CARD_H
#include <QtWidgets>
-#include <QVector>
+#include <QList>
class CardLayout : public QLayout
{
@@ -73,7 +73,7 @@ public:
void setGeometry(const QRect &rect) override;
private:
- QVector<QLayoutItem*> m_items;
+ QList<QLayoutItem *> m_items;
};
#endif
//! [0]
@@ -86,7 +86,7 @@ private:
//! [2]
int CardLayout::count() const
{
- // QVector::size() returns the number of QLayoutItems in m_items
+ // QList::size() returns the number of QLayoutItems in m_items
return m_items.size();
}
//! [2]
@@ -94,14 +94,14 @@ int CardLayout::count() const
//! [3]
QLayoutItem *CardLayout::itemAt(int idx) const
{
- // QVector::value() performs index checking, and returns nullptr if we are
+ // QList::value() performs index checking, and returns nullptr if we are
// outside the valid range
return m_items.value(idx);
}
QLayoutItem *CardLayout::takeAt(int idx)
{
- // QVector::take does not do index checking
+ // QList::take does not do index checking
return idx >= 0 && idx < m_items.size() ? m_items.takeAt(idx) : 0;
}
//! [3]
diff --git a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
index 24f8cd836f..c72c3e8c68 100644
--- a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
@@ -299,7 +299,7 @@
\list
\li A data structure to store the items handled by the layout. Each
item is a \l{QLayoutItem}{QLayoutItem}. We will use a
- QVector in this example.
+ QList in this example.
\li \l{QLayout::}{addItem()}, how to add items to the layout.
\li \l{QLayout::}{setGeometry()}, how to perform the layout.
\li \l{QLayout::}{sizeHint()}, the preferred size of the layout.
diff --git a/src/widgets/util/qcolormap.qdoc b/src/widgets/util/qcolormap.qdoc
index 2e1c7c504b..d262fcc9cb 100644
--- a/src/widgets/util/qcolormap.qdoc
+++ b/src/widgets/util/qcolormap.qdoc
@@ -42,11 +42,11 @@
\value Direct Pixel values are derived directly from the RGB
values, also known as "True Color."
- \value Indexed Pixel values represent indexes into a vector of
+ \value Indexed Pixel values represent indexes into a list of
available colors, i.e. QColormap uses the index of the color that
most closely matches an RGB value.
- \value Gray Similar to \c Indexed, pixel values represent a vector
+ \value Gray Similar to \c Indexed, pixel values represent a list
of available gray tones. QColormap uses the index of the gray
tone that most closely matches the computed gray tone of an RGB
value.
@@ -113,11 +113,11 @@
*/
/*!
- \fn const QVector<QColor> QColormap::colormap() const
+ \fn const QList<QColor> QColormap::colormap() const
- Returns a vector of colors which represents the devices colormap
+ Returns a list of colors which represents the devices colormap
for \c Indexed and \c Gray modes. This function returns an empty
- vector for \c Direct mode.
+ list for \c Direct mode.
\sa size()
*/