summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtextcodec
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-09-29 12:08:21 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-09-29 12:28:33 (GMT)
commit02aecce59cb76ceb88f63520355381c3b5c5a513 (patch)
treeae497ef4c77d3f9ae03cee4bc7bd22bfca50f8ab /tests/auto/qtextcodec
parent33f525e636ef8fa64a15d3e66c56adaea0075bda (diff)
downloadQt-02aecce59cb76ceb88f63520355381c3b5c5a513.zip
Qt-02aecce59cb76ceb88f63520355381c3b5c5a513.tar.gz
Qt-02aecce59cb76ceb88f63520355381c3b5c5a513.tar.bz2
QTextCodec: Fix valgrind warning when using QTextCodec in destructions functions
Reviewed-by: Denis
Diffstat (limited to 'tests/auto/qtextcodec')
-rw-r--r--tests/auto/qtextcodec/tst_qtextcodec.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp
index cc41591..3d8f1a3 100644
--- a/tests/auto/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp
@@ -2236,6 +2236,15 @@ void tst_QTextCodec::moreToFromUnicode()
QCOMPARE(testData, cStr);
}
+struct DontCrashAtExit {
+ ~DontCrashAtExit() {
+ QTextCodec *c = QTextCodec::codecForName("utf8");
+ if (c)
+ c->toUnicode("azerty");
+
+ }
+} dontCrashAtExit;
+
QTEST_MAIN(tst_QTextCodec)
#include "tst_qtextcodec.moc"