Commit abf53545 authored by Laurent Montel's avatar Laurent Montel
Browse files

Initialize pointer in header

parent 1f407f63
......@@ -122,6 +122,8 @@ void MailDispatcherAgent::dispatch()
MailDispatcherAgent::MailDispatcherAgent(const QString &id)
: AgentBase(id)
, mQueue(new OutboxQueue(this))
, mSentActionHandler(new SentActionHandler(this))
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator migrate(QStringLiteral("maildispatcheragent"));
......@@ -143,15 +145,12 @@ MailDispatcherAgent::MailDispatcherAgent(const QString &id)
QDBusConnection::sessionBus().registerService(service);
mQueue = new OutboxQueue(this);
connect(mQueue, &OutboxQueue::newItems, this, &MailDispatcherAgent::dispatch);
connect(mQueue, &OutboxQueue::itemReady, this, &MailDispatcherAgent::itemFetched);
connect(mQueue, &OutboxQueue::error, this, &MailDispatcherAgent::queueError);
connect(this, &MailDispatcherAgent::itemProcessed, mQueue, &OutboxQueue::itemProcessed);
connect(this, &MailDispatcherAgent::abortRequested, this, &MailDispatcherAgent::abort);
mSentActionHandler = new SentActionHandler(this);
setNeedsNetwork(true);
}
......
......@@ -52,7 +52,8 @@ private:
void sendResult(KJob *job);
void emitStatusReady();
OutboxQueue *mQueue = nullptr;
OutboxQueue *const mQueue;
SentActionHandler *const mSentActionHandler;
SendJob *mCurrentJob = nullptr;
Akonadi::Item mCurrentItem;
bool mAborting = false;
......@@ -61,5 +62,4 @@ private:
bool mErrorOccurred = false;
bool mShowSentNotification = true;
qulonglong mSentItemsSize = 0;
SentActionHandler *mSentActionHandler = nullptr;
};
Supports Markdown
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