diff options
author | mread <qt-info@nokia.com> | 2009-09-09 08:51:42 (GMT) |
---|---|---|
committer | mread <qt-info@nokia.com> | 2009-09-09 10:25:04 (GMT) |
commit | 930a04cd66e40addd42e3ade195400c959fd3292 (patch) | |
tree | 28e9995c0dffa54a1f153f09718220aba279f03a /tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp | |
parent | 94bdab6ac2b47f4e4301dff83f43e1b68d587a61 (diff) | |
download | Qt-930a04cd66e40addd42e3ade195400c959fd3292.zip Qt-930a04cd66e40addd42e3ade195400c959fd3292.tar.gz Qt-930a04cd66e40addd42e3ade195400c959fd3292.tar.bz2 |
Getting text widget OOM tests working in Symbian
There is one actual bug fix, checking for null pointer return.
The exception safety test code now initialises the fonts system.
The S60 fonts system does not survive OOM testing
without this.
Otherwise some duplicate tests are removed and code tidied up.
Reviewed-by: Liang Qi
Reviewed-by: Harald Fernengel
Reviewed-by: Alessandro Portale
Diffstat (limited to 'tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp')
-rw-r--r-- | tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp index 1bd9aac..e3a70e9 100644 --- a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp +++ b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp @@ -347,6 +347,13 @@ template <> struct WidgetCreator<QDesktopWidget> : public AbstractTester }; void tst_ExceptionSafetyObjects::widgets_data() { +#ifdef Q_OS_SYMBIAN + // Initialise the S60 rasteriser, which crashes if started while out of memory + QImage image(20, 20, QImage::Format_RGB32); + QPainter p(&image); + p.drawText(0, 15, "foo"); +#endif + QTest::addColumn<AbstractTester *>("widgetCreator"); #undef NEWROW @@ -392,9 +399,6 @@ void tst_ExceptionSafetyObjects::widgets_data() NEWROW(QToolBox); NEWROW(QToolButton); NEWROW(QStatusBar); - NEWROW(QSplitter); - NEWROW(QTextEdit); - NEWROW(QTextBrowser); NEWROW(QToolBar); NEWROW(QMenuBar); NEWROW(QMainWindow); @@ -502,7 +506,7 @@ struct IntegerMoveable int IntegerMoveable::instanceCount = 0; Q_DECLARE_TYPEINFO(IntegerMoveable, Q_MOVABLE_TYPE); -template <typename T, template<typename> class Container > +template <typename T, template<typename> class Container> void containerInsertTest(QObject*) { Container<T> container; |