diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2019-06-20 09:44:20 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2019-07-16 22:36:27 -0300 |
commit | d80bd2f54876c2e4c0593d3d5d4d0e01824dc301 (patch) | |
tree | 9c64a81ad443104b5943d3c2c7ac8f709bbd7a2e /tests | |
parent | a5da01c0449c4237280021a11271cd433707a523 (diff) |
QResource: deprecate isCompressed()
Current codebases assume isCompressed() implies ZlibCompression, since
there was no compressionAlgorithm() getter. In order to force codebases
to change, deprecate isCompressed() and force handling of the algorithm.
The replacement API is being introduced in 5.14, which is why the
warning is being emitted in 5.15 only.
Change-Id: Ief874765cd7b43798de3fffd15a9f5d978951ea5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp index df1dbebbf2..44c8c4b681 100644 --- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp +++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. -** Copyright (C) 2018 Intel Corporation. +** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 Intel Corporation. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -563,15 +563,15 @@ void tst_QResourceEngine::setLocale() // default constructed QResource gets the default locale QResource resource; resource.setFileName("aliasdir/aliasdir.txt"); - QVERIFY(!resource.isCompressed()); + QCOMPARE(resource.compressionAlgorithm(), QResource::NoCompression); // change the default locale and make sure it doesn't affect the resource QLocale::setDefault(QLocale("de_CH")); - QVERIFY(!resource.isCompressed()); + QCOMPARE(resource.compressionAlgorithm(), QResource::NoCompression); // then explicitly set the locale on qresource resource.setLocale(QLocale("de_CH")); - QVERIFY(resource.isCompressed()); + QVERIFY(resource.compressionAlgorithm() != QResource::NoCompression); // the reset the default locale back QLocale::setDefault(QLocale::system()); |