diff --git a/core/backends/bluetooth/bluetoothlinkprovider.cpp b/core/backends/bluetooth/bluetoothlinkprovider.cpp index cfc766815..c8e74521c 100644 --- a/core/backends/bluetooth/bluetoothlinkprovider.cpp +++ b/core/backends/bluetooth/bluetoothlinkprovider.cpp @@ -13,14 +13,13 @@ #include BluetoothLinkProvider::BluetoothLinkProvider() + : mServiceUuid(QBluetoothUuid(QStringLiteral("185f3df4-3268-4e3f-9fca-d4d5059915bd"))) + , mServiceDiscoveryAgent(new QBluetoothServiceDiscoveryAgent(this)) + , connectTimer(new QTimer(this)) { - mServiceUuid = QBluetoothUuid(QStringLiteral("185f3df4-3268-4e3f-9fca-d4d5059915bd")); - - connectTimer = new QTimer(this); connectTimer->setInterval(30000); connectTimer->setSingleShot(false); - mServiceDiscoveryAgent = new QBluetoothServiceDiscoveryAgent(this); mServiceDiscoveryAgent->setUuidFilter(mServiceUuid); connect(connectTimer, &QTimer::timeout, this, [this]() { mServiceDiscoveryAgent->start(); diff --git a/plugins/contacts/contactsplugin.cpp b/plugins/contacts/contactsplugin.cpp index fe026d4de..f21f5819d 100644 --- a/plugins/contacts/contactsplugin.cpp +++ b/plugins/contacts/contactsplugin.cpp @@ -22,9 +22,8 @@ K_PLUGIN_CLASS_WITH_JSON(ContactsPlugin, "kdeconnect_contacts.json") ContactsPlugin::ContactsPlugin(QObject *parent, const QVariantList &args) : KdeConnectPlugin(parent, args) + , vcardsPath(QString(*vcardsLocation).append(QStringLiteral("/kdeconnect-").append(device()->id()))) { - vcardsPath = QString(*vcardsLocation).append(QStringLiteral("/kdeconnect-").append(device()->id())); - // Register custom types with dbus qRegisterMetaType("uID"); qDBusRegisterMetaType(); diff --git a/plugins/mpriscontrol/mpriscontrolplugin-win.cpp b/plugins/mpriscontrol/mpriscontrolplugin-win.cpp index 00e82c9b0..c47fcd379 100644 --- a/plugins/mpriscontrol/mpriscontrolplugin-win.cpp +++ b/plugins/mpriscontrol/mpriscontrolplugin-win.cpp @@ -24,8 +24,8 @@ K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json") MprisControlPlugin::MprisControlPlugin(QObject *parent, const QVariantList &args) : KdeConnectPlugin(parent, args) + , sessionManager(GlobalSystemMediaTransportControlsSessionManager::RequestAsync().get()) { - sessionManager = GlobalSystemMediaTransportControlsSessionManager::RequestAsync().get(); sessionManager->SessionsChanged([this](GlobalSystemMediaTransportControlsSessionManager, SessionsChangedEventArgs) { this->updatePlayerList(); }); diff --git a/plugins/sftp/sftpplugin-win.cpp b/plugins/sftp/sftpplugin-win.cpp index 708d53a2b..357f22d44 100644 --- a/plugins/sftp/sftpplugin-win.cpp +++ b/plugins/sftp/sftpplugin-win.cpp @@ -21,8 +21,8 @@ K_PLUGIN_CLASS_WITH_JSON(SftpPlugin, "kdeconnect_sftp.json") SftpPlugin::SftpPlugin(QObject *parent, const QVariantList &args) : KdeConnectPlugin(parent, args) + , deviceId(device()->id()) { - deviceId = device()->id(); } SftpPlugin::~SftpPlugin() diff --git a/plugins/sftp/sftpplugin.cpp b/plugins/sftp/sftpplugin.cpp index b6663d2ce..bb47effcd 100644 --- a/plugins/sftp/sftpplugin.cpp +++ b/plugins/sftp/sftpplugin.cpp @@ -40,8 +40,8 @@ struct SftpPlugin::Pimpl { SftpPlugin::SftpPlugin(QObject *parent, const QVariantList &args) : KdeConnectPlugin(parent, args) , d(new Pimpl()) + , deviceId(device()->id()) { - deviceId = device()->id(); addToDolphin(); qCDebug(KDECONNECT_PLUGIN_SFTP) << "Created device:" << device()->name(); }