summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-12-13 14:59:55 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-12-13 17:20:34 +0100
commitc67f301f8bb4f26566c442a646fb06d22c611b28 (patch)
tree04212d43f58c02a7e98bba0b56a48a77db4b2bba /src
parentDon't fail if cache exists (diff)
downloadnheko-c67f301f8bb4f26566c442a646fb06d22c611b28.tar.xz
Work around clazy claiming we connect a lambda
Diffstat (limited to 'src')
-rw-r--r--src/encryption/SelfVerificationStatus.cpp3
-rw-r--r--src/timeline/RoomlistModel.cpp8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/encryption/SelfVerificationStatus.cpp b/src/encryption/SelfVerificationStatus.cpp
index 32e75c4f..b5549ca1 100644
--- a/src/encryption/SelfVerificationStatus.cpp
+++ b/src/encryption/SelfVerificationStatus.cpp
@@ -24,11 +24,12 @@ SelfVerificationStatus::SelfVerificationStatus(QObject *o)
   : QObject(o)
 {
     connect(ChatPage::instance(), &ChatPage::contentLoaded, this, [this] {
+        // We connect INSIDE a lambda, not A lambda...
         connect(cache::client(),
                 &Cache::selfVerificationStatusChanged,
                 this,
                 &SelfVerificationStatus::invalidate,
-                Qt::UniqueConnection);
+                Qt::UniqueConnection); // clazy:exclude=lambda-unique-connection
         cache::client()->markUserKeysOutOfDate({http::client()->user_id().to_string()});
     });
 
diff --git a/src/timeline/RoomlistModel.cpp b/src/timeline/RoomlistModel.cpp
index cdaa02ec..da639843 100644
--- a/src/timeline/RoomlistModel.cpp
+++ b/src/timeline/RoomlistModel.cpp
@@ -271,11 +271,13 @@ RoomlistModel::addRoom(const QString &room_id, bool suppressInsertNotification)
 {
     if (!models.contains(room_id)) {
         // ensure we get read status updates and are only connected once
+        // WORKAROUND(Nico): This is not a lambda, but clazy on alpine currently doesn't
+        // believe us...
         connect(cache::client(),
                 &Cache::roomReadStatus,
                 this,
                 &RoomlistModel::updateReadStatus,
-                Qt::UniqueConnection);
+                Qt::UniqueConnection); // clazy:exclude=lambda-unique-connection
 
         QSharedPointer<TimelineModel> newRoom(new TimelineModel(manager, room_id));
         newRoom->setDecryptDescription(ChatPage::instance()->userSettings()->decryptSidebar());
@@ -529,11 +531,13 @@ RoomlistModel::sync(const mtx::responses::Sync &sync_)
         addRoom(qroomid);
         const auto &room_model = models.value(qroomid);
 
+        // WORKAROUND(Nico): This is not a lambda, but clazy on alpine currently doesn't
+        // believe us
         connect(room_model.data(),
                 &TimelineModel::newCallEvent,
                 ChatPage::instance()->callManager(),
                 &CallManager::syncEvent,
-                Qt::UniqueConnection);
+                Qt::UniqueConnection); // clazy:exclude=lambda-unique-connection
 
         room_model->sync(room);