Add braces
This commit is contained in:
parent
85c7bf9a46
commit
1e9a0f6808
2 changed files with 6 additions and 3 deletions
|
@ -275,8 +275,9 @@ void Device::addLink(const NetworkPacket& identityPacket, DeviceLink* link)
|
||||||
setName(identityPacket.get<QString>(QStringLiteral("deviceName")));
|
setName(identityPacket.get<QString>(QStringLiteral("deviceName")));
|
||||||
d->m_deviceType = str2type(identityPacket.get<QString>(QStringLiteral("deviceType")));
|
d->m_deviceType = str2type(identityPacket.get<QString>(QStringLiteral("deviceType")));
|
||||||
|
|
||||||
if (d->m_deviceLinks.contains(link))
|
if (d->m_deviceLinks.contains(link)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
d->m_protocolVersion = identityPacket.get<int>(QStringLiteral("protocolVersion"), -1);
|
d->m_protocolVersion = identityPacket.get<int>(QStringLiteral("protocolVersion"), -1);
|
||||||
if (d->m_protocolVersion != NetworkPacket::s_protocolVersion) {
|
if (d->m_protocolVersion != NetworkPacket::s_protocolVersion) {
|
||||||
|
|
|
@ -103,8 +103,9 @@ void NotificationsListener::loadApplications()
|
||||||
const QVariantList list = m_plugin->config()->getList(QStringLiteral("applications"));
|
const QVariantList list = m_plugin->config()->getList(QStringLiteral("applications"));
|
||||||
for (const auto& a : list) {
|
for (const auto& a : list) {
|
||||||
NotifyingApplication app = a.value<NotifyingApplication>();
|
NotifyingApplication app = a.value<NotifyingApplication>();
|
||||||
if (!m_applications.contains(app.name))
|
if (!m_applications.contains(app.name)) {
|
||||||
m_applications.insert(app.name, app);
|
m_applications.insert(app.name, app);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Loaded" << applications.size() << " applications";
|
//qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Loaded" << applications.size() << " applications";
|
||||||
}
|
}
|
||||||
|
@ -212,8 +213,9 @@ uint NotificationsListener::Notify(const QString& appName, uint replacesId,
|
||||||
list << QVariant::fromValue<NotifyingApplication>(a);
|
list << QVariant::fromValue<NotifyingApplication>(a);
|
||||||
m_plugin->config()->setList(QStringLiteral("applications"), list);
|
m_plugin->config()->setList(QStringLiteral("applications"), list);
|
||||||
//qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Added new application to config:" << app;
|
//qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Added new application to config:" << app;
|
||||||
} else
|
} else {
|
||||||
app = m_applications.value(appName);
|
app = m_applications.value(appName);
|
||||||
|
}
|
||||||
|
|
||||||
if (!app.active)
|
if (!app.active)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue