Git commit f7e68361d27ea849f4b27538b7868fce319aba30 by Montel Laurent. Committed on 31/10/2017 at 21:31. Pushed by mlaurent into branch 'master'. Port to new connect api M +6 -6 messagecomposer/src/attachment/attachmentcontrollerbase.cpp M +0 -2 messagecomposer/src/attachment/attachmentcontrollerbase.h M +2 -2 messagelist/src/pane.cpp https://commits.kde.org/messagelib/f7e68361d27ea849f4b27538b7868fce319aba30 diff --git a/messagecomposer/src/attachment/attachmentcontrollerbase.cpp b/= messagecomposer/src/attachment/attachmentcontrollerbase.cpp index 675147c7..f5fbd549 100644 --- a/messagecomposer/src/attachment/attachmentcontrollerbase.cpp +++ b/messagecomposer/src/attachment/attachmentcontrollerbase.cpp @@ -369,7 +369,7 @@ void AttachmentControllerBase::exportPublicKey(const QS= tring &fingerprint) } = MessageComposer::AttachmentFromPublicKeyJob *ajob =3D new MessageCompo= ser::AttachmentFromPublicKeyJob(fingerprint, this); - connect(ajob, SIGNAL(result(KJob*)), this, SLOT(attachPublicKeyJobResu= lt(KJob*))); + connect(ajob, &AttachmentFromPublicKeyJob::result, this, [this](KJob *= job) {d->attachPublicKeyJobResult(job); }); ajob->start(); } = @@ -424,8 +424,8 @@ AttachmentControllerBase::AttachmentControllerBase(Mess= ageComposer::AttachmentMo { d->model =3D model; connect(model, &MessageComposer::AttachmentModel::attachUrlsRequested,= this, &AttachmentControllerBase::addAttachments); - connect(model, SIGNAL(attachmentRemoved(MessageCore::AttachmentPart::P= tr)), - this, SLOT(attachmentRemoved(MessageCore::AttachmentPart::Ptr)= )); + connect(model, &MessageComposer::AttachmentModel::attachmentRemoved, + this, [this](const MessageCore::AttachmentPart::Ptr &attr) { d= ->attachmentRemoved(attr); }); connect(model, &AttachmentModel::attachmentCompressRequested, this, &AttachmentControllerBase::compressAttachment); connect(model, &MessageComposer::AttachmentModel::encryptEnabled, this= , &AttachmentControllerBase::setEncryptEnabled); @@ -484,8 +484,8 @@ void AttachmentControllerBase::createActions() = d->removeAction =3D new QAction(QIcon::fromTheme(QStringLiteral("edit-= delete")), i18n("&Remove Attachment"), this); d->removeContextAction =3D new QAction(QIcon::fromTheme(QStringLiteral= ("edit-delete")), i18n("Remove"), this); // FIXME need two texts. is th= ere a better way? - connect(d->removeAction, SIGNAL(triggered(bool)), this, SLOT(removeSel= ectedAttachments())); - connect(d->removeContextAction, SIGNAL(triggered(bool)), this, SLOT(re= moveSelectedAttachments())); + connect(d->removeAction, &QAction::triggered, this, [this]() { d->remo= veSelectedAttachments(); }); + connect(d->removeContextAction, &QAction::triggered, this, [this]() { = d->removeSelectedAttachments(); }); = d->openContextAction =3D new QAction(i18nc("to open", "Open"), this); connect(d->openContextAction, SIGNAL(triggered(bool)), this, SLOT(open= SelectedAttachments())); @@ -863,7 +863,7 @@ void AttachmentControllerBase::showAttachVcard() const Akonadi::EmailAddressSelection::List selectedEmail =3D dlg->= selectedAddresses(); for (const Akonadi::EmailAddressSelection &selected : selectedEmai= l) { MessageComposer::AttachmentVcardFromAddressBookJob *ajob =3D n= ew MessageComposer::AttachmentVcardFromAddressBookJob(selected.item(), this= ); - connect(ajob, SIGNAL(result(KJob*)), this, SLOT(attachVcardFro= mAddressBook(KJob*))); + connect(ajob, &AttachmentVcardFromAddressBookJob::result, this= , [this](KJob *job) {d->attachVcardFromAddressBook(job);}); ajob->start(); } } diff --git a/messagecomposer/src/attachment/attachmentcontrollerbase.h b/me= ssagecomposer/src/attachment/attachmentcontrollerbase.h index dbb4133f..63552361 100644 --- a/messagecomposer/src/attachment/attachmentcontrollerbase.h +++ b/messagecomposer/src/attachment/attachmentcontrollerbase.h @@ -108,7 +108,6 @@ private: class Private; Private *const d; = - Q_PRIVATE_SLOT(d, void attachmentRemoved(const MessageCore::Attachment= Part::Ptr &)) Q_PRIVATE_SLOT(d, void compressJobResult(KJob *)) Q_PRIVATE_SLOT(d, void loadJobResult(KJob *)) Q_PRIVATE_SLOT(d, void openSelectedAttachments()) @@ -119,7 +118,6 @@ private: Q_PRIVATE_SLOT(d, void saveSelectedAttachmentAs()) Q_PRIVATE_SLOT(d, void selectedAttachmentProperties()) Q_PRIVATE_SLOT(d, void editDone(MessageViewer::EditorWatcher *)) - Q_PRIVATE_SLOT(d, void attachPublicKeyJobResult(KJob *)) Q_PRIVATE_SLOT(d, void slotAttachmentContentCreated(KJob *)) Q_PRIVATE_SLOT(d, void reloadAttachment()) Q_PRIVATE_SLOT(d, void updateJobResult(KJob *)) diff --git a/messagelist/src/pane.cpp b/messagelist/src/pane.cpp index 0542115e..b2052407 100644 --- a/messagelist/src/pane.cpp +++ b/messagelist/src/pane.cpp @@ -160,8 +160,8 @@ Pane::Pane(bool restoreSession, QAbstractItemModel *mod= el, QItemSelectionModel * d->mCloseTabButton->setAccessibleName(i18n("Close tab")); #endif setCornerWidget(d->mCloseTabButton, Qt::TopRightCorner); - connect(d->mCloseTabButton, SIGNAL(clicked()), - SLOT(onCloseTabClicked())); + connect(d->mCloseTabButton, &QToolButton::clicked, + this, [this]() {d->onCloseTabClicked(); }); = setTabsClosable(true); connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(slotTabCloseR= equested(int)));