[network/ruqola] src/core/encryption: Use more [[maybe_unused]]

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit e00cc21a352069bb5bd8417d64f675d1ab5e0a93 by Laurent Montel.
Committed on 06/08/2026 at 05:25.
Pushed by mlaurent into branch 'master'.

Use more [[maybe_unused]]

M  +4    -8    src/core/encryption/e2ekeymanager.cpp

https://invent.kde.org/network/ruqola/-/commit/e00cc21a352069bb5bd8417d64f675d1ab5e0a93

diff --git a/src/core/encryption/e2ekeymanager.cpp b/src/core/encryption/e2ekeymanager.cpp
index e16db85f62..e36e6b7fc3 100644
--- a/src/core/encryption/e2ekeymanager.cpp
+++ b/src/core/encryption/e2ekeymanager.cpp
@@ -263,7 +263,7 @@ void E2eKeyManager::setStatus(Status newStatus)
     mStatus = newStatus;
 }
 
-bool E2eKeyManager::initializeRoomE2EKey(const QByteArray &roomId, const QString &existingKeyId)
+bool E2eKeyManager::initializeRoomE2EKey([[maybe_unused]] const QByteArray &roomId, [[maybe_unused]] const QString &existingKeyId)
 {
 #if USE_E2E_SUPPORT
     if (!mAccount || roomId.isEmpty()) {
@@ -302,12 +302,12 @@ bool E2eKeyManager::initializeRoomE2EKey(const QByteArray &roomId, const QString
     }
     return true;
 #else
-    Q_UNUSED(roomId)
-    Q_UNUSED(existingKeyId)
     return false;
 #endif
 }
-void E2eKeyManager::distributeRoomSessionKey(const QByteArray &roomId, const QByteArray &sessionKey, const QString &keyId)
+void E2eKeyManager::distributeRoomSessionKey([[maybe_unused]] const QByteArray &roomId,
+                                             [[maybe_unused]] const QByteArray &sessionKey,
+                                             [[maybe_unused]] const QString &keyId)
 {
 #if USE_E2E_SUPPORT
     // Retrieve own RSA public key from local database.
@@ -364,10 +364,6 @@ void E2eKeyManager::distributeRoomSessionKey(const QByteArray &roomId, const QBy
                                                                         ownPublicKeyPem);
 
     qCDebug(RUQOLA_ENCRYPTION_LOG) << "initializeRoomE2EKey: E2E session key initialised for room" << roomId << "keyId" << keyId;
-#else
-    Q_UNUSED(roomId)
-    Q_UNUSED(sessionKey)
-    Q_UNUSED(keyId)
 #endif
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.