From 9b3e8b32f2657948591f6bdffea9d48291b8a69b Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Thu, 27 Jun 2019 15:48:30 +0200 Subject: Remove usages of deprecated APIs of corelib - Replaced the usages of deprecated APIs of corelib by corresponding alternatives in the library code and documentation. - Modified the tests to make them build when deprecated APIs disabled: * Made the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, added tests for the replacement. Task-number: QTBUG-76491 Task-number: QTBUG-76539 Task-number: QTBUG-76541 Change-Id: I62ed4a5b530a965ec3f6502c6480808f938921aa Reviewed-by: Volker Hilsheimer --- tests/auto/corelib/tools/qline/tst_qline.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/corelib/tools/qline') diff --git a/tests/auto/corelib/tools/qline/tst_qline.cpp b/tests/auto/corelib/tools/qline/tst_qline.cpp index 915a24a1f6..0418daf640 100644 --- a/tests/auto/corelib/tools/qline/tst_qline.cpp +++ b/tests/auto/corelib/tools/qline/tst_qline.cpp @@ -53,8 +53,10 @@ private slots: void testNormalVector(); void testNormalVector_data(); +#if QT_DEPRECATED_SINCE(5, 14) void testAngle(); void testAngle_data(); +#endif void testAngle2(); void testAngle2_data(); @@ -378,6 +380,7 @@ void tst_QLine::testNormalVector() QCOMPARE(n.dy(), qreal(nvy)); } +#if QT_DEPRECATED_SINCE(5, 14) void tst_QLine::testAngle_data() { QTest::addColumn("xa1"); @@ -426,6 +429,7 @@ void tst_QLine::testAngle() double resultAngle = a.angle(b); QCOMPARE(qRound(resultAngle), qRound(angle)); } +#endif void tst_QLine::testAngle2_data() { -- cgit v1.2.3