Turn core qWarnings into qCWarning

This commit is contained in:
Aleix Pol 2015-09-07 18:54:11 +02:00
parent 91351773fd
commit f65a1f206f
5 changed files with 9 additions and 9 deletions

View file

@ -106,7 +106,7 @@ void LanDeviceLink::dataReceived()
} else {
if (unserialized.hasPayloadTransferInfo()) {
qWarning() << "Ignoring unencrypted payload";
qCWarning(KDECONNECT_CORE) << "Ignoring unencrypted payload";
}
Q_EMIT receivedPackage(unserialized);

View file

@ -42,7 +42,7 @@ void UploadJob::start()
while (!mServer->listen(QHostAddress::Any, mPort)) {
mPort++;
if (mPort > 1764) { //No ports available?
qWarning(KDECONNECT_CORE) << "Error opening a port in range 1739-1764 for file transfer";
qCWarning(KDECONNECT_CORE) << "Error opening a port in range 1739-1764 for file transfer";
mPort = 0;
return;
}
@ -56,7 +56,7 @@ void UploadJob::newConnection()
if (mSocket || !mServer->hasPendingConnections()) return;
if (!mInput->open(QIODevice::ReadOnly)) {
qWarning() << "error when opening the input to upload";
qCWarning(KDECONNECT_CORE) << "error when opening the input to upload";
return; //TODO: Handle error, clean up...
}
@ -73,7 +73,7 @@ void UploadJob::readyRead()
qint64 bytes = qMin(mInput->bytesAvailable(), (qint64)4096);
int w = mSocket->write(mInput->read(bytes));
if (w<0) {
qWarning() << "error when writing data to upload" << bytes << mInput->bytesAvailable();
qCWarning(KDECONNECT_CORE) << "error when writing data to upload" << bytes << mInput->bytesAvailable();
break;
}
else

View file

@ -269,7 +269,7 @@ void Device::addLink(const NetworkPackage& identityPackage, DeviceLink* link)
m_protocolVersion = identityPackage.get<int>("protocolVersion");
if (m_protocolVersion != NetworkPackage::ProtocolVersion) {
qWarning() << m_deviceName << "- warning, device uses a different protocol version" << m_protocolVersion << "expected" << NetworkPackage::ProtocolVersion;
qCWarning(KDECONNECT_CORE) << m_deviceName << "- warning, device uses a different protocol version" << m_protocolVersion << "expected" << NetworkPackage::ProtocolVersion;
}
connect(link, SIGNAL(destroyed(QObject*)),

View file

@ -41,7 +41,7 @@ FileTransferJob::FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64
Q_ASSERT(mOrigin);
Q_ASSERT(mOrigin->isReadable());
if (mDestination.scheme().isEmpty()) {
qWarning() << "Destination QUrl" << mDestination << "lacks a scheme. Setting its scheme to 'file'.";
qCWarning(KDECONNECT_CORE) << "Destination QUrl" << mDestination << "lacks a scheme. Setting its scheme to 'file'.";
mDestination.setScheme("file");
}

View file

@ -20,7 +20,7 @@
#include "kdeconnectplugin.h"
#include <QDebug>
#include "core_debug.h"
struct KdeConnectPluginPrivate
{
@ -69,9 +69,9 @@ Device const* KdeConnectPlugin::device() const
bool KdeConnectPlugin::sendPackage(NetworkPackage& np) const
{
if(!d->mOutgoingTypes.contains(np.type())) {
qWarning() << metaObject()->className() << "tried to send an unsupported package type" << np.type() << ". Supported:" << d->mOutgoingTypes;
qCWarning(KDECONNECT_CORE) << metaObject()->className() << "tried to send an unsupported package type" << np.type() << ". Supported:" << d->mOutgoingTypes;
return false;
}
// qWarning() << metaObject()->className() << "sends" << np.type() << ". Supported:" << d->mOutgoingTypes;
// qCWarning(KDECONNECT_CORE) << metaObject()->className() << "sends" << np.type() << ". Supported:" << d->mOutgoingTypes;
return d->mDevice->sendPackage(np);
}