From b0f9c06a9b199a7474eb94a6292b5824364344b6 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 26 Jun 2020 08:21:15 +0200 Subject: Use QList instead of QVector in corelib implementation Omitting state machine and docs for now. Task-number: QTBUG-84469 Change-Id: Ibfa5e7035515773461f6cdbff35299315ef65737 Reviewed-by: Sona Kurazyan --- src/corelib/tools/qstack.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/tools/qstack.cpp') diff --git a/src/corelib/tools/qstack.cpp b/src/corelib/tools/qstack.cpp index af72313a67e..849a474d2c3 100644 --- a/src/corelib/tools/qstack.cpp +++ b/src/corelib/tools/qstack.cpp @@ -61,10 +61,10 @@ The example will output 3, 2, 1 in that order. - QStack inherits from QVector. All of QVector's functionality also + QStack inherits from QList. All of QList's functionality also applies to QStack. For example, you can use isEmpty() to test whether the stack is empty, and you can traverse a QStack using - QVector's iterator classes (for example, QVectorIterator). But in + QList's iterator classes (for example, QListIterator). But in addition, QStack provides three convenience functions that make it easy to implement LIFO semantics: push(), pop(), and top(). @@ -73,7 +73,7 @@ won't let you, for example, store a QWidget as a value; instead, store a QWidget *. - \sa QVector, QQueue + \sa QList, QQueue */ /*! @@ -89,7 +89,7 @@ Adds element \a t to the top of the stack. - This is the same as QVector::append(). + This is the same as QList::append(). \sa pop(), top() */ @@ -100,7 +100,7 @@ Returns a reference to the stack's top item. This function assumes that the stack isn't empty. - This is the same as QVector::last(). + This is the same as QList::last(). \sa pop(), push(), isEmpty() */ -- cgit v1.2.3