From 1c63909ad8caee11ba0ec4af998d981bd50d3ee1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 7 Feb 2013 13:56:57 -0800 Subject: Make sure all containers compile in strict-iterator mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unit-test this by making the QList, QVector, QHash and QMap unit tests be duplicated under strict-iterator mode. There's no test for QLinkedList. The tst_Collections test does not compile under strict-iterator mode. It generated over 15000 errors when I tried. The strict iterators required a small change: the difference_type typedef needs to match the operators that get distances (operator-(iterator)) and move the iterator around (+, -, +=, -=, etc.). Task-number: QTBUG-29608 Change-Id: I834873934c51d0f139a994cd395818da4ec997e2 Reviewed-by: Jędrzej Nowacki Reviewed-by: Jason McDonald --- .../auto/corelib/tools/qhash_strictiterators/qhash_strictiterators.pro | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/auto/corelib/tools/qhash_strictiterators/qhash_strictiterators.pro (limited to 'tests/auto/corelib/tools/qhash_strictiterators') diff --git a/tests/auto/corelib/tools/qhash_strictiterators/qhash_strictiterators.pro b/tests/auto/corelib/tools/qhash_strictiterators/qhash_strictiterators.pro new file mode 100644 index 0000000000..715e9bf0c9 --- /dev/null +++ b/tests/auto/corelib/tools/qhash_strictiterators/qhash_strictiterators.pro @@ -0,0 +1,3 @@ +include(../qhash/qhash.pro) +TARGET = tst_qhash_strictiterators +DEFINES += QT_STRICT_ITERATORS tst_QHash=tst_QHash_StrictIterators -- cgit v1.2.3