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/io/qfileinfo/tst_qfileinfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp') diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index 16e81cdd77..eefe7bcecd 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -1036,7 +1036,9 @@ void tst_QFileInfo::systemFiles() QCOMPARE(fi.metadataChangeTime(), fi.lastModified()); // On Windows, they're the same QVERIFY(fi.birthTime().isValid()); QVERIFY(fi.birthTime() <= fi.lastModified()); +#if QT_DEPRECATED_SINCE(5, 10) QCOMPARE(fi.created(), fi.birthTime()); // On Windows, they're the same +#endif } void tst_QFileInfo::compare_data() @@ -2042,7 +2044,9 @@ static void stateCheck(const QFileInfo &info, const QString &dirname, const QStr QCOMPARE(info.permissions(), QFile::Permissions()); +#if QT_DEPRECATED_SINCE(5, 10) QVERIFY(!info.created().isValid()); +#endif QVERIFY(!info.birthTime().isValid()); QVERIFY(!info.metadataChangeTime().isValid()); QVERIFY(!info.lastRead().isValid()); -- cgit v1.2.3