summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlist
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@nokia.com>2011-05-16 08:48:05 (GMT)
committerLiang Qi <liang.qi@nokia.com>2011-05-16 08:48:05 (GMT)
commit8befc4982a32752e48c82cacbed045e7336a3569 (patch)
treea5fec8f49847c517ca84496ca4b98c347cc06c1a /tests/auto/qlist
parentba564e089134980200c1c71879f2474135bee5fa (diff)
downloadQt-8befc4982a32752e48c82cacbed045e7336a3569.zip
Qt-8befc4982a32752e48c82cacbed045e7336a3569.tar.gz
Qt-8befc4982a32752e48c82cacbed045e7336a3569.tar.bz2
Fix a regression in QList::mid()
It doesn't need to copy anything when pos is after size(). Task-number: QTBUG-19164 Reviewed-by: Oswald Buddenhagen
Diffstat (limited to 'tests/auto/qlist')
-rw-r--r--tests/auto/qlist/tst_qlist.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qlist/tst_qlist.cpp b/tests/auto/qlist/tst_qlist.cpp
index 20d149a..001524c 100644
--- a/tests/auto/qlist/tst_qlist.cpp
+++ b/tests/auto/qlist/tst_qlist.cpp
@@ -198,6 +198,9 @@ void tst_QList::mid() const
QCOMPARE(list.mid(3, 3),
QList<QString>() << "bak" << "buck" << "hello");
+
+ QList<int> list1;
+ QCOMPARE(list1.mid(1, 1).length(), 0);
}
void tst_QList::at() const