From 0f48d1a52327695d7c9d3d9753fedc366e2fd878 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 25 Jan 2012 13:58:17 +0100 Subject: Remove QIconEngineV2 and fold it into QIconEngine Change-Id: Ife590b7639f4aadcfbd4d77ca170285b623c14ae Reviewed-by: Jonas Gastal Reviewed-by: Gunnar Sletta --- tests/auto/gui/image/qicon/tst_qicon.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'tests') diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp index c391ced38d..7d455f1010 100644 --- a/tests/auto/gui/image/qicon/tst_qicon.cpp +++ b/tests/auto/gui/image/qicon/tst_qicon.cpp @@ -74,7 +74,6 @@ private slots: void task184901_badCache(); void task223279_inconsistentAddFile(); - void task239461_custom_iconengine_crash(); private: bool haveImageFormat(QByteArray const&); @@ -722,32 +721,5 @@ void tst_QIcon::task223279_inconsistentAddFile() } -// During detach, v2 engines are cloned, while v1 engines are only -// passed on, so v1 engines need to be referenced counted. This test -// verifies that the engine is destroyed once and only once. - -class IconEngine : public QIconEngine -{ -public: - ~IconEngine() { destructorCalled++; } - virtual void paint(QPainter *, const QRect &, QIcon::Mode, QIcon::State) { } - static int destructorCalled; -}; -int IconEngine::destructorCalled = 0; - -void tst_QIcon::task239461_custom_iconengine_crash() -{ - QIconEngine *engine = new IconEngine(); - { - QIcon icon(engine); - QIcon icon2 = icon; - - QPixmap pixmap(32, 32); - icon.addPixmap(pixmap); - } - QCOMPARE(IconEngine::destructorCalled, 1); -} - - QTEST_MAIN(tst_QIcon) #include "tst_qicon.moc" -- cgit v1.2.3