Remove unused priority() method

This commit is contained in:
Albert Vaca Cintora 2023-06-22 23:46:44 +02:00
parent 7119a831f0
commit 46dd0c59da
5 changed files with 0 additions and 24 deletions

View file

@ -36,10 +36,6 @@ public:
{
return QStringLiteral("BluetoothLinkProvider");
}
int priority() override
{
return PRIORITY_MEDIUM;
}
public Q_SLOTS:
virtual void onNetworkChange() override;

View file

@ -36,10 +36,6 @@ public:
{
return QStringLiteral("LanLinkProvider");
}
int priority() override
{
return PRIORITY_HIGH;
}
static void configureSslSocket(QSslSocket *socket, const QString &deviceId, bool isDeviceTrusted);
static void configureSocket(QSslSocket *socket);

View file

@ -19,15 +19,10 @@ class KDECONNECTCORE_EXPORT LinkProvider : public QObject
Q_OBJECT
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() override = default;
virtual QString name() = 0;
virtual int priority() = 0;
public Q_SLOTS:
virtual void onStart() = 0;

View file

@ -22,10 +22,6 @@ public:
{
return QStringLiteral("LoopbackLinkProvider");
}
int priority() override
{
return PRIORITY_LOW;
}
void onStart() override;
void onStop() override;

View file

@ -276,11 +276,6 @@ void Device::pairingHandler_unpaired()
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)
{
// 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);
std::sort(d->m_deviceLinks.begin(), d->m_deviceLinks.end(), lessThan);
const bool capabilitiesSupported = identityPacket.has(QStringLiteral("incomingCapabilities")) || identityPacket.has(QStringLiteral("outgoingCapabilities"));
if (capabilitiesSupported) {
const QSet<QString> outgoingCapabilities = identityPacket.get<QStringList>(QStringLiteral("outgoingCapabilities")).toSet(),