From 61ec1abc08e7f5bad930ec2c8ca59a190f0a6cac Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 3 Oct 2019 19:59:10 +0200 Subject: Suppress deprecation warnings on a test of a deprecated QString method QString::fromAscii() is deprecated since 5.0 but still tested. So suppress deprecations for its code. Change-Id: Ic048a843c43551021da39a16d94c3222201573dc Reviewed-by: Sona Kurazyan --- tests/auto/corelib/text/qstring/tst_qstring.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto/corelib/text/qstring') diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index cce3e601cd..c96210f53d 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -4593,6 +4593,8 @@ void tst_QString::fromLatin1() } #if QT_DEPRECATED_SINCE(5, 0) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED void tst_QString::fromAscii() { QString a; @@ -4613,6 +4615,7 @@ void tst_QString::fromAscii() a = QString::fromAscii("\0abcd", 5); QVERIFY(a.size() == 5); } +QT_WARNING_POP #endif void tst_QString::fromUcs4() -- cgit v1.2.3