Commit e358c8a2 authored by Laurent Montel's avatar Laurent Montel 😁

Modernize code

parent 7a7f7379
Pipeline #39715 failed with stage
in 62 minutes and 56 seconds
......@@ -40,7 +40,7 @@ public:
QModelIndex QuicktextManager::Private::currentGroupIndex() const
{
if (mSelectionModel->selectedIndexes().isEmpty()) {
return QModelIndex();
return {};
}
const QModelIndex index = mSelectionModel->selectedIndexes().first();
......
......@@ -83,7 +83,7 @@ void EmailLineEdit::slotSelectEmail()
if (factory) {
dlg.reset(factory->create<Akonadi::AbstractEmailAddressSelectionDialog>(this));
} else {
dlg.reset(new Akonadi::EmailAddressSelectionDialog(this));
dlg = std::make_unique<Akonadi::EmailAddressSelectionDialog>(this);
}
dlg->setWindowTitle(i18nc("@title:window", "Select Emails"));
dlg->view()->view()->setSelectionMode(multiSelection() ? QAbstractItemView::MultiSelection : QAbstractItemView::SingleSelection);
......
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