diff --git a/core/networkpackage.cpp b/core/networkpackage.cpp index 59bd21b04..e572a89d8 100644 --- a/core/networkpackage.cpp +++ b/core/networkpackage.cpp @@ -35,6 +35,16 @@ #include "pluginloader.h" #include "kdeconnectconfig.h" +QDebug operator<<(QDebug s, const NetworkPackage& pkg) +{ + s.nospace() << "NetworkPackage(" << pkg.type() << ':' << pkg.body(); + if (pkg.hasPayload()) { + s.nospace() << ":withpayload"; + } + s.nospace() << ')'; + return s.space(); +} + //const QCA::EncryptionAlgorithm NetworkPackage::EncryptionAlgorithm = QCA::EME_PKCS1v15; const int NetworkPackage::ProtocolVersion = 6; diff --git a/core/networkpackage.h b/core/networkpackage.h index 60a5f79a5..e84816368 100644 --- a/core/networkpackage.h +++ b/core/networkpackage.h @@ -101,4 +101,6 @@ private: }; +KDECONNECTCORE_EXPORT QDebug operator<<(QDebug s, const NetworkPackage& pkg); + #endif // NETWORKPACKAGE_H