Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b28ccc6b authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent e4cc6da2
......@@ -112,8 +112,8 @@ void AttachmentPropertiesDialog::Private::polishUi()
} else {
// Update the icon when the selected mime type changes.
connect(ui->mimeType, SIGNAL(currentIndexChanged(QString)),
q, SLOT(mimeTypeChanged(QString)));
connect(ui->mimeType, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
q, [this](const QString &str) { mimeTypeChanged(str); });
populateMimeTypes();
populateEncodings();
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help, q);
......
......@@ -98,8 +98,6 @@ private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void mimeTypeChanged(const QString &))
//@endcond
};
}
......
......@@ -169,8 +169,7 @@ ConfigureAggregationsDialog::ConfigureAggregationsDialog(QWidget *parent)
d->mEditor = new AggregationEditor(base);
g->addWidget(d->mEditor, 8, 0, 1, 2);
connect(d->mEditor, SIGNAL(aggregationNameChanged()),
SLOT(editedAggregationNameChanged()));
connect(d->mEditor, &AggregationEditor::aggregationNameChanged, this, [this]() { d->editedAggregationNameChanged(); });
g->setColumnStretch(0, 1);
g->setRowStretch(7, 1);
......
......@@ -133,8 +133,7 @@ ConfigureThemesDialog::ConfigureThemesDialog(QWidget *parent)
d->mCloneThemeButton->setIconSize(QSize(KIconLoader::SizeSmall, KIconLoader::SizeSmall));
g->addWidget(d->mCloneThemeButton, 1, 1);
connect(d->mCloneThemeButton, SIGNAL(clicked()),
SLOT(cloneThemeButtonClicked()));
connect(d->mCloneThemeButton, &QPushButton::clicked, this, [this]() { d->cloneThemeButtonClicked(); });
QFrame *f = new QFrame(base);
f->setFrameStyle(QFrame::Sunken | QFrame::HLine);
......@@ -144,13 +143,11 @@ ConfigureThemesDialog::ConfigureThemesDialog(QWidget *parent)
d->mExportThemeButton = new QPushButton(i18n("Export Theme..."), base);
g->addWidget(d->mExportThemeButton, 3, 1);
connect(d->mExportThemeButton, SIGNAL(clicked()),
SLOT(exportThemeButtonClicked()));
connect(d->mExportThemeButton, &QPushButton::clicked, this, [this]() { d->exportThemeButtonClicked(); });
d->mImportThemeButton = new QPushButton(i18n("Import Theme..."), base);
g->addWidget(d->mImportThemeButton, 4, 1);
connect(d->mImportThemeButton, SIGNAL(clicked()),
SLOT(importThemeButtonClicked()));
connect(d->mImportThemeButton, &QPushButton::clicked, this, [this]() { d->importThemeButtonClicked(); });
f = new QFrame(base);
f->setFrameStyle(QFrame::Sunken | QFrame::HLine);
......@@ -162,18 +159,17 @@ ConfigureThemesDialog::ConfigureThemesDialog(QWidget *parent)
d->mDeleteThemeButton->setIconSize(QSize(KIconLoader::SizeSmall, KIconLoader::SizeSmall));
g->addWidget(d->mDeleteThemeButton, 6, 1);
connect(d->mDeleteThemeButton, SIGNAL(clicked()), SLOT(deleteThemeButtonClicked()));
connect(d->mDeleteThemeButton, &QPushButton::clicked, this, [this]() { d->deleteThemeButtonClicked(); });
d->mEditor = new ThemeEditor(base);
g->addWidget(d->mEditor, 8, 0, 1, 2);
connect(d->mEditor, SIGNAL(themeNameChanged()),
SLOT(editedThemeNameChanged()));
connect(d->mEditor, &ThemeEditor::themeNameChanged, this, [this]() { d->editedThemeNameChanged(); });
g->setColumnStretch(0, 1);
g->setRowStretch(4, 1);
connect(okButton, SIGNAL(clicked()), SLOT(okButtonClicked()));
connect(okButton, &QPushButton::clicked, this, [this]() { d->okButtonClicked(); } );
d->fillThemeList();
}
......
......@@ -42,12 +42,6 @@ Q_SIGNALS:
private:
Q_PRIVATE_SLOT(d, void themeListItemClicked(QListWidgetItem *))
Q_PRIVATE_SLOT(d, void cloneThemeButtonClicked())
Q_PRIVATE_SLOT(d, void deleteThemeButtonClicked())
Q_PRIVATE_SLOT(d, void editedThemeNameChanged())
Q_PRIVATE_SLOT(d, void okButtonClicked())
Q_PRIVATE_SLOT(d, void importThemeButtonClicked())
Q_PRIVATE_SLOT(d, void exportThemeButtonClicked())
class Private;
Private *const d;
......
......@@ -632,8 +632,7 @@ void ViewerPrivate::showAttachmentPopup(KMime::Content *node, const QString &nam
const bool hasScrollbar = mViewer->hasVerticalScrollBar();
if (attachmentInHeader && hasScrollbar) {
action = menu->addAction(i18n("Scroll To"));
connect(action, SIGNAL(triggered(bool)), attachmentMapper, SLOT(map()));
attachmentMapper->setMapping(action, Viewer::ScrollTo);
connect(action, &QAction::triggered, this, [this]() { slotHandleAttachment(Viewer::ScrollTo);});
}
#endif
......@@ -672,15 +671,13 @@ void ViewerPrivate::showAttachmentPopup(KMime::Content *node, const QString &nam
action
= menu->addAction(QIcon::fromTheme(QStringLiteral("mail-reply-sender")),
i18n("Reply To Author"));
connect(action, SIGNAL(triggered()), attachmentMapper, SLOT(map()));
attachmentMapper->setMapping(action, Viewer::ReplyMessageToAuthor);
connect(action, &QAction::triggered, this, [this]() { slotHandleAttachment(Viewer::ReplyMessageToAuthor);});
menu->addSeparator();
action = menu->addAction(QIcon::fromTheme(QStringLiteral("mail-reply-all")), i18n(
"Reply To All"));
connect(action, SIGNAL(triggered()), attachmentMapper, SLOT(map()));
attachmentMapper->setMapping(action, Viewer::ReplyMessageToAll);
connect(action, &QAction::triggered, this, [this]() { slotHandleAttachment(Viewer::ReplyMessageToAll);});
#endif
menu->addSeparator();
action = menu->addAction(i18n("Properties"));
......@@ -1804,7 +1801,7 @@ void ViewerPrivate::showContextMenu(KMime::Content *content, const QPoint &pos)
this, &ViewerPrivate::slotAttachmentCopy);
#if 0 //FIXME Laurent Comment for the moment it crash see Bug 287177
popup.addAction(QIcon::fromTheme("edit-delete"), i18n("Delete Attachment"),
this, SLOT(slotAttachmentDelete()));
this, &ViewerPrivate::slotAttachmentDelete);
#endif
if (MessageViewer::MessageViewerSettings::self()->allowAttachmentEditing()) {
popup.addAction(QIcon::fromTheme(QStringLiteral("document-properties")),
......
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