Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

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

Port to new connect api

parent 291bb92c
......@@ -62,10 +62,8 @@ AgentTypeModel::AgentTypeModel(QObject *parent)
: QAbstractItemModel(parent)
, d(new Private(this))
{
connect(AgentManager::self(), SIGNAL(typeAdded(Akonadi::AgentType)),
this, SLOT(typeAdded(Akonadi::AgentType)));
connect(AgentManager::self(), SIGNAL(typeRemoved(Akonadi::AgentType)),
this, SLOT(typeRemoved(Akonadi::AgentType)));
connect(AgentManager::self(), &AgentManager::typeAdded, this, [this](const Akonadi::AgentType &type ) { d->typeAdded(type); });
connect(AgentManager::self(), &AgentManager::typeRemoved, this, [this](const Akonadi::AgentType &type ) { d->typeRemoved(type); });
}
AgentTypeModel::~AgentTypeModel()
......
......@@ -86,9 +86,6 @@ private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void typeAdded(const Akonadi::AgentType &))
Q_PRIVATE_SLOT(d, void typeRemoved(const Akonadi::AgentType &))
//@endcond
};
......
......@@ -58,7 +58,7 @@ public:
// We use WA_DeleteOnClose => Don't use dialog as parent otherwise we can't save modified collection.
CollectionModifyJob *job = new CollectionModifyJob(mCollection);
connect(job, SIGNAL(result(KJob*)), q, SLOT(saveResult(KJob*)));
connect(job, &CollectionModifyJob::result, q, [this](KJob *job) { saveResult(job); });
}
void saveResult(KJob *job)
......@@ -167,7 +167,7 @@ void CollectionPropertiesDialog::Private::init()
}
}
q->connect(buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), SLOT(save()));
q->connect(buttonBox->button(QDialogButtonBox::Ok), &QPushButton::clicked, q, [this]() { save(); });
q->connect(buttonBox->button(QDialogButtonBox::Cancel), &QAbstractButton::clicked, q, &QObject::deleteLater);
KConfigGroup group(KSharedConfig::openConfig(), "CollectionPropertiesDialog");
......
......@@ -140,9 +140,6 @@ private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void save())
Q_PRIVATE_SLOT(d, void saveResult(KJob *))
//@endcond
};
......
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