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

Use auto vs auto * where it's possible

parent e27c4777
Pipeline #49629 failed with stage
in 14 minutes and 11 seconds
......@@ -268,7 +268,7 @@ bool MailClient::send(const KIdentityManagement::Identity &identity,
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);
......@@ -286,7 +286,7 @@ bool MailClient::send(const KIdentityManagement::Identity &identity,
// 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");
......@@ -298,7 +298,7 @@ bool MailClient::send(const KIdentityManagement::Identity &identity,
// Set the second 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");
......
......@@ -197,7 +197,7 @@ void ActionManager::createCalendarAkonadi()
mCollectionView->setCollectionSelectionProxyModel(checkableProxy);
auto *collectionSelection = new CalendarSupport::CollectionSelection(selectionModel);
auto collectionSelection = new CalendarSupport::CollectionSelection(selectionModel);
EventViews::EventView::setGlobalCollectionSelection(collectionSelection);
mCalendarView->readSettings();
......
......@@ -558,7 +558,7 @@ void AkonadiCollectionView::slotServerSideSubscription()
if (!collection.isValid()) {
return;
}
auto *job = new PimCommon::ManageServerSideSubscriptionJob(this);
auto job = new PimCommon::ManageServerSideSubscriptionJob(this);
job->setCurrentCollection(collection);
job->setParentWidget(this);
job->start();
......@@ -701,7 +701,7 @@ void AkonadiCollectionView::newCalendar()
void AkonadiCollectionView::newCalendarDone(KJob *job)
{
auto *createjob = static_cast<Akonadi::AgentInstanceCreateJob *>(job);
auto createjob = static_cast<Akonadi::AgentInstanceCreateJob *>(job);
if (createjob->error()) {
// TODO(AKONADI_PORT)
// this should show an error dialog and should be merged
......
......@@ -223,7 +223,7 @@ void FilterEdit::bNewPressed()
}
}
auto *newFilter = new KCalendarCore::CalFilter(newFilterName);
auto newFilter = new KCalendarCore::CalFilter(newFilterName);
mFilters->append(newFilter);
updateFilterList();
mRulesList->setCurrentRow(mRulesList->count() - 1);
......
......@@ -149,7 +149,7 @@ KOrg::Part *KOCore::loadPart(const KService::Ptr &service, KOrg::MainWindow *par
return nullptr;
}
auto *pluginFactory = static_cast<KOrg::PartFactory *>(factory);
auto pluginFactory = static_cast<KOrg::PartFactory *>(factory);
if (!pluginFactory) {
qCDebug(KORGANIZER_LOG) << "Cast failed";
......
......@@ -87,7 +87,7 @@ void KOrganizer::init(bool document)
bar->addWidget(new QLabel(this));
auto *progressBar = new KPIM::ProgressStatusBarWidget(statusBar(), this);
auto progressBar = new KPIM::ProgressStatusBarWidget(statusBar(), this);
bar->addPermanentWidget(progressBar->littleProgress());
......
......@@ -37,7 +37,7 @@ void ManageShowCollectionProperties::showCollectionProperties()
dlg->raise();
return;
}
auto *sync = new Akonadi::CollectionAttributesSynchronizationJob(col);
auto sync = new Akonadi::CollectionAttributesSynchronizationJob(col);
sync->setProperty("collectionId", id);
connect(sync, &Akonadi::CollectionAttributesSynchronizationJob::result, this, &ManageShowCollectionProperties::slotCollectionPropertiesContinued);
sync->start();
......@@ -46,7 +46,7 @@ void ManageShowCollectionProperties::showCollectionProperties()
void ManageShowCollectionProperties::slotCollectionPropertiesContinued(KJob *job)
{
if (job) {
auto *sync = qobject_cast<Akonadi::CollectionAttributesSynchronizationJob *>(job);
auto sync = qobject_cast<Akonadi::CollectionAttributesSynchronizationJob *>(job);
Q_ASSERT(sync);
if (sync->property("collectionId") != mCollectionView->currentCalendar().id()) {
return;
......
......@@ -37,7 +37,7 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling(QWidget *parent)
auto aTransportLabel = new QLabel(i18nc("@label", "Mail transport:"), topFrame);
topLayout->addWidget(aTransportLabel, 2, 0, 1, 2);
auto *tmw = new MailTransport::TransportManagementWidget(topFrame);
auto tmw = new MailTransport::TransportManagementWidget(topFrame);
tmw->layout()->setContentsMargins({});
topLayout->addWidget(tmw, 3, 0, 1, 2);
load();
......
......@@ -389,7 +389,7 @@ void MultiAgendaViewConfigDialog::Private::setUpColumns(int n)
columnFilterProxy->setSourceColumns(QVector<int>() << Akonadi::ETMCalendar::CollectionTitle);
columnFilterProxy->setSourceModel(sortProxy);
auto *qsm = new QItemSelectionModel(columnFilterProxy, columnFilterProxy);
auto qsm = new QItemSelectionModel(columnFilterProxy, columnFilterProxy);
auto selection = new KCheckableProxyModel;
selection->setSourceModel(columnFilterProxy);
......
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