Commit 9d7f369f authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Cleanup debug and remove unused stuff

parent 78144b63
......@@ -86,7 +86,7 @@ bool Battery::isRechargeable() const
bool Battery::isPowerSupply() const
{
return false; // USB 3.1 anyone? ;)
return false;
}
Solid::Battery::ChargeState Battery::chargeState() const
......
......@@ -28,7 +28,6 @@
#include <solid/device.h>
#include <QtCore/QStringList>
#include <QtCore/QDebug>
#include <QtDBus/QDBusPendingReply>
using namespace Solid::Backends::KdeConnect;
......@@ -42,7 +41,7 @@ KdeConnectDevice::KdeConnectDevice(const QString &udi, const QString &id)
, m_udi(udi)
, m_id(id)
{
qDebug() << "created kde connect device" << id;
}
KdeConnectDevice::~KdeConnectDevice()
......@@ -116,9 +115,3 @@ QString KdeConnectDevice::deviceId() const
{
return m_id;
}
void KdeConnectDevice::onChanged() // TODO
{
qDebug() << "charge information changed" << m_udi;
emit changed();
}
......@@ -58,9 +58,6 @@ public:
Q_SIGNALS:
void changed();
private Q_SLOTS:
void onChanged();
private:
mutable QDBusInterface m_device;
QString m_udi;
......
......@@ -20,15 +20,13 @@
#include "kdeconnectdeviceinterface.h"
#include <QDebug>
using namespace Solid::Backends::KdeConnect;
DeviceInterface::DeviceInterface(KdeConnectDevice *device)
: QObject(device)
, m_device(device)
{
qDebug() << "kdeconnect device iface";
}
DeviceInterface::~DeviceInterface()
......
......@@ -22,7 +22,6 @@
#include "kdeconnectdevice.h"
#include <QtDBus/QDBusReply>
#include <QtCore/QDebug>
#include <QtDBus/QDBusMetaType>
#include <QtDBus/QDBusConnectionInterface>
#include <QDBusServiceWatcher>
......@@ -70,8 +69,6 @@ QObject *KdeConnectManager::createDevice(const QString &udi)
return Q_NULLPTR;
}
qDebug() << "createDevice" << udi;
if (udi == udiPrefix()) {
RootDevice *root = new RootDevice(udiPrefix());
......@@ -90,20 +87,16 @@ QObject *KdeConnectManager::createDevice(const QString &udi)
QStringList KdeConnectManager::devicesFromQuery(const QString &parentUdi, Solid::DeviceInterface::Type type)
{
qDebug() << "DEVICES FROM QUERY";
if (!m_ready) {
qDebug() << "NOT READY";
return QStringList();
}
if (type != Solid::DeviceInterface::Battery
&& type != Solid::DeviceInterface::PortableMediaPlayer) {
qDebug() << "neither battery nor portable media player";
return QStringList();
}
if (!parentUdi.isEmpty() && parentUdi != udiPrefix()) {
qDebug() << "parent udi" << parentUdi << "is" << udiPrefix();
return QStringList();
}
......@@ -112,7 +105,6 @@ QStringList KdeConnectManager::devicesFromQuery(const QString &parentUdi, Solid:
QStringList KdeConnectManager::allDevices()
{
qDebug() << "all devices";
if (!m_ready) {
return QStringList();
}
......@@ -132,8 +124,6 @@ QStringList KdeConnectManager::allDevices()
m_devices.append(device);
}
qDebug() << "telling it" << udis;
return udis;
}
......@@ -169,9 +159,7 @@ void KdeConnectManager::onServiceUnregistered(const QString &service)
void KdeConnectManager::onDeviceAdded(const QString &id)
{
qDebug() << "Device added" << id;
if (m_devices.contains(id)) {
qDebug() << "But we already know that one";
if (m_devices.contains(id)) { // we already know that one
return;
}
......@@ -181,9 +169,7 @@ void KdeConnectManager::onDeviceAdded(const QString &id)
void KdeConnectManager::onDeviceRemoved(const QString &id)
{
qDebug() << "device removed" << id;
if (!m_devices.contains(id)) {
qDebug() << "we don't know that one";
if (!m_devices.contains(id)) { // we don't know that one
return;
}
......@@ -193,7 +179,6 @@ void KdeConnectManager::onDeviceRemoved(const QString &id)
void KdeConnectManager::onDeviceVisibilityChanged(const QString &id, bool visible)
{
qDebug() << "device" << id << "visiblity changed to" << visible;
if (visible) {
onDeviceAdded(id);
} else {
......@@ -205,5 +190,3 @@ QString KdeConnectManager::prefixedId(const QString &id) const
{
return udiPrefix() + QLatin1Char('/') + id;
}
#include "backends/kdeconnectmanager/kdeconnectmanager.moc"
......@@ -22,15 +22,13 @@
#include "kdeconnectdevice.h"
#include <QDebug>
using namespace Solid::Backends::KdeConnect;
PortableMediaPlayer::PortableMediaPlayer(KdeConnectDevice *device)
: DeviceInterface(device)
, m_id(device->deviceId())
{
qDebug() << "give me portable media player" << m_id;
}
PortableMediaPlayer::~PortableMediaPlayer()
......@@ -45,14 +43,12 @@ QStringList PortableMediaPlayer::supportedProtocols() const
QStringList PortableMediaPlayer::supportedDrivers(QString protocol) const
{
Q_UNUSED(protocol);
return QStringList();
}
QVariant PortableMediaPlayer::driverHandle(const QString &driver) const
{
qDebug() << "driver handle giving it" << m_id;
Q_UNUSED(driver);
return m_id;
}
//#include "backends/udev/udevportablemediaplayer.moc"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment