[network/ruqola] src/widgets/dialogs: Add buttons

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit bebd3e514a07208bcc48df8b9ca464ddd6b52320 by Laurent Montel.
Committed on 18/07/2026 at 20:39.
Pushed by mlaurent into branch 'master'.

Add buttons

M  +12   -1    src/widgets/dialogs/directchannelinfowidget.cpp
M  +3    -0    src/widgets/dialogs/directchannelinfowidget.h

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

diff --git a/src/widgets/dialogs/directchannelinfowidget.cpp b/src/widgets/dialogs/directchannelinfowidget.cpp
index e0d48fe438..0757f64077 100644
--- a/src/widgets/dialogs/directchannelinfowidget.cpp
+++ b/src/widgets/dialogs/directchannelinfowidget.cpp
@@ -209,14 +209,25 @@ void DirectChannelInfoWidget::setUser(const User &user)
         label->setFont(f);
         mFormLayout->addRow(label, emailsInfoLabel);
     }
+    mDirectChannelActionWidget->setVisible(user.userId() != mRocketChatAccount->userId());
 }
 
 DirectChannelActionWidget::DirectChannelActionWidget(QWidget *parent)
     : QWidget(parent)
 {
-    auto actionLayout = new QHBoxLayout;
+    auto actionLayout = new QHBoxLayout(this);
     actionLayout->setObjectName(u"mainLayout"_s);
     actionLayout->setContentsMargins({});
+
+    auto ignoreButton = new QPushButton(i18nc("@action:button", "Ignore"), this);
+    ignoreButton->setObjectName(u"ignoreButton"_s);
+    actionLayout->addWidget(ignoreButton);
+    connect(ignoreButton, &QPushButton::clicked, this, &DirectChannelActionWidget::ignoreUser);
+
+    auto reportButton = new QPushButton(i18nc("@action:button", "Report"), this);
+    reportButton->setObjectName(u"reportButton"_s);
+    actionLayout->addWidget(reportButton);
+    connect(reportButton, &QPushButton::clicked, this, &DirectChannelActionWidget::reportUser);
 }
 
 DirectChannelActionWidget::~DirectChannelActionWidget() = default;
diff --git a/src/widgets/dialogs/directchannelinfowidget.h b/src/widgets/dialogs/directchannelinfowidget.h
index ed9d09a527..f1ac3ca59b 100644
--- a/src/widgets/dialogs/directchannelinfowidget.h
+++ b/src/widgets/dialogs/directchannelinfowidget.h
@@ -22,6 +22,9 @@ class LIBRUQOLAWIDGETS_TESTS_EXPORT DirectChannelActionWidget : public QWidget
 public:
     explicit DirectChannelActionWidget(QWidget *parent = nullptr);
     ~DirectChannelActionWidget() override;
+Q_SIGNALS:
+    void ignoreUser();
+    void reportUser();
 };
 
 class LIBRUQOLAWIDGETS_TESTS_EXPORT DirectChannelInfoWidget : public QWidget
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.