From 49babe02f0a00fe2baff3950fbdcb725ce20d772 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 17 May 2011 13:43:30 +1000 Subject: Remove autotest code for Qt3Support library. This commit deals with the simple cases -- mostly just removing blocks of code enclosed in #ifdef QT3_SUPPORT. Later commits will deal with the trickier cases. Change-Id: I280dea25b3754be175efe62fc7e5e4e7c304e658 Task-number: QTBUG-19325 Reviewed-by: Rohan McGovern --- tests/auto/collections/tst_collections.cpp | 58 ------------------------------ 1 file changed, 58 deletions(-) (limited to 'tests/auto/collections/tst_collections.cpp') diff --git a/tests/auto/collections/tst_collections.cpp b/tests/auto/collections/tst_collections.cpp index b1ea32629b..18a32fd486 100644 --- a/tests/auto/collections/tst_collections.cpp +++ b/tests/auto/collections/tst_collections.cpp @@ -100,10 +100,6 @@ void foo() #include "qvector.h" #include "qqueue.h" -#ifdef QT3_SUPPORT -#include "q3cleanuphandler.h" -#endif - template class QList; //TESTED_FILES= @@ -133,7 +129,6 @@ private slots: void cache(); void regexp(); void pair(); - void cleanupHandler(); void sharableQList(); void sharableQLinkedList(); void sharableQVector(); @@ -2191,14 +2186,7 @@ void tst_Collections::qstring() QVERIFY(s.toLatin1() == "first"); s = "second"; QVERIFY(s.toLatin1() == "second"); -#ifdef QT3_SUPPORT - const char* cache = s.latin1(); - QVERIFY(cache == s.latin1()); -#endif s.clear(); -#ifdef QT3_SUPPORT - QVERIFY(*s.latin1() == '\0'); -#endif QVERIFY(s.isNull()); QVERIFY(s.toLatin1().size() == 0); QVERIFY(s.toLatin1().isEmpty()); @@ -2208,14 +2196,7 @@ void tst_Collections::qstring() QVERIFY(s.toUtf8() == "first-utf8"); s = "second-utf8"; QVERIFY(s.toUtf8() == "second-utf8"); -#ifdef QT3_SUPPORT - cache = s.utf8(); - QVERIFY(cache == s.utf8()); -#endif s.clear(); -#ifdef QT3_SUPPORT - QVERIFY(*s.utf8() == '\0'); -#endif QVERIFY(s.isNull()); QVERIFY(s.toUtf8().size() == 0); QVERIFY(s.toUtf8().isEmpty()); @@ -2225,14 +2206,7 @@ void tst_Collections::qstring() QVERIFY(s.toUtf8() == "first-utf8"); s = "second-utf8"; QVERIFY(s.toUtf8() == "second-utf8"); -#ifdef QT3_SUPPORT - cache = s.utf8(); - QVERIFY(cache == s.utf8()); -#endif s.clear(); -#ifdef QT3_SUPPORT - QVERIFY(*s.utf8() == '\0'); -#endif QVERIFY(s.isNull()); QVERIFY(s.toUtf8().size() == 0); QVERIFY(s.toUtf8().isEmpty()); @@ -2242,14 +2216,7 @@ void tst_Collections::qstring() QVERIFY(s.toLocal8Bit() == "first-local8Bit"); s = "second-local8Bit"; QVERIFY(s.toLocal8Bit() == "second-local8Bit"); -#ifdef QT3_SUPPORT - cache = s.local8Bit(); - QVERIFY(cache == s.local8Bit()); -#endif s.clear(); -#ifdef QT3_SUPPORT - QVERIFY(*s.local8Bit() == '\0'); -#endif QVERIFY(s.isNull()); QVERIFY(s.toLocal8Bit().size() == 0); QVERIFY(s.toLocal8Bit().isEmpty()); @@ -2258,14 +2225,7 @@ void tst_Collections::qstring() QVERIFY(s.toAscii() == "first-ascii"); s = "second-ascii"; QVERIFY(s.toAscii() == "second-ascii"); -#ifdef QT3_SUPPORT - cache = s.ascii(); - QVERIFY(cache == s.ascii()); -#endif s.clear(); -#ifdef QT3_SUPPORT - QVERIFY(*s.ascii() == '\0'); -#endif QVERIFY(s.isNull()); QVERIFY(s.toAscii().size() == 0); QVERIFY(s.toAscii().isEmpty()); @@ -2508,24 +2468,6 @@ void tst_Collections::pair() QVERIFY(!(a > a || b > b || c > c || d > d || e > e)); } -void tst_Collections::cleanupHandler() -{ -#ifdef QT3_SUPPORT - LargeStatic * f1 = 0; - LargeStatic * f2 = 0; - { - Q3CleanupHandler cleanup; - f1 = new LargeStatic; - f2 = new LargeStatic; - cleanup.add(&f1); - cleanup.add(&f2); - } - QVERIFY(f1 == 0 && f2 == 0); -#else - QSKIP("No Qt3 support", SkipAll); -#endif -} - /* These test that Java-style mutable iterators don't trash shared copy (the setSharable() mechanism). -- cgit v1.2.3