Renamed capabilties so we don't clash with KDE4's broken implementation

This commit is contained in:
Albert Vaca 2015-09-11 05:20:46 -07:00
parent 47147c5fa1
commit 89afa5b9af
2 changed files with 8 additions and 8 deletions

View file

@ -184,8 +184,8 @@ void Device::reloadPlugins()
if (capabilitiesChanged && isReachable() && isPaired())
{
NetworkPackage np(PACKAGE_TYPE_CAPABILITIES);
np.set<QStringList>("SupportedIncomingInterfaces", newSupportedIncomingInterfaces);
np.set<QStringList>("SupportedOutgoingInterfaces", newPluginsByOutgoingInterface.keys());
np.set<QStringList>("IncomingCapabilities", newSupportedIncomingInterfaces);
np.set<QStringList>("OutgoingCapabilities", newPluginsByOutgoingInterface.keys());
sendPackage(np);
}
}
@ -298,8 +298,8 @@ void Device::addLink(const NetworkPackage& identityPackage, DeviceLink* link)
qSort(m_deviceLinks.begin(), m_deviceLinks.end(), lessThan);
if (m_deviceLinks.size() == 1) {
m_incomingCapabilities = identityPackage.get<QStringList>("SupportedIncomingInterfaces", QStringList()).toSet();
m_outgoingCapabilities = identityPackage.get<QStringList>("SupportedOutgoingInterfaces", QStringList()).toSet();
m_incomingCapabilities = identityPackage.get<QStringList>("IncomingCapabilities", QStringList()).toSet();
m_outgoingCapabilities = identityPackage.get<QStringList>("OutgoingCapabilities", QStringList()).toSet();
reloadPlugins(); //Will load the plugins
Q_EMIT reachableStatusChanged();
} else {
@ -405,8 +405,8 @@ void Device::privateReceivedPackage(const NetworkPackage& np)
}
} else if (np.type() == PACKAGE_TYPE_CAPABILITIES) {
QSet<QString> newIncomingCapabilities = np.get<QStringList>("SupportedIncomingInterfaces", QStringList()).toSet();
QSet<QString> newOutgoingCapabilities = np.get<QStringList>("SupportedOutgoingInterfaces", QStringList()).toSet();
QSet<QString> newIncomingCapabilities = np.get<QStringList>("IncomingCapabilities", QStringList()).toSet();
QSet<QString> newOutgoingCapabilities = np.get<QStringList>("OutgoingCapabilities", QStringList()).toSet();
if (newOutgoingCapabilities != m_outgoingCapabilities || newIncomingCapabilities != m_incomingCapabilities) {
m_incomingCapabilities = newIncomingCapabilities;

View file

@ -59,8 +59,8 @@ void NetworkPackage::createIdentityPackage(NetworkPackage* np)
np->set("deviceName", config->name());
np->set("deviceType", config->deviceType());
np->set("protocolVersion", NetworkPackage::ProtocolVersion);
np->set("SupportedIncomingInterfaces", PluginLoader::instance()->incomingInterfaces());
np->set("SupportedOutgoingInterfaces", PluginLoader::instance()->outgoingInterfaces());
np->set("IncomingCapabilities", PluginLoader::instance()->incomingInterfaces());
np->set("OutgoingCapabilities", PluginLoader::instance()->outgoingInterfaces());
//qCDebug(KDECONNECT_CORE) << "createIdentityPackage" << np->serialize();
}