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 <sona.kurazyan@qt.io>
bb10
Edward Welbourne 2019-10-03 19:59:10 +02:00
parent b7a915398a
commit 61ec1abc08
1 changed files with 3 additions and 0 deletions

View File

@ -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()