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

Port to new connect api

parent a6d76353
......@@ -116,8 +116,8 @@ void Control::Private::serverStateChanged(ServerManager::State state)
Control::Control()
: d(new Private(this))
{
connect(ServerManager::self(), SIGNAL(stateChanged(Akonadi::ServerManager::State)),
SLOT(serverStateChanged(Akonadi::ServerManager::State)));
connect(ServerManager::self(), &ServerManager::stateChanged,
this, [this](Akonadi::ServerManager::State state) { d->serverStateChanged(state); });
// mProgressIndicator is a widget, so it better be deleted before the QApplication is deleted
// Otherwise we get a crash in QCursor code with Qt-4.5
if (QCoreApplication::instance()) {
......
......@@ -56,7 +56,7 @@ void ItemMonitor::setItem(const Item &item)
ItemFetchJob *job = new ItemFetchJob(d->mItem);
job->setFetchScope(fetchScope());
d->connect(job, SIGNAL(result(KJob*)), d, SLOT(initialFetchDone(KJob*)));
d->connect(job, &ItemFetchJob::result, d, [this](KJob* job) {d->initialFetchDone(job); });
}
Item ItemMonitor::item() const
......
......@@ -71,7 +71,7 @@ private Q_SLOTS:
mItem = Item();
mParent->itemRemoved();
}
public Q_SLOTS:
void initialFetchDone(KJob *job)
{
if (job->error()) {
......
......@@ -58,7 +58,7 @@ public:
{
QObject::connect(AgentManager::self(), SIGNAL(instanceAdded(Akonadi::AgentInstance)),
q, SLOT(agentInstanceAdded(Akonadi::AgentInstance)));
QObject::connect(safetyTimer, SIGNAL(timeout()), q, SLOT(timeout()));
QObject::connect(safetyTimer, &QTimer::timeout, q, [this]() {timeout(); });
}
void agentInstanceAdded(const AgentInstance &instance)
......
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