Commit fdc00bcc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use auto vs auto * where it's possible

parent c3b6331b
Pipeline #49675 failed with stage
in 27 minutes and 18 seconds
......@@ -579,7 +579,7 @@ void ImapResourceBase::startIdle()
scope.setResource(identifier());
scope.setAncestorRetrieval(Akonadi::CollectionFetchScope::All);
auto *fetch = new Akonadi::CollectionFetchJob(c, Akonadi::CollectionFetchJob::Base, this);
auto fetch = new Akonadi::CollectionFetchJob(c, Akonadi::CollectionFetchJob::Base, this);
fetch->setFetchScope(scope);
connect(fetch, &KJob::result, this, &ImapResourceBase::onIdleCollectionFetchDone);
......@@ -614,7 +614,7 @@ void ImapResourceBase::requestManualExpunge(qint64 collectionId)
scope.setAncestorRetrieval(Akonadi::CollectionFetchScope::All);
scope.setListFilter(CollectionFetchScope::NoFilter);
auto *fetch = new Akonadi::CollectionFetchJob(collection, Akonadi::CollectionFetchJob::Base, this);
auto fetch = new Akonadi::CollectionFetchJob(collection, Akonadi::CollectionFetchJob::Base, this);
fetch->setFetchScope(scope);
connect(fetch, &KJob::result, this, &ImapResourceBase::onExpungeCollectionFetchDone);
......
......@@ -276,7 +276,7 @@ void Settings::renameRootCollection(const QString &newName)
{
Akonadi::Collection rootCollection;
rootCollection.setRemoteId(rootRemoteId());
auto *fetchJob = new Akonadi::CollectionFetchJob(rootCollection, Akonadi::CollectionFetchJob::Base);
auto fetchJob = new Akonadi::CollectionFetchJob(rootCollection, Akonadi::CollectionFetchJob::Base);
fetchJob->setProperty("collectionName", newName);
connect(fetchJob, &KJob::result, this, &Settings::onRootCollectionFetched);
}
......
......@@ -69,7 +69,7 @@ KMime::Message::Ptr createMessage(const QString &from,
message->contentType()->setParameter(QStringLiteral("method"), QStringLiteral("request"));
if (!attachment.isEmpty()) {
auto *disposition = new KMime::Headers::ContentDisposition();
auto disposition = new KMime::Headers::ContentDisposition();
disposition->setDisposition(KMime::Headers::CDinline);
message->setHeader(disposition);
message->contentTransferEncoding()->setEncoding(KMime::Headers::CEquPr);
......@@ -87,7 +87,7 @@ KMime::Message::Ptr createMessage(const QString &from,
// Set the first multipart, the body message.
auto bodyMessage = new KMime::Content;
auto *bodyDisposition = new KMime::Headers::ContentDisposition();
auto bodyDisposition = new KMime::Headers::ContentDisposition();
bodyDisposition->setDisposition(KMime::Headers::CDinline);
bodyMessage->contentType()->setMimeType("text/plain");
bodyMessage->contentType()->setCharset("utf-8");
......@@ -98,7 +98,7 @@ KMime::Message::Ptr createMessage(const QString &from,
// Set the sedcond multipart, the attachment.
if (!attachment.isEmpty()) {
auto attachMessage = new KMime::Content;
auto *attachDisposition = new KMime::Headers::ContentDisposition();
auto attachDisposition = new KMime::Headers::ContentDisposition();
attachDisposition->setDisposition(KMime::Headers::CDattachment);
attachMessage->contentType()->setMimeType("text/calendar");
attachMessage->contentType()->setCharset("utf-8");
......
......@@ -34,7 +34,7 @@ void CompactPage::checkCollectionId()
if (!mCollectionId.isEmpty()) {
Collection collection;
collection.setRemoteId(mCollectionId);
auto *fetchJob = new CollectionFetchJob(collection, CollectionFetchJob::Base);
auto fetchJob = new CollectionFetchJob(collection, CollectionFetchJob::Base);
connect(fetchJob, &CollectionFetchJob::result, this, &CompactPage::onCollectionFetchCheck);
}
......@@ -46,7 +46,7 @@ void CompactPage::compact()
Collection collection;
collection.setRemoteId(mCollectionId);
auto *fetchJob = new CollectionFetchJob(collection, CollectionFetchJob::Base);
auto fetchJob = new CollectionFetchJob(collection, CollectionFetchJob::Base);
connect(fetchJob, &CollectionFetchJob::result, this, &CompactPage::onCollectionFetchCompact);
}
......
......@@ -414,7 +414,7 @@ void POP3Resource::targetCollectionFetchJobFinished(KJob *job)
}
}
mTestLocalInbox = false;
auto *fetchJob = qobject_cast<Akonadi::CollectionFetchJob *>(job);
auto fetchJob = qobject_cast<Akonadi::CollectionFetchJob *>(job);
Q_ASSERT(fetchJob);
Q_ASSERT(fetchJob->collections().size() <= 1);
......
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