diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2023-03-02 19:05:16 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2023-03-17 00:41:32 +0100 |
| commit | 6a6e9337c763163597ab3ee2a3d25a07ea54fb60 (patch) | |
| tree | d29c1ddc8dfa63c7438b5cafdc61db87ae29a71f /src/corelib/tools/qmessageauthenticationcode.h | |
| parent | 93cb61e305f834a25ccbe0f2b64e0f8ebb72a168 (diff) | |
QMessageAuthenticationCode: port to QByteArrayView [2/3]: addData()
The class is not used frequently enough to warrant the overhead of a
Q_WEAK_ QByteArray overload to fix the SiC Type A for users that pass
objects that implicitly convert to QByteArray. QCryptographicHash also
doesn't have it.
Also mark addData() noexcept. Now that it takes a view instead of
an owning container, it only calls other noexcept functions.
Make the new overload carry actual documentation instead of just
\overload.
ChangeLog will be on patch [3/3].
Task-number: QTBUG-111676
Task-number: QTBUG-111688
Change-Id: Ie6447bf54d7d442b1a76761bc0f28f868c08ef09
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/tools/qmessageauthenticationcode.h')
| -rw-r--r-- | src/corelib/tools/qmessageauthenticationcode.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qmessageauthenticationcode.h b/src/corelib/tools/qmessageauthenticationcode.h index a753f7045fe..4fd811f74b8 100644 --- a/src/corelib/tools/qmessageauthenticationcode.h +++ b/src/corelib/tools/qmessageauthenticationcode.h @@ -39,7 +39,10 @@ public: void setKey(QByteArrayView key) noexcept; void addData(const char *data, qsizetype length); +#if QT_CORE_REMOVED_SINCE(6, 6) void addData(const QByteArray &data); +#endif + void addData(QByteArrayView data) noexcept; bool addData(QIODevice *device); QByteArrayView resultView() const noexcept; |
