Make it possible to put NetworkPackage right into qDebug
This commit is contained in:
parent
c89b032569
commit
fd19426756
2 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -101,4 +101,6 @@ private:
|
|||
|
||||
};
|
||||
|
||||
KDECONNECTCORE_EXPORT QDebug operator<<(QDebug s, const NetworkPackage& pkg);
|
||||
|
||||
#endif // NETWORKPACKAGE_H
|
||||
|
|
Loading…
Reference in a new issue