diff --git a/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp b/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp index 85138a6402..c49cd538d2 100644 --- a/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp +++ b/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp @@ -147,8 +147,7 @@ void tst_QMessageAuthenticationCode::result() QFETCH(QByteArray, message); QFETCH(QByteArray, code); - QMessageAuthenticationCode mac(algo); - mac.setKey(key); + QMessageAuthenticationCode mac(algo, key); mac.addData(message); QByteArrayView resultView = mac.resultView(); @@ -176,8 +175,7 @@ void tst_QMessageAuthenticationCode::result_incremental() QCOMPARE(leftPart + rightPart, message); - QMessageAuthenticationCode mac(algo); - mac.setKey(key); + QMessageAuthenticationCode mac(algo, key); mac.addData(leftPart); mac.addData(rightPart); QByteArrayView result = mac.resultView();