mirror of
https://invent.kde.org/network/kdeconnect-kde.git
synced 2026-11-01 15:11:05 +01:00
The class for the Bluetooth link provider we used was called `AsyncLinkProvider`, which in turn wrapped the `BluetoothLinkProvider` class. This renames `AsyncLinkProvider` to `BluetoothLinkProvider` and turns what was `BluetoothLinkProvider` into `BluetoothLinkProviderImpl`. This change also makes `BluetoothLinkProviderImpl` not a `LinkProvider` itself, since it's never used standalone so it doesn't need to implement that interface. It also renames `name()` to `id()` for all providers, to avoid confusion with `displayName()`. I also went ahead and simplified the provider IDs to just "lan", or "bluetooth" instead of "LanLinkProvider" or "BluetoothLinkProvider", since users need to pass those IDs to enable/disable them from the command line. Because of that, I also renamed the setting named `disabled_providers` to `disabled_providers_v2`, since all the previously stored ids are no longer valid which would suddenly enable all providers. This resets the config for all users to the default selection, with only LAN enabled.
23 lines
630 B
C++
23 lines
630 B
C++
/**
|
|
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
*/
|
|
|
|
#include "devicelink.h"
|
|
|
|
#include "linkprovider.h"
|
|
|
|
DeviceLink::DeviceLink(const QString &deviceId, LinkProvider *parent)
|
|
: QObject(parent)
|
|
{
|
|
connect(this, &QObject::destroyed, parent, [this, deviceId, parent]() {
|
|
parent->onLinkDestroyed(deviceId, this);
|
|
});
|
|
this->priorityFromProvider = parent->priority();
|
|
this->displayidFromProvider = parent->displayName();
|
|
this->idFromProvider = parent->id();
|
|
}
|
|
|
|
#include "moc_devicelink.cpp"
|