Small fixes to the QList documentation
Change-Id: Ic839f7859912eb48bb192755d6f10536a0a73f8e Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>bb10
parent
792cb3989a
commit
e5fbe10647
|
|
@ -206,5 +206,5 @@ QList<double> list = QList<double>::fromStdVector(stdvector);
|
|||
QList<double> list;
|
||||
list << 1.2 << 0.5 << 3.14;
|
||||
|
||||
std::vector<double> stdlist = list.toStdVector();
|
||||
std::vector<double> stdvector = list.toStdVector();
|
||||
//! [17]
|
||||
|
|
|
|||
|
|
@ -592,9 +592,9 @@
|
|||
the list. From Qt 5.7, the capacity is preserved. To shed
|
||||
all capacity, swap with a default-constructed list:
|
||||
\code
|
||||
QList<T> v ...;
|
||||
QList<T>().swap(v);
|
||||
Q_ASSERT(v.capacity() == 0);
|
||||
QList<T> l ...;
|
||||
QList<T>().swap(l);
|
||||
Q_ASSERT(l.capacity() == 0);
|
||||
\endcode
|
||||
or call squeeze().
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue