From d80bd2f54876c2e4c0593d3d5d4d0e01824dc301 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 20 Jun 2019 09:44:20 -0700 Subject: 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 --- src/corelib/io/qresource.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/corelib/io/qresource.h') diff --git a/src/corelib/io/qresource.h b/src/corelib/io/qresource.h index 5e798de436..5ee8d5d266 100644 --- a/src/corelib/io/qresource.h +++ b/src/corelib/io/qresource.h @@ -72,7 +72,6 @@ public: bool isValid() const; - bool isCompressed() const; Compression compressionAlgorithm() const; qint64 size() const; const uchar *data() const; @@ -84,6 +83,10 @@ public: QT_DEPRECATED_X("Use QDir::searchPaths() instead") static QStringList searchPaths(); #endif +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_VERSION_X_5_15("Use QResource::compressionAlgorithm() instead") + bool isCompressed() const; +#endif static bool registerResource(const QString &rccFilename, const QString &resourceRoot=QString()); static bool unregisterResource(const QString &rccFilename, const QString &resourceRoot=QString()); -- cgit v1.2.3