Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords

This commit is contained in:
Janek Bevendorff
2017-03-10 15:58:42 +01:00
parent 4c0e2af6e3
commit 8d487d31a4
109 changed files with 274 additions and 274 deletions

View File

@@ -98,7 +98,7 @@ void EntryAttributes::set(const QString& key, const QString& value, bool protect
bool defaultAttribute = isDefaultAttribute(key);
if (addAttribute && !defaultAttribute) {
Q_EMIT aboutToBeAdded(key);
emit aboutToBeAdded(key);
}
if (addAttribute || changeValue) {
@@ -117,17 +117,17 @@ void EntryAttributes::set(const QString& key, const QString& value, bool protect
}
if (emitModified) {
Q_EMIT modified();
emit modified();
}
if (defaultAttribute && changeValue) {
Q_EMIT defaultKeyModified();
emit defaultKeyModified();
}
else if (addAttribute) {
Q_EMIT added(key);
emit added(key);
}
else if (emitModified) {
Q_EMIT customKeyModified(key);
emit customKeyModified(key);
}
}
@@ -140,13 +140,13 @@ void EntryAttributes::remove(const QString& key)
return;
}
Q_EMIT aboutToBeRemoved(key);
emit aboutToBeRemoved(key);
m_attributes.remove(key);
m_protectedAttributes.remove(key);
Q_EMIT removed(key);
Q_EMIT modified();
emit removed(key);
emit modified();
}
void EntryAttributes::rename(const QString& oldKey, const QString& newKey)
@@ -167,7 +167,7 @@ void EntryAttributes::rename(const QString& oldKey, const QString& newKey)
QString data = value(oldKey);
bool protect = isProtected(oldKey);
Q_EMIT aboutToRename(oldKey, newKey);
emit aboutToRename(oldKey, newKey);
m_attributes.remove(oldKey);
m_attributes.insert(newKey, data);
@@ -176,8 +176,8 @@ void EntryAttributes::rename(const QString& oldKey, const QString& newKey)
m_protectedAttributes.insert(newKey);
}
Q_EMIT modified();
Q_EMIT renamed(oldKey, newKey);
emit modified();
emit renamed(oldKey, newKey);
}
void EntryAttributes::copyCustomKeysFrom(const EntryAttributes* other)
@@ -186,7 +186,7 @@ void EntryAttributes::copyCustomKeysFrom(const EntryAttributes* other)
return;
}
Q_EMIT aboutToBeReset();
emit aboutToBeReset();
// remove all non-default keys
const QList<QString> keyList = keys();
@@ -207,8 +207,8 @@ void EntryAttributes::copyCustomKeysFrom(const EntryAttributes* other)
}
}
Q_EMIT reset();
Q_EMIT modified();
emit reset();
emit modified();
}
bool EntryAttributes::areCustomKeysDifferent(const EntryAttributes* other)
@@ -235,13 +235,13 @@ bool EntryAttributes::areCustomKeysDifferent(const EntryAttributes* other)
void EntryAttributes::copyDataFrom(const EntryAttributes* other)
{
if (*this != *other) {
Q_EMIT aboutToBeReset();
emit aboutToBeReset();
m_attributes = other->m_attributes;
m_protectedAttributes = other->m_protectedAttributes;
Q_EMIT reset();
Q_EMIT modified();
emit reset();
emit modified();
}
}
@@ -259,7 +259,7 @@ bool EntryAttributes::operator!=(const EntryAttributes& other) const
void EntryAttributes::clear()
{
Q_EMIT aboutToBeReset();
emit aboutToBeReset();
m_attributes.clear();
m_protectedAttributes.clear();
@@ -268,8 +268,8 @@ void EntryAttributes::clear()
m_attributes.insert(key, "");
}
Q_EMIT reset();
Q_EMIT modified();
emit reset();
emit modified();
}
int EntryAttributes::attributesSize()