Fix QCOMPARE for QIcon in QtGui
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Tue, 26 Jun 2012 18:18:07 +0000 (19:18 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 26 Jun 2012 20:39:46 +0000 (22:39 +0200)
There's no need of QtWidgets for using QCOMPARE on two QIcons, as
QIcon lives in QtGui.

Change-Id: I40c3d4aeb15fb95876449383d9e2dd1ad39aa5f9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/testlib/qtest_gui.h

index 684b876..5415b64 100644 (file)
@@ -77,7 +77,6 @@ QT_BEGIN_NAMESPACE
 namespace QTest
 {
 
-#ifdef QT_WIDGETS_LIB
 template<>
 inline bool qCompare(QIcon const &t1, QIcon const &t2, const char *actual, const char *expected,
                     const char *file, int line)
@@ -86,7 +85,6 @@ inline bool qCompare(QIcon const &t1, QIcon const &t2, const char *actual, const
     return qCompare<void *>(*reinterpret_cast<void * const *>(&t1),
                    *reinterpret_cast<void * const *>(&t2), actual, expected, file, line);
 }
-#endif
 
 template<>
 inline bool qCompare(QImage const &t1, QImage const &t2,