summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/text/qfontengine_s60.cpp2
-rw-r--r--tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp12
2 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 7cae784be2..ab2506c0b3 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -74,7 +74,7 @@ QByteArray QFontEngineS60Extensions::getSfntTable(uint tag) const
Q_ASSERT(m_trueTypeExtension->HasTrueTypeTable(tag));
TInt error = KErrNone;
TInt tableByteLength = 0;
- TAny *table = m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength);
+ TAny *table = q_check_ptr(m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength));
QByteArray result(static_cast<const char*>(table), tableByteLength);
m_trueTypeExtension->ReleaseTrueTypeTable(table);
return result;
diff --git a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
index 1bd9aacfa8..e3a70e9920 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;