Remove unused priority() method
This commit is contained in:
parent
7119a831f0
commit
46dd0c59da
5 changed files with 0 additions and 24 deletions
|
@ -36,10 +36,6 @@ public:
|
||||||
{
|
{
|
||||||
return QStringLiteral("BluetoothLinkProvider");
|
return QStringLiteral("BluetoothLinkProvider");
|
||||||
}
|
}
|
||||||
int priority() override
|
|
||||||
{
|
|
||||||
return PRIORITY_MEDIUM;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual void onNetworkChange() override;
|
virtual void onNetworkChange() override;
|
||||||
|
|
|
@ -36,10 +36,6 @@ public:
|
||||||
{
|
{
|
||||||
return QStringLiteral("LanLinkProvider");
|
return QStringLiteral("LanLinkProvider");
|
||||||
}
|
}
|
||||||
int priority() override
|
|
||||||
{
|
|
||||||
return PRIORITY_HIGH;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void configureSslSocket(QSslSocket *socket, const QString &deviceId, bool isDeviceTrusted);
|
static void configureSslSocket(QSslSocket *socket, const QString &deviceId, bool isDeviceTrusted);
|
||||||
static void configureSocket(QSslSocket *socket);
|
static void configureSocket(QSslSocket *socket);
|
||||||
|
|
|
@ -19,15 +19,10 @@ class KDECONNECTCORE_EXPORT LinkProvider : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const static int PRIORITY_LOW = 0; // eg: 3g internet
|
|
||||||
const static int PRIORITY_MEDIUM = 50; // eg: internet
|
|
||||||
const static int PRIORITY_HIGH = 100; // eg: lan
|
|
||||||
|
|
||||||
LinkProvider();
|
LinkProvider();
|
||||||
~LinkProvider() override = default;
|
~LinkProvider() override = default;
|
||||||
|
|
||||||
virtual QString name() = 0;
|
virtual QString name() = 0;
|
||||||
virtual int priority() = 0;
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual void onStart() = 0;
|
virtual void onStart() = 0;
|
||||||
|
|
|
@ -22,10 +22,6 @@ public:
|
||||||
{
|
{
|
||||||
return QStringLiteral("LoopbackLinkProvider");
|
return QStringLiteral("LoopbackLinkProvider");
|
||||||
}
|
}
|
||||||
int priority() override
|
|
||||||
{
|
|
||||||
return PRIORITY_LOW;
|
|
||||||
}
|
|
||||||
|
|
||||||
void onStart() override;
|
void onStart() override;
|
||||||
void onStop() override;
|
void onStop() override;
|
||||||
|
|
|
@ -276,11 +276,6 @@ void Device::pairingHandler_unpaired()
|
||||||
Q_EMIT pairStateChanged(pairStateAsInt());
|
Q_EMIT pairStateChanged(pairStateAsInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool lessThan(DeviceLink *p1, DeviceLink *p2)
|
|
||||||
{
|
|
||||||
return p1->provider()->priority() > p2->provider()->priority();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Device::addLink(const NetworkPacket &identityPacket, DeviceLink *link)
|
void Device::addLink(const NetworkPacket &identityPacket, DeviceLink *link)
|
||||||
{
|
{
|
||||||
// qCDebug(KDECONNECT_CORE) << "Adding link to" << id() << "via" << link->provider();
|
// qCDebug(KDECONNECT_CORE) << "Adding link to" << id() << "via" << link->provider();
|
||||||
|
@ -308,8 +303,6 @@ void Device::addLink(const NetworkPacket &identityPacket, DeviceLink *link)
|
||||||
|
|
||||||
connect(link, &DeviceLink::receivedPacket, this, &Device::privateReceivedPacket);
|
connect(link, &DeviceLink::receivedPacket, this, &Device::privateReceivedPacket);
|
||||||
|
|
||||||
std::sort(d->m_deviceLinks.begin(), d->m_deviceLinks.end(), lessThan);
|
|
||||||
|
|
||||||
const bool capabilitiesSupported = identityPacket.has(QStringLiteral("incomingCapabilities")) || identityPacket.has(QStringLiteral("outgoingCapabilities"));
|
const bool capabilitiesSupported = identityPacket.has(QStringLiteral("incomingCapabilities")) || identityPacket.has(QStringLiteral("outgoingCapabilities"));
|
||||||
if (capabilitiesSupported) {
|
if (capabilitiesSupported) {
|
||||||
const QSet<QString> outgoingCapabilities = identityPacket.get<QStringList>(QStringLiteral("outgoingCapabilities")).toSet(),
|
const QSet<QString> outgoingCapabilities = identityPacket.get<QStringList>(QStringLiteral("outgoingCapabilities")).toSet(),
|
||||||
|
|
Loading…
Reference in a new issue