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

Use auto vs auto * where it's possible

parent 20697df5
Pipeline #49630 failed with stage
in 11 minutes and 46 seconds
......@@ -209,7 +209,7 @@ MainWidget::MainWidget(KXMLGUIClient *guiClient, QWidget *parent)
mCollectionTree->setHeaderGroup(Akonadi::EntityTreeModel::CollectionTreeHeaders);
mCollectionSelectionModel = new QItemSelectionModel(mCollectionTree);
auto *checkableProxyModel = new StructuralCollectionsNotCheckableProxy(this);
auto checkableProxyModel = new StructuralCollectionsNotCheckableProxy(this);
checkableProxyModel->setSelectionModel(mCollectionSelectionModel);
checkableProxyModel->setSourceModel(mCollectionTree);
......@@ -222,7 +222,7 @@ MainWidget::MainWidget(KXMLGUIClient *guiClient, QWidget *parent)
connect(mCollectionView, qOverload<const Akonadi::Collection &>(&Akonadi::EntityTreeView::currentChanged), this, &MainWidget::slotCurrentCollectionChanged);
auto *selectionProxyModel = new KSelectionProxyModel(mCollectionSelectionModel, this);
auto selectionProxyModel = new KSelectionProxyModel(mCollectionSelectionModel, this);
selectionProxyModel->setSourceModel(GlobalContactModel::instance()->model());
selectionProxyModel->setFilterBehavior(KSelectionProxyModel::ChildrenOfExactSelection);
......@@ -320,7 +320,7 @@ void MainWidget::initializeImportExportPlugin(KActionCollection *collection)
QList<QAction *> exportActions;
for (KAddressBookImportExport::Plugin *plugin : listPlugins) {
if (plugin->isEnabled()) {
auto *interface = static_cast<KAddressBookImportExport::PluginInterface *>(plugin->createInterface(this));
auto interface = static_cast<KAddressBookImportExport::PluginInterface *>(plugin->createInterface(this));
interface->setItemSelectionModel(mItemView->selectionModel());
interface->setParentWidget(this);
interface->createAction(collection);
......
......@@ -46,7 +46,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, &KJob::result, this, &ManageShowCollectionProperties::slotCollectionPropertiesContinued);
sync->start();
......@@ -55,7 +55,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") != mMainWidget->currentAddressBook().id()) {
return;
......
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