Commit 84b0482e authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent 09ace838
......@@ -139,14 +139,10 @@ AddTransportDialogNG::AddTransportDialogNG(QWidget *parent)
d->ui.typeListView->setFocus();
// Connect user input.
connect(d->ui.typeListView, SIGNAL(itemClicked(QTreeWidgetItem*,int)),
this, SLOT(updateOkButton()));
connect(d->ui.typeListView, SIGNAL(itemSelectionChanged()),
this, SLOT(updateOkButton()));
connect(d->ui.typeListView, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
this, SLOT(doubleClicked()));
connect(d->ui.name, SIGNAL(textChanged(QString)),
this, SLOT(updateOkButton()));
connect(d->ui.typeListView, &QTreeWidget::itemClicked, this, [this]() { d->updateOkButton(); } );
connect(d->ui.typeListView, &QTreeWidget::itemSelectionChanged, this, [this]() { d->updateOkButton(); } );
connect(d->ui.typeListView, &QTreeWidget::itemDoubleClicked, this, [this]() { d->doubleClicked(); } );
connect(d->ui.name, &QLineEdit:: textChanged, this, [this]() { d->updateOkButton(); } );
d->readConfig();
}
......
......@@ -57,9 +57,6 @@ public:
private:
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void updateOkButton())
Q_PRIVATE_SLOT(d, void doubleClicked())
};
} // namespace MailTransport
......
......@@ -62,16 +62,14 @@ TransportManagementWidget::TransportManagementWidget(QWidget *parent)
d->updateButtonState();
d->ui.transportList->setContextMenuPolicy(Qt::CustomContextMenu);
connect(d->ui.transportList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
SLOT(updateButtonState()));
connect(d->ui.transportList, &QTreeWidget::currentItemChanged, this, [this]() { d->updateButtonState(); });
connect(d->ui.transportList, &QTreeWidget::itemDoubleClicked, this, [this]() { d->editClicked(); });
connect(d->ui.addButton, &QPushButton::clicked, this, [this]() { d->addClicked(); });
connect(d->ui.editButton, &QPushButton::clicked, this, [this]() { d->editClicked(); });
connect(d->ui.renameButton, &QPushButton::clicked, this, [this]() { d->renameClicked(); });
connect(d->ui.removeButton, &QPushButton::clicked, this, [this]() { d->removeClicked(); });
connect(d->ui.defaultButton, &QPushButton::clicked, this, [this]() { d->defaultClicked(); });
connect(d->ui.transportList, SIGNAL(customContextMenuRequested(QPoint)),
SLOT(slotCustomContextMenuRequested(QPoint)));
connect(d->ui.transportList, &QTreeWidget::customContextMenuRequested, this, [this](QPoint p) { d->slotCustomContextMenuRequested(p);} );
}
TransportManagementWidget::~TransportManagementWidget()
......
......@@ -50,8 +50,6 @@ public:
private:
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void updateButtonState())
Q_PRIVATE_SLOT(d, void slotCustomContextMenuRequested(const QPoint &))
};
} // namespace MailTransport
......
......@@ -127,7 +127,7 @@ void FilterActionJob::doStart()
Q_ASSERT(d->functor);
d->fetchScope = d->functor->fetchScope();
fjob->setFetchScope(d->fetchScope);
connect(fjob, SIGNAL(result(KJob*)), this, SLOT(fetchResult(KJob*)));
connect(fjob, &ItemFetchJob::result, this, [this](KJob *job) { d->fetchResult(job); });
} else {
d->traverseItems();
}
......
......@@ -171,8 +171,6 @@ private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void fetchResult(KJob *))
//@endcond
};
} // namespace Akonadi
......
......@@ -205,7 +205,7 @@ void MessageQueueJob::start()
{
SpecialMailCollectionsRequestJob *rjob = new SpecialMailCollectionsRequestJob(this);
rjob->requestDefaultCollection(SpecialMailCollections::Outbox);
connect(rjob, SIGNAL(result(KJob*)), this, SLOT(outboxRequestResult(KJob*)));
connect(rjob, &SpecialMailCollectionsRequestJob::result, this, [this](KJob *job) { d->outboxRequestResult(job);});
rjob->start();
}
......
......@@ -158,8 +158,6 @@ private:
class Private;
friend class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void outboxRequestResult(KJob *))
};
} // namespace MailTransport
......
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