From ef03396072e3959e7d03f55d91c2ffa1faa51d8d Mon Sep 17 00:00:00 2001 From: Sune Vuorela Date: Tue, 20 Dec 2011 19:46:28 +0100 Subject: QCryptographicHash: allow to hash the content of a QIODevice This adds a new function (and tests) to give the possibility of doing a QCryptographicHash of a QIODevice, like a QFile or whatever people needs. It is a quite handy overload in many cases. Change-Id: I22fd272f05571844641b3daefcc6746be4e5c7c3 Reviewed-by: Thiago Macieira --- src/corelib/tools/qcryptographichash.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/tools/qcryptographichash.h') diff --git a/src/corelib/tools/qcryptographichash.h b/src/corelib/tools/qcryptographichash.h index b40e8cc25b..15ebd22418 100644 --- a/src/corelib/tools/qcryptographichash.h +++ b/src/corelib/tools/qcryptographichash.h @@ -51,6 +51,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) class QCryptographicHashPrivate; +class QIODevice; class Q_CORE_EXPORT QCryptographicHash { @@ -68,6 +69,7 @@ public: void addData(const char *data, int length); void addData(const QByteArray &data); + bool addData(QIODevice* device); QByteArray result() const; -- cgit v1.2.3