kdeconnect-kde/plugins/findmyphone/findmyphoneplugin.cpp
Alexander Lohnau c5e7fdb5e4 plugins: Prefer using statements with baseclass over empty constructor
Those plugins re really simple and don't need any initialization logic.
With the using statement, we do not need to add a constructor and pass the parent/args to the baseclass
2023-08-07 19:28:37 +02:00

29 lines
756 B
C++

/**
* SPDX-FileCopyrightText: 2014 Apoorv Parle <apparle@gmail.com>
* SPDX-FileCopyrightText: 2015 David Edmundson <davidedmundson@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "findmyphoneplugin.h"
#include <QDBusConnection>
#include <QDebug>
#include <KPluginFactory>
K_PLUGIN_CLASS_WITH_JSON(FindMyPhonePlugin, "kdeconnect_findmyphone.json")
void FindMyPhonePlugin::ring()
{
NetworkPacket np(PACKET_TYPE_FINDMYPHONE_REQUEST);
sendPacket(np);
}
QString FindMyPhonePlugin::dbusPath() const
{
return QLatin1String("/modules/kdeconnect/devices/") + device()->id() + QLatin1String("/findmyphone");
}
#include "findmyphoneplugin.moc"
#include "moc_findmyphoneplugin.cpp"