Commit 9c23685b authored by Laurent Montel's avatar Laurent Montel 😁

It"s a class from plugin not necessary to create a private class

parent cef0e3ca
......@@ -36,38 +36,13 @@ using namespace Akonadi;
using namespace KMime;
using namespace MailTransport;
/**
* Private class that helps to provide binary compatibility between releases.
* @internal
*/
class MailTransport::ResourceSendJobPrivate
{
public:
ResourceSendJobPrivate(ResourceSendJob *qq)
: q(qq)
{
}
void slotEmitResult(); // slot
ResourceSendJob *const q;
};
void ResourceSendJobPrivate::slotEmitResult()
{
// KCompositeJob took care of the error.
q->emitResult();
}
ResourceSendJob::ResourceSendJob(Transport *transport, QObject *parent)
: TransportJob(transport, parent)
, d(new ResourceSendJobPrivate(this))
{
}
ResourceSendJob::~ResourceSendJob()
{
delete d;
}
void ResourceSendJob::doStart()
......@@ -85,8 +60,14 @@ void ResourceSendJob::doStart()
job->addressAttribute().setBcc(bcc());
addSubjob(job);
// Once the item is in the outbox, there is nothing more we can do.
connect(job, SIGNAL(result(KJob *)), this, SLOT(slotEmitResult()));
connect(job, &KJob::result, this, &ResourceSendJob::slotEmitResult);
job->start();
}
void ResourceSendJob::slotEmitResult()
{
// KCompositeJob took care of the error.
emitResult();
}
#include "moc_resourcesendjob_p.cpp"
......@@ -25,8 +25,6 @@
#include <item.h>
namespace MailTransport {
class ResourceSendJobPrivate;
/**
Mail transport job for an Akonadi resource-based transport.
......@@ -58,10 +56,7 @@ protected:
void doStart() override;
private:
friend class ResourceSendJobPrivate;
ResourceSendJobPrivate *const d;
Q_PRIVATE_SLOT(d, void slotEmitResult())
void slotEmitResult();
};
} // namespace MailTransport
......
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