QQueue: unhide QList::swap(int, int)

Task-number: QTBUG-34197
Change-Id: I0b405ab0fabff8852b2705d651848fbff74fc4c2
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Marc Mutz 2015-04-05 19:49:05 +02:00
parent 32849f4997
commit 51028d1472

View File

@ -46,6 +46,11 @@ public:
inline QQueue() {}
inline ~QQueue() {}
inline void swap(QQueue<T> &other) { QList<T>::swap(other); } // prevent QList<->QQueue swaps
#ifndef Q_QDOC
// bring in QList::swap(int, int). We cannot say using QList<T>::swap,
// because we don't want to make swap(QList&) available.
inline void swap(int i, int j) { QList<T>::swap(i, j); }
#endif
inline void enqueue(const T &t) { QList<T>::append(t); }
inline T dequeue() { return QList<T>::takeFirst(); }
inline T &head() { return QList<T>::first(); }