Commit 0d1b9430 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Not necessary to connect to QDialogButton signal

It's already done in KMessageBox::createKMessageBox
parent cdc50bfe
......@@ -107,8 +107,6 @@ MDNAdviceDialog::MDNAdviceDialog(const QString &text, bool canDeny, QWidget *par
user1Button = new QPushButton;
buttonBox->addButton(user1Button, QDialogButtonBox::ActionRole);
connect(user1Button, &QPushButton::clicked, this, &MDNAdviceDialog::slotUser1Clicked);
connect(buttonBox, &QDialogButtonBox::accepted, this, &MDNAdviceDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &MDNAdviceDialog::reject);
if (canDeny) {
QPushButton *user2Button = new QPushButton;
connect(user2Button, &QPushButton::clicked, this, &MDNAdviceDialog::slotUser2Clicked);
......@@ -18,13 +18,27 @@
#include "filter/mdnadvicedialog.h"
#include <QApplication>
#include <QDebug>
int main(int argc, char **argv)
QApplication app(argc, argv);
MailCommon::MDNAdviceDialog *w = new MailCommon::MDNAdviceDialog(QStringLiteral("test mnda"), false);
MailCommon::MDNAdviceDialog *w = new MailCommon::MDNAdviceDialog(QStringLiteral("test mnda"), true);
MessageComposer::MDNAdvice rc = MessageComposer::MDNIgnore;
if (w->exec()) {
rc = w->result();
switch (rc) {
case MessageComposer::MDNSend:
qDebug() << "MessageComposer::MDNSend ";
case MessageComposer::MDNSendDenied:
qDebug() << "MessageComposer::MDNSendDenied ";
case MessageComposer::MDNIgnore:
qDebug() << "MessageComposer::MDNIgnore ";
delete w;
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment