From c17734c7a0e69fe796053884a4104e74a7f59012 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 8 Feb 2026 19:35:46 +0100 Subject: [PATCH] Fix newer clang format versions --- .clang-format | 2 ++ src/TrayIcon.cpp | 4 ++-- src/timeline/TimelineModel.cpp | 1 - src/ui/EventExpiry.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index f26fc328..70bb3cae 100644 --- a/.clang-format +++ b/.clang-format @@ -13,6 +13,8 @@ KeepEmptyLinesAtTheStartOfBlocks: false PointerAlignment: Right Cpp11BracedListStyle: true PenaltyReturnTypeOnItsOwnLine: 0 +StatementAttributeLikeMacros: + - emit --- BasedOnStyle: WebKit Language: ObjC diff --git a/src/TrayIcon.cpp b/src/TrayIcon.cpp index 0493e620..1c2f7fb5 100644 --- a/src/TrayIcon.cpp +++ b/src/TrayIcon.cpp @@ -108,9 +108,9 @@ TrayIcon::TrayIcon(const QString &filename, QWindow *parent) setContextMenu(menu); toggleAction_ = new QAction(tr("Show"), this); - quitAction_ = new QAction(tr("Quit"), this); + quitAction_ = new QAction(tr("Quit"), this); - connect(toggleAction_, &QAction::triggered, parent, [=, this](){ + connect(toggleAction_, &QAction::triggered, parent, [=, this]() { if (parent->isVisible()) { parent->hide(); toggleAction_->setText(tr("Show")); diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index d5645ac4..03c1b725 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -1137,7 +1137,6 @@ TimelineModel::syncState(const mtx::responses::State &s) avatarChanged = true; nameChanged = true; memberCountChanged = true; - } else if (std::holds_alternative>(e)) { this->isEncrypted_ = cache::isRoomEncrypted(room_id_.toStdString()); emit encryptionChanged(); diff --git a/src/ui/EventExpiry.cpp b/src/ui/EventExpiry.cpp index 8065c397..610cdd5c 100644 --- a/src/ui/EventExpiry.cpp +++ b/src/ui/EventExpiry.cpp @@ -28,7 +28,7 @@ EventExpiry::load() if (auto temp = cache::client()->getAccountData(mtx::events::EventType::NhekoEventExpiry, roomid_.toStdString())) { auto h = std::get>(*temp); + mtx::events::account_data::nheko_extensions::EventExpiry>>(*temp); this->event = std::move(h.content); } }