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

Use Q_EMIT

parent e47b6c67
......@@ -102,7 +102,7 @@ void EventSelectorWidget::selectTrip()
if (dlg.exec()) {
Item item = dlg.selectedItem();
if (item.isValid()) {
emit selected(item);
Q_EMIT selected(item);
m_browser->setItem(item);
}
}
......
......@@ -69,7 +69,7 @@ void ItemSelection::clear()
m_selModel2->clearSelection();
m_selModel3->clearSelection();
m_id = -1;
emit idChanged();
Q_EMIT idChanged();
}
// Workaround bug in QItemSelectionModel::selectedRows
......@@ -95,9 +95,9 @@ void ItemSelection::clearOrUpdate(QItemSelectionModel *selModel, QObject *sender
return;
}
m_index = list.first();
emit selectionChanged(m_index);
Q_EMIT selectionChanged(m_index);
m_id = m_index.data(Akonadi::EntityTreeModel::ItemIdRole).toLongLong();
emit idChanged();
Q_EMIT idChanged();
}
}
......
......@@ -109,9 +109,9 @@ void Trip::layoutChanged()
void Trip::modelReset()
{
m_eventDescription.clear();
emit eventDescriptionChanged();
Q_EMIT eventDescriptionChanged();
m_eventName.clear();
emit eventNameChanged();
Q_EMIT eventNameChanged();
}
void Trip::rowsRemoved(const QModelIndex &parent, int start, int end)
......@@ -152,15 +152,15 @@ void Trip::setCollection(int role, const Akonadi::Collection &collection)
switch (role) {
case MailCollectionRole:
updateCollection(m_mailChangeRecorder, collection);
emit monitoredCollectionsChanged();
Q_EMIT monitoredCollectionsChanged();
return;
case TodoCollectionRole:
updateCollection(m_todoChangeRecorder, collection);
emit monitoredCollectionsChanged();
Q_EMIT monitoredCollectionsChanged();
return;
case NotesCollectionRole:
updateCollection(m_notesChangeRecorder, collection);
emit monitoredCollectionsChanged();
Q_EMIT monitoredCollectionsChanged();
return;
}
}
......@@ -226,7 +226,7 @@ void Trip::setEventName(const QString &name)
{
if (m_eventName != name) {
m_eventName = name;
emit eventNameChanged();
Q_EMIT eventNameChanged();
}
}
......@@ -234,7 +234,7 @@ void Trip::setEventDescription(const QString &description)
{
if (m_eventDescription != description) {
m_eventDescription = description;
emit eventDescriptionChanged();
Q_EMIT eventDescriptionChanged();
}
}
......
......@@ -49,7 +49,7 @@ void FindingETW::connectTreeToModel(QTreeView *tree, Akonadi::EntityTreeModel *m
QSortFilterProxyModel *proxy3 = new QSortFilterProxyModel(this);
proxy3->setSourceModel(proxy2);
tree->setModel(proxy3);
emit initialized();
Q_EMIT initialized();
}
EntityFindingWidget::EntityFindingWidget(QWidget *parent, Qt::WindowFlags f)
......
......@@ -65,7 +65,7 @@ void EntityTreeModelFactory::collectionsFetched(const Akonadi::Collection::List
EntityTreeModel *etm = getModel(changeRecorder, parent());
emit modelCreated(etm);
Q_EMIT modelCreated(etm);
return;
}
}
......
......@@ -187,14 +187,14 @@ void AdBlockSubscription::subscriptionDownloaded()
m_reply = 0;
if (error) {
emit subscriptionError(tr("Cannot load subscription!"));
Q_EMIT subscriptionError(tr("Cannot load subscription!"));
return;
}
loadSubscription(AdBlockManager::instance()->disabledRules());
emit subscriptionUpdated();
emit subscriptionChanged();
Q_EMIT subscriptionUpdated();
Q_EMIT subscriptionChanged();
#endif
}
......@@ -255,7 +255,7 @@ const AdBlockRule *AdBlockSubscription::enableRule(int offset)
rule->setEnabled(true);
//FIXME AdBlockManager::instance()->removeDisabledRule(rule->filter());
emit subscriptionChanged();
Q_EMIT subscriptionChanged();
if (rule->isCssRule()) {
//FIXME mApp->reloadUserStyleSheet();
......@@ -274,7 +274,7 @@ const AdBlockRule *AdBlockSubscription::disableRule(int offset)
rule->setEnabled(false);
//FIXME AdBlockManager::instance()->addDisabledRule(rule->filter());
emit subscriptionChanged();
Q_EMIT subscriptionChanged();
if (rule->isCssRule()) {
//FIXME mApp->reloadUserStyleSheet();
......@@ -418,7 +418,7 @@ int AdBlockCustomList::addRule(AdBlockRule *rule)
{
m_rules.append(rule);
emit subscriptionChanged();
Q_EMIT subscriptionChanged();
if (rule->isCssRule()) {
//FIXME mApp->reloadUserStyleSheet();
......@@ -438,7 +438,7 @@ bool AdBlockCustomList::removeRule(int offset)
m_rules.remove(offset);
emit subscriptionChanged();
Q_EMIT subscriptionChanged();
if (rule->isCssRule()) {
//FIXME mApp->reloadUserStyleSheet();
......@@ -459,7 +459,7 @@ const AdBlockRule *AdBlockCustomList::replaceRule(AdBlockRule *rule, int offset)
AdBlockRule *oldRule = m_rules.at(offset);
m_rules[offset] = rule;
emit subscriptionChanged();
Q_EMIT subscriptionChanged();
if (rule->isCssRule() || oldRule->isCssRule()) {
//FIXME mApp->reloadUserStyleSheet();
......
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