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

Use Q_EMIT

parent d55abcf8
......@@ -127,7 +127,7 @@ void FilterEdit::updateFilterList()
mRulesList->clear();
if (!mFilters || mFilters->empty()) {
mDetailsFrame->setEnabled(false);
emit(dataConsistent(false));
Q_EMIT(dataConsistent(false));
} else {
QList<KCalCore::CalFilter *>::iterator i;
for (i = mFilters->begin(); i != mFilters->end(); ++i) {
......@@ -141,7 +141,7 @@ void FilterEdit::updateFilterList()
filterSelected(f);
}
}
emit(dataConsistent(true));
Q_EMIT(dataConsistent(true));
}
if (mFilters && mFilters->count() > 0 && !mCurrent) {
filterSelected(mFilters->at(0));
......
......@@ -189,7 +189,7 @@ void NoteEditDialog::accept()
note.setText(mNoteText->editor()->toPlainText(), format);
}
mItem.setPayload<KMime::Message::Ptr>(note.message());
emit createNote(mItem, collection);
Q_EMIT createNote(mItem, collection);
}
void NoteEditDialog::load(const Akonadi::Item &item)
......
......@@ -257,7 +257,7 @@ bool StyledCalendarDelegate::editorEvent(QEvent *event,
QList<StyledCalendarDelegate::Action> actions = getActions(opt, index);
if (actions.count() >= button) {
const Action a = actions.at(button - 1);
emit action(index, a);
Q_EMIT action(index, a);
return true;
}
return QStyledItemDelegate::editorEvent(event, model, option, index);
......
......@@ -306,7 +306,7 @@ void Controller::setSearchString(const QString &searchString)
mPersonSearchJob = new KPIM::PersonSearchJob(searchString, this);
connect(mPersonSearchJob, &KPIM::PersonSearchJob::personsFound,
this, static_cast<void (Controller::*)(const QList<KPIM::Person> &)>(&Controller::onPersonsFound));
this, static_cast<void (Controller::*)(const QVector<KPIM::Person> &)>(&Controller::onPersonsFound));
connect(mPersonSearchJob, &KPIM::PersonSearchJob::personUpdate, this, &Controller::onPersonUpdate);
connect(mPersonSearchJob, &KPIM::PersonSearchJob::result,
this, static_cast<void (Controller::*)(KJob *)>(&Controller::onPersonsFound));
......@@ -337,7 +337,7 @@ void Controller::onCollectionsFound(KJob *job)
}
}
void Controller::onPersonsFound(const QList<KPIM::Person> &persons)
void Controller::onPersonsFound(const QVector<KPIM::Person> &persons)
{
Q_FOREACH (const KPIM::Person &p, persons) {
PersonNode *personNode = new PersonNode(*mSearchModel, p);
......
......@@ -46,7 +46,7 @@ enum NodeTypeRoles {
};
/**
* We need to emit signals in the subclass but don't want to make the parent a QObject
* We need to Q_EMIT signals in the subclass but don't want to make the parent a QObject
*/
class Emitter : public QObject
{
......@@ -54,12 +54,12 @@ class Emitter : public QObject
public:
void emitEnabled(bool state, const KPIM::Person &person)
{
emit enabled(state, person);
Q_EMIT enabled(state, person);
}
void emitEnabled(bool state, const Akonadi::Collection &collection)
{
emit enabled(state, collection);
Q_EMIT enabled(state, collection);
}
Q_SIGNALS:
......@@ -161,7 +161,7 @@ public Q_SLOTS:
private Q_SLOTS:
void onCollectionsFound(KJob *job);
void onPersonsFound(const QList<KPIM::Person> &persons);
void onPersonsFound(const QVector<KPIM::Person> &persons);
void onPersonUpdate(const KPIM::Person &person);
void onPersonsFound(KJob *job);
void onPersonCollectionsFetched(KJob *job);
......
......@@ -291,7 +291,7 @@ void ReparentingModel::updateNode(const ReparentingModel::Node::Ptr &node)
if (*existing == *node) {
existing->update(node);
const QModelIndex i = index(existing.data());
emit dataChanged(i, i);
Q_EMIT dataChanged(i, i);
return;
}
}
......@@ -588,7 +588,7 @@ void ReparentingModel::onSourceDataChanged(const QModelIndex &begin, const QMode
for (int row = begin.row(); row <= end.row(); row++) {
mNodeManager->updateSourceIndex(sourceModel()->index(row, begin.column(), begin.parent()));
}
emit dataChanged(mapFromSource(begin), mapFromSource(end));
Q_EMIT dataChanged(mapFromSource(begin), mapFromSource(end));
}
void ReparentingModel::onSourceModelAboutToBeReset()
......
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