[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [messagelib] /: Port to new connect api
From: Montel Laurent <null () kde ! org>
Date: 2017-12-19 6:57:57
Message-ID: E1eRBqf-0004o0-QL () code ! kde ! org
[Download RAW message or body]
Git commit b28ccc6b1c917120a9ee19c154ce976bb8715e67 by Montel Laurent.
Committed on 19/12/2017 at 06:57.
Pushed by mlaurent into branch 'master'.
Port to new connect api
M +2 -2 messagecore/src/attachment/attachmentpropertiesdialog.cpp
M +0 -2 messagecore/src/attachment/attachmentpropertiesdialog.h
M +1 -2 messagelist/src/utils/configureaggregationsdialog.cpp
M +6 -10 messagelist/src/utils/configurethemesdialog.cpp
M +0 -6 messagelist/src/utils/configurethemesdialog.h
M +4 -7 messageviewer/src/viewer/viewer_p.cpp
https://commits.kde.org/messagelib/b28ccc6b1c917120a9ee19c154ce976bb8715e67
diff --git a/messagecore/src/attachment/attachmentpropertiesdialog.cpp \
b/messagecore/src/attachment/attachmentpropertiesdialog.cpp index cb00ba1f..9837983f \
100644
--- a/messagecore/src/attachment/attachmentpropertiesdialog.cpp
+++ b/messagecore/src/attachment/attachmentpropertiesdialog.cpp
@@ -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);
diff --git a/messagecore/src/attachment/attachmentpropertiesdialog.h \
b/messagecore/src/attachment/attachmentpropertiesdialog.h index 730fb127..b3ae08fe \
100644
--- a/messagecore/src/attachment/attachmentpropertiesdialog.h
+++ b/messagecore/src/attachment/attachmentpropertiesdialog.h
@@ -98,8 +98,6 @@ private:
//@cond PRIVATE
class Private;
Private *const d;
-
- Q_PRIVATE_SLOT(d, void mimeTypeChanged(const QString &))
//@endcond
};
}
diff --git a/messagelist/src/utils/configureaggregationsdialog.cpp \
b/messagelist/src/utils/configureaggregationsdialog.cpp index 24b76d48..976c2c28 \
100644
--- a/messagelist/src/utils/configureaggregationsdialog.cpp
+++ b/messagelist/src/utils/configureaggregationsdialog.cpp
@@ -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);
diff --git a/messagelist/src/utils/configurethemesdialog.cpp \
b/messagelist/src/utils/configurethemesdialog.cpp index 22022f3f..fc04caf4 100644
--- a/messagelist/src/utils/configurethemesdialog.cpp
+++ b/messagelist/src/utils/configurethemesdialog.cpp
@@ -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();
}
diff --git a/messagelist/src/utils/configurethemesdialog.h \
b/messagelist/src/utils/configurethemesdialog.h index e7fcc626..f92035b1 100644
--- a/messagelist/src/utils/configurethemesdialog.h
+++ b/messagelist/src/utils/configurethemesdialog.h
@@ -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;
diff --git a/messageviewer/src/viewer/viewer_p.cpp \
b/messageviewer/src/viewer/viewer_p.cpp index 84d0dcb9..687ebd0e 100644
--- a/messageviewer/src/viewer/viewer_p.cpp
+++ b/messageviewer/src/viewer/viewer_p.cpp
@@ -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")),
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic