summary refs log tree commit diff
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
parentDon't fail if cache exists (diff)
downloadnheko-c67f301f8bb4f26566c442a646fb06d22c611b28.tar.xz
Work around clazy claiming we connect a lambda
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--src/encryption/SelfVerificationStatus.cpp3
-rw-r--r--src/timeline/RoomlistModel.cpp8
3 files changed, 9 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index da3a4813..57c360e7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -46,7 +46,7 @@ build-clazy:
     TRAVIS_OS_NAME: linux
   before_script:
     - echo -e "\e[0Ksection_start:`date +%s`:install_deps[collapsed=true]\r\e[0K\e[1m\e[95mInstalling apk dependencies"
-    - apk add	asciidoctor cmake cmark-dev gst-plugins-bad-dev gst-plugins-base-dev gstreamer-dev lmdb-dev lmdbxx nlohmann-json olm-dev openssl-dev qt6-qtbase-dev qt6-qtdeclarative-dev qt6-qtmultimedia-dev qt6-qtsvg-dev qt6-qttools-dev samurai spdlog-dev xcb-util-wm-dev zlib-dev ccache curl-dev libevent-dev meson clazy clang16 gcc musl-dev git re2-dev libsecret-dev clang16
+    - apk add	asciidoctor cmake cmark-dev gst-plugins-bad-dev gst-plugins-base-dev gstreamer-dev lmdb-dev lmdbxx nlohmann-json olm-dev openssl-dev qt6-qtbase-dev qt6-qtdeclarative-dev qt6-qtmultimedia-dev qt6-qtsvg-dev qt6-qttools-dev samurai spdlog-dev xcb-util-wm-dev zlib-dev ccache curl-dev libevent-dev meson clazy clang16 gcc musl-dev git re2-dev libsecret-dev
     - echo -e "\e[0Ksection_end:`date +%s`:install_deps\r\e[0K"
   script:
     - export PATH="/usr/lib/ccache:${PATH}"
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);