diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-07-16 17:01:41 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-08-07 17:43:48 +0200 |
commit | 74a35a509c77f82f9de9b4a9d365cf9640c1cbf3 (patch) | |
tree | fe86acd0100e6d070455fbc38eaa8d005dbcb309 /src | |
parent | a450f331fc656a6c27064a4540d9fa24ed64eb36 (diff) |
QQueue: clean up 5.14's deprecation
Follows up on commit 9dc1edb3146e2ffd85c357f950a83751ef265549, giving
the relevant advice on what to use instead and protecting with the
appropriate version-check deprecation macro.
Pick-to: 5.15
Change-Id: I4191493e6c43448c4390bf22be1571611b172950
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qqueue.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/tools/qqueue.h b/src/corelib/tools/qqueue.h index d5a60ada56..8dddf05352 100644 --- a/src/corelib/tools/qqueue.h +++ b/src/corelib/tools/qqueue.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -51,10 +51,10 @@ class QQueue : public QList<T> public: // compiler-generated special member functions are fine! inline void swap(QQueue<T> &other) noexcept { 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. - Q_DECL_DEPRECATED inline void swap(int i, int j) { QList<T>::swapItemsAt(i, j); } +#if QT_DEPRECATED_SINCE(5, 14) && !defined(Q_QDOC) + // NOT using QList<T>::swap; it would make swap(QList&) available. + QT_DEPRECATED_VERSION_X_5_14("Use swapItemsAt(i, j) instead") + inline void swap(int i, int j) { QList<T>::swapItemsAt(i, j); } #endif inline void enqueue(const T &t) { QList<T>::append(t); } inline T dequeue() { return QList<T>::takeFirst(); } |