Commit b61c518d authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Less verbosity: commented lots of QDebugs

parent faf2b61f
......@@ -134,14 +134,14 @@ void Daemon::onNewDeviceLink(const NetworkPackage& identityPackage, DeviceLink*
{
const QString& id = identityPackage.get<QString>("deviceId");
qDebug() << "Device discovered" << id << "via" << dl->provider()->name();
//qDebug() << "Device discovered" << id << "via" << dl->provider()->name();
if (mDevices.contains(id)) {
qDebug() << "It is a known device";
//qDebug() << "It is a known device";
Device* device = mDevices[id];
device->addLink(dl);
} else {
qDebug() << "It is a new device";
//qDebug() << "It is a new device";
Device* device = new Device(identityPackage, dl);
connect(device, SIGNAL(reachableStatusChanged()), this, SLOT(onDeviceReachableStatusChanged()));
......@@ -162,10 +162,12 @@ void Daemon::onDeviceReachableStatusChanged()
Q_EMIT deviceVisibilityChanged(id, device->isReachable());
qDebug() << "Device" << device->name() << "reachable status changed:" << device->isReachable();
if (!device->isReachable()) {
if (!device->isPaired()) {
qDebug() << "Destroying device";
qDebug() << "Destroying device" << device->name();
Q_EMIT deviceRemoved(id);
mDevices.remove(id);
device->deleteLater();
......
......@@ -195,7 +195,7 @@ static bool lessThan(DeviceLink* p1, DeviceLink* p2)
void Device::addLink(DeviceLink* link)
{
qDebug() << "Adding link to" << id() << "via" << link->provider();
//qDebug() << "Adding link to" << id() << "via" << link->provider();
connect(link, SIGNAL(destroyed(QObject*)),
this, SLOT(linkDestroyed(QObject*)));
......@@ -230,7 +230,7 @@ void Device::removeLink(DeviceLink* link)
{
m_deviceLinks.removeOne(link);
qDebug() << "RemoveLink" << m_deviceLinks.size() << "links remaining";
//qDebug() << "RemoveLink" << m_deviceLinks.size() << "links remaining";
if (m_deviceLinks.empty()) {
reloadPlugins();
......@@ -259,7 +259,7 @@ void Device::privateReceivedPackage(const NetworkPackage& np)
{
if (np.type() == PACKAGE_TYPE_PAIR) {
qDebug() << "Pair package";
//qDebug() << "Pair package";
bool wantsPair = np.get<bool>("pair");
......
......@@ -58,7 +58,7 @@ QByteArray NetworkPackage::serialize() const
if (!ok) {
qDebug() << "Serialization error:" << serializer.errorMessage();
} else {
qDebug() << "Serialized package:" << json;
//qDebug() << "Serialized package:" << json;
json.append('\n');
}
......@@ -67,7 +67,7 @@ QByteArray NetworkPackage::serialize() const
bool NetworkPackage::unserialize(const QByteArray& a, NetworkPackage* np)
{
qDebug() << "Unserialize: " << a;
//qDebug() << "Unserialize: " << a;
//Json -> QVariant
QJson::Parser parser;
......
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