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

Continue to port to new connect api

parent 8ebc4def
...@@ -275,7 +275,7 @@ void AttachmentControllerBase::Private::reloadAttachment() ...@@ -275,7 +275,7 @@ void AttachmentControllerBase::Private::reloadAttachment()
{ {
Q_ASSERT(selectedParts.count() == 1); Q_ASSERT(selectedParts.count() == 1);
AttachmentUpdateJob *ajob = new AttachmentUpdateJob(selectedParts.first(), q); AttachmentUpdateJob *ajob = new AttachmentUpdateJob(selectedParts.first(), q);
connect(ajob, SIGNAL(result(KJob*)), q, SLOT(updateJobResult(KJob*))); connect(ajob, &AttachmentUpdateJob::result, q, [this](KJob *job) { updateJobResult(job); });
ajob->start(); ajob->start();
} }
...@@ -560,7 +560,7 @@ void AttachmentControllerBase::compressAttachment(const AttachmentPart::Ptr &par ...@@ -560,7 +560,7 @@ void AttachmentControllerBase::compressAttachment(const AttachmentPart::Ptr &par
qCDebug(MESSAGECOMPOSER_LOG) << "Compressing part."; qCDebug(MESSAGECOMPOSER_LOG) << "Compressing part.";
AttachmentCompressJob *ajob = new AttachmentCompressJob(part, this); AttachmentCompressJob *ajob = new AttachmentCompressJob(part, this);
connect(ajob, SIGNAL(result(KJob*)), this, SLOT(compressJobResult(KJob*))); connect(ajob, &AttachmentCompressJob::result, this, [this](KJob *job) { d->compressJobResult(job); });
ajob->start(); ajob->start();
} else { } else {
qCDebug(MESSAGECOMPOSER_LOG) << "Uncompressing part."; qCDebug(MESSAGECOMPOSER_LOG) << "Uncompressing part.";
...@@ -718,8 +718,7 @@ void AttachmentControllerBase::viewAttachment(const AttachmentPart::Ptr &part) ...@@ -718,8 +718,7 @@ void AttachmentControllerBase::viewAttachment(const AttachmentPart::Ptr &part)
MessageComposer::Composer *composer = new MessageComposer::Composer; MessageComposer::Composer *composer = new MessageComposer::Composer;
composer->globalPart()->setFallbackCharsetEnabled(true); composer->globalPart()->setFallbackCharsetEnabled(true);
MessageComposer::AttachmentJob *attachmentJob = new MessageComposer::AttachmentJob(part, composer); MessageComposer::AttachmentJob *attachmentJob = new MessageComposer::AttachmentJob(part, composer);
connect(attachmentJob, SIGNAL(result(KJob*)), connect(attachmentJob, &AttachmentJob::result, this, [this](KJob *job) { d->slotAttachmentContentCreated(job); });
this, SLOT(slotAttachmentContentCreated(KJob*)));
attachmentJob->start(); attachmentJob->start();
} }
...@@ -934,7 +933,7 @@ void AttachmentControllerBase::addAttachmentUrlSync(const QUrl &url) ...@@ -934,7 +933,7 @@ void AttachmentControllerBase::addAttachmentUrlSync(const QUrl &url)
void AttachmentControllerBase::addAttachment(const QUrl &url) void AttachmentControllerBase::addAttachment(const QUrl &url)
{ {
MessageCore::AttachmentFromUrlBaseJob *ajob = MessageCore::AttachmentFromUrlUtils::createAttachmentJob(url, this); MessageCore::AttachmentFromUrlBaseJob *ajob = MessageCore::AttachmentFromUrlUtils::createAttachmentJob(url, this);
connect(ajob, SIGNAL(result(KJob*)), this, SLOT(loadJobResult(KJob*))); connect(ajob, &AttachmentFromUrlBaseJob::result, this, [this](KJob *job) { d->loadJobResult(job); });
ajob->start(); ajob->start();
} }
......
...@@ -108,13 +108,7 @@ private: ...@@ -108,13 +108,7 @@ private:
class Private; class Private;
Private *const d; Private *const d;
Q_PRIVATE_SLOT(d, void compressJobResult(KJob *))
Q_PRIVATE_SLOT(d, void loadJobResult(KJob *))
Q_PRIVATE_SLOT(d, void saveSelectedAttachmentAs())
Q_PRIVATE_SLOT(d, void editDone(MessageViewer::EditorWatcher *)) Q_PRIVATE_SLOT(d, void editDone(MessageViewer::EditorWatcher *))
Q_PRIVATE_SLOT(d, void slotAttachmentContentCreated(KJob *))
Q_PRIVATE_SLOT(d, void updateJobResult(KJob *))
Q_PRIVATE_SLOT(d, void attachVcardFromAddressBook(KJob *))
}; };
} // } //
......
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