diff options
author | Lars Knoll <lars.knoll@qt.io> | 2019-05-06 14:00:53 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-05-07 14:15:44 +0000 |
commit | 92f984273262531f909ede17a324f546fe502b5c (patch) | |
tree | ac4d4cb8796d9838607084629cf127e1641c28c0 /tests/auto/corelib/tools/qlist | |
parent | d510e1e7f919e01a3b875ff5a575b818e5ee03e8 (diff) |
Deprecate conversion functions between QList and QSet
Users should use range constructors instead to do the conversion.
Keep conversion methods between QList and QVector as these will turn
into a no-op in Qt 6, whereas forcing people to use range constructors
would lead to deep copies of the data.
Change-Id: Id9fc9e4d007044e019826da523e8418857c91283
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/qlist')
-rw-r--r-- | tests/auto/corelib/tools/qlist/tst_qlist.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp index 7fb3e67462..5a485e88d2 100644 --- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp +++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp @@ -364,10 +364,10 @@ private slots: void takeLastOptimal() const; void takeLastMovable() const; void takeLastComplex() const; +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) void toSetOptimal() const; void toSetMovable() const; void toSetComplex() const; -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) void toStdListOptimal() const; void toStdListMovable() const; void toStdListComplex() const; @@ -428,8 +428,8 @@ private: template<typename T> void takeAt() const; template<typename T> void takeFirst() const; template<typename T> void takeLast() const; - template<typename T> void toSet() const; #if QT_VERSION < QT_VERSION_CHECK(6,0,0) + template<typename T> void toSet() const; template<typename T> void toStdList() const; #endif template<typename T> void toVector() const; @@ -1599,6 +1599,7 @@ void tst_QList::takeLastComplex() const QCOMPARE(liveCount, Complex::getLiveCount()); } +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) template<typename T> void tst_QList::toSet() const { @@ -1637,7 +1638,6 @@ void tst_QList::toSetComplex() const QCOMPARE(liveCount, Complex::getLiveCount()); } -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) template<typename T> void tst_QList::toStdList() const { |