Coding style

This commit is contained in:
Albert Vaca 2017-07-14 00:19:56 +02:00
parent 83c250e9f1
commit ebbf43f760

View file

@ -58,12 +58,11 @@ NetworkPackage::NetworkPackage(const QString& type, const QVariantMap &body)
void NetworkPackage::createIdentityPackage(NetworkPackage* np) void NetworkPackage::createIdentityPackage(NetworkPackage* np)
{ {
KdeConnectConfig* config = KdeConnectConfig::instance(); KdeConnectConfig* config = KdeConnectConfig::instance();
const QString id = config->deviceId();
np->mId = QString::number(QDateTime::currentMSecsSinceEpoch()); np->mId = QString::number(QDateTime::currentMSecsSinceEpoch());
np->mType = PACKAGE_TYPE_IDENTITY; np->mType = PACKAGE_TYPE_IDENTITY;
np->mPayload = QSharedPointer<QIODevice>(); np->mPayload = QSharedPointer<QIODevice>();
np->mPayloadSize = 0; np->mPayloadSize = 0;
np->set(QStringLiteral("deviceId"), id); np->set(QStringLiteral("deviceId"), config->deviceId());
np->set(QStringLiteral("deviceName"), config->name()); np->set(QStringLiteral("deviceName"), config->name());
np->set(QStringLiteral("deviceType"), config->deviceType()); np->set(QStringLiteral("deviceType"), config->deviceType());
np->set(QStringLiteral("protocolVersion"), NetworkPackage::ProtocolVersion); np->set(QStringLiteral("protocolVersion"), NetworkPackage::ProtocolVersion);