Renamed capabilties so we don't clash with KDE4's broken implementation
This commit is contained in:
parent
47147c5fa1
commit
89afa5b9af
2 changed files with 8 additions and 8 deletions
|
@ -184,8 +184,8 @@ void Device::reloadPlugins()
|
||||||
if (capabilitiesChanged && isReachable() && isPaired())
|
if (capabilitiesChanged && isReachable() && isPaired())
|
||||||
{
|
{
|
||||||
NetworkPackage np(PACKAGE_TYPE_CAPABILITIES);
|
NetworkPackage np(PACKAGE_TYPE_CAPABILITIES);
|
||||||
np.set<QStringList>("SupportedIncomingInterfaces", newSupportedIncomingInterfaces);
|
np.set<QStringList>("IncomingCapabilities", newSupportedIncomingInterfaces);
|
||||||
np.set<QStringList>("SupportedOutgoingInterfaces", newPluginsByOutgoingInterface.keys());
|
np.set<QStringList>("OutgoingCapabilities", newPluginsByOutgoingInterface.keys());
|
||||||
sendPackage(np);
|
sendPackage(np);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -298,8 +298,8 @@ void Device::addLink(const NetworkPackage& identityPackage, DeviceLink* link)
|
||||||
qSort(m_deviceLinks.begin(), m_deviceLinks.end(), lessThan);
|
qSort(m_deviceLinks.begin(), m_deviceLinks.end(), lessThan);
|
||||||
|
|
||||||
if (m_deviceLinks.size() == 1) {
|
if (m_deviceLinks.size() == 1) {
|
||||||
m_incomingCapabilities = identityPackage.get<QStringList>("SupportedIncomingInterfaces", QStringList()).toSet();
|
m_incomingCapabilities = identityPackage.get<QStringList>("IncomingCapabilities", QStringList()).toSet();
|
||||||
m_outgoingCapabilities = identityPackage.get<QStringList>("SupportedOutgoingInterfaces", QStringList()).toSet();
|
m_outgoingCapabilities = identityPackage.get<QStringList>("OutgoingCapabilities", QStringList()).toSet();
|
||||||
reloadPlugins(); //Will load the plugins
|
reloadPlugins(); //Will load the plugins
|
||||||
Q_EMIT reachableStatusChanged();
|
Q_EMIT reachableStatusChanged();
|
||||||
} else {
|
} else {
|
||||||
|
@ -405,8 +405,8 @@ void Device::privateReceivedPackage(const NetworkPackage& np)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (np.type() == PACKAGE_TYPE_CAPABILITIES) {
|
} else if (np.type() == PACKAGE_TYPE_CAPABILITIES) {
|
||||||
QSet<QString> newIncomingCapabilities = np.get<QStringList>("SupportedIncomingInterfaces", QStringList()).toSet();
|
QSet<QString> newIncomingCapabilities = np.get<QStringList>("IncomingCapabilities", QStringList()).toSet();
|
||||||
QSet<QString> newOutgoingCapabilities = np.get<QStringList>("SupportedOutgoingInterfaces", QStringList()).toSet();
|
QSet<QString> newOutgoingCapabilities = np.get<QStringList>("OutgoingCapabilities", QStringList()).toSet();
|
||||||
|
|
||||||
if (newOutgoingCapabilities != m_outgoingCapabilities || newIncomingCapabilities != m_incomingCapabilities) {
|
if (newOutgoingCapabilities != m_outgoingCapabilities || newIncomingCapabilities != m_incomingCapabilities) {
|
||||||
m_incomingCapabilities = newIncomingCapabilities;
|
m_incomingCapabilities = newIncomingCapabilities;
|
||||||
|
|
|
@ -59,8 +59,8 @@ void NetworkPackage::createIdentityPackage(NetworkPackage* np)
|
||||||
np->set("deviceName", config->name());
|
np->set("deviceName", config->name());
|
||||||
np->set("deviceType", config->deviceType());
|
np->set("deviceType", config->deviceType());
|
||||||
np->set("protocolVersion", NetworkPackage::ProtocolVersion);
|
np->set("protocolVersion", NetworkPackage::ProtocolVersion);
|
||||||
np->set("SupportedIncomingInterfaces", PluginLoader::instance()->incomingInterfaces());
|
np->set("IncomingCapabilities", PluginLoader::instance()->incomingInterfaces());
|
||||||
np->set("SupportedOutgoingInterfaces", PluginLoader::instance()->outgoingInterfaces());
|
np->set("OutgoingCapabilities", PluginLoader::instance()->outgoingInterfaces());
|
||||||
|
|
||||||
//qCDebug(KDECONNECT_CORE) << "createIdentityPackage" << np->serialize();
|
//qCDebug(KDECONNECT_CORE) << "createIdentityPackage" << np->serialize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue