packing is done, except for user types

This commit is contained in:
romixlab
2014-09-18 22:10:51 +04:00
parent b9d3164213
commit 0e5c49f36d
8 changed files with 566 additions and 130 deletions

View File

@@ -16,6 +16,8 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
Q_UNUSED(argc)
Q_UNUSED(argv)
//QCoreApplication a(argc, argv); //QCoreApplication a(argc, argv);
// qDebug() << "MsgPack"; // qDebug() << "MsgPack";
@@ -24,10 +26,16 @@ int main(int argc, char *argv[])
QVariantList l; QVariantList l;
l << "abcdefhijkabcdefhijkabcdefhijk12"; QVariantMap map;
QByteArray arr = MsgPack::pack(l); map["key"] = "val";
map["key2"] = 123;
map["key3"] = 1.2;
l << map;
qDebug() << l[0].type();
QByteArray arr = MsgPack::pack(map);
qDebug() << arr.toBase64(); qDebug() << arr.toBase64();
return 0; return 0;
//return a.exec(); //return a.exec();
} }

View File

@@ -24,4 +24,5 @@ HEADERS += \
msgpack.h \ msgpack.h \
private/pack_p.h \ private/pack_p.h \
private/unpack_p.h \ private/unpack_p.h \
private/sysdep.h private/sysdep.h \
msgpack_common.h

View File

@@ -2,11 +2,14 @@
#define MSGPACK_H #define MSGPACK_H
#include <QByteArray> #include <QByteArray>
#include <QVariantList> #include <QVariantList>
#include "msgpack_common.h"
namespace MsgPack namespace MsgPack
{ {
QVariant unpack(const QByteArray &data); QVariant unpack(const QByteArray &data);
QByteArray pack(const QVariant &variant); QByteArray pack(const QVariant &variant);
bool registerPacker(QMetaType::Type qType, qint8 msgpackType, pack_user_f packer);
} }
#endif // MSGPACK_H #endif // MSGPACK_H

10
msgpack_common.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef COMMON_H
#define COMMON_H
#include <QVariant>
namespace MsgPack {
typedef quint8 * (pack_user_f)(const QVariant &t, quint8 *p, bool wr);
}
#endif // COMMON_H

View File

@@ -1,41 +1,235 @@
#include "pack_p.h" #include "pack_p.h"
#include "private/sysdep.h"
quint8 *MsgPackPrivate::pack(const QVariant &v, quint8 *p, bool wr)
quint8 *MsgPackPrivate::pack(const QVariant &v, quint8 *p, bool sp)
{ {
QMetaType::Type t = (QMetaType::Type)v.type(); QMetaType::Type t = (QMetaType::Type)v.type();
if (t == QMetaType::Int) if (t == QMetaType::Int)
p = pack_int(v, p, sp); p = pack_int(v.toInt(), p, wr);
else if (t == QMetaType::UInt)
p = pack_uint(v.toInt(), p, wr);
else if (t == QMetaType::Bool) else if (t == QMetaType::Bool)
p = pack_bool(v, p, sp); p = pack_bool(v, p, wr);
else if (t == QMetaType::QString)
p = pack_string(v.toString(), p, wr);
else if (t == QMetaType::QVariantList) else if (t == QMetaType::QVariantList)
p = pack_list(v, p, sp); p = pack_list(v.toList(), p, wr);
else if (t == QMetaType::LongLong)
p = pack_longlong(v.toLongLong(), p, wr);
else if (t == QMetaType::ULongLong)
p = pack_ulonglong(v.toULongLong(), p, wr);
else if (t == QMetaType::Double)
p = pack_double(v.toDouble(), p, wr);
else if (t == QMetaType::QByteArray)
p = pack_array(v.toByteArray(), p, wr);
else if (t == QMetaType::QVariantMap)
p = pack_map(v.toMap(), p, wr);
return p; return p;
} }
quint8 *MsgPackPrivate::pack_int(const QVariant &v, quint8 *p, bool sp) quint8 *MsgPackPrivate::pack_int(qint32 i, quint8 *p, bool wr)
{ {
if (i >= -32 && i <= 127) {
qint32 val = _msgpack_be32(i);
if (wr) *p = *( (quint8 *)&val + 3 );
p++;
} else if (i >= -128 && i <= 255) {
if (wr) *p = i > 0 ? 0xcc : 0xd0;
p++;
if (wr) *p = i;
p++;
} else if (i >= -32768 && i <= 65535) {
if (wr) *p = i > 0 ? 0xcd : 0xd1;
p++;
if (wr) _msgpack_store16(p, i);
p += 2;
} else {
if (wr) *p = i > 0 ? 0xce : 0xd2;
p++;
if (wr) _msgpack_store32(p, i);
p += 4;
} }
return p;
}
quint8 *MsgPackPrivate::pack_bool(const QVariant &v, quint8 *p, bool sp) quint8 *MsgPackPrivate::pack_uint(quint32 i, quint8 *p, bool wr)
{ {
if (!sp) if (i <= 127) {
qint32 val = _msgpack_be32(i);
if (wr) *p = *( (quint8 *)&val + 3 );
p++;
} else if (i <= 255) {
if (wr) *p = 0xcc;
p++;
if (wr) *p = i;
p++;
} else if (i <= 65535) {
if (wr) *p = 0xcd;
p++;
if (wr) _msgpack_store16(p, i);
p += 2;
} else {
if (wr) *p = 0xce;
p++;
if (wr) _msgpack_store32(p, i);
p += 4;
}
return p;
}
quint8 *MsgPackPrivate::pack_longlong(qint64 i, quint8 *p, bool wr)
{
if (i >= -2147483648 && i <= 2147483647)
return p = pack_int(i, p, wr);
if (wr) *p = 0xd3;
p++;
if (wr) _msgpack_store64(p, i);
return p += 8;
}
quint8 *MsgPackPrivate::pack_ulonglong(quint64 i, quint8 *p, bool wr)
{
if (i <= 4294967295)
return pack_uint(i, p, wr);
if (wr) *p = 0xcf;
p++;
if (wr) _msgpack_store64(p, i);
return p += 8;
}
quint8 *MsgPackPrivate::pack_bool(const QVariant &v, quint8 *p, bool wr)
{
if (wr)
*p = v.toBool() ? 0xc3 : 0xc2; *p = v.toBool() ? 0xc3 : 0xc2;
return p + 1; return p + 1;
} }
quint8 *MsgPackPrivate::pack_list(const QVariantList &list, quint8 *p, bool wr)
quint8 *MsgPackPrivate::pack_list(const QVariant &v, quint8 *p, bool sp)
{ {
QVariantList list = v.toList(); int len = list.length();
//pack_int(...) if (len <= 15) {
if (!sp) if (wr) *p = 0x90 | len;
*p = 0x92; // 2el
p++; p++;
foreach (QVariant item, v.toList()) } else {
p = pack(item, p, sp); if (len <= 65535) {
if (wr) *p = 0xdc;
p++;
_msgpack_store16(p, len);
p += 2;
} else {
if (wr) *p = 0xdd;
p++;
_msgpack_store32(p, len);
p += 4;
}
}
foreach (QVariant item, list)
p = pack(item, p, wr);
return p;
}
quint8 *MsgPackPrivate::pack_string(const QString &str, quint8 *p, bool wr)
{
int len = str.length();
if (len <= 31) {
if (wr) *p = 0xa0 | len;
p++;
} else if (len <= 255) {
if (wr) *p = 0xd9;
p++;
if (wr) *p = len;
p++;
} else if (len <= 65535) {
if (wr) *p = 0xda;
p++;
if (wr) _msgpack_store16(p, len);
p += 2;
} else {
if (wr) *p = 0xdb;
p++;
if (wr) _msgpack_store32(p, len);
p += 4;
}
if (wr) memcpy(p, str.toUtf8().data(), len);
p += len;
return p;
}
quint8 *MsgPackPrivate::pack_double(double i, quint8 *p, bool wr)
{
if (wr) *p = 0xcb;
p++;
if (wr) {
quint8 *d = (quint8 *)&i;
#ifdef __LITTLE_ENDIAN__
for (int i = 0; i < 8; ++i)
*(p + 7 - i) = *(d + i);
#else
for (int i = 0; i < 8; ++i)
*(p + i) = *(d + i);
#endif
}
return p += 8;
}
quint8 *MsgPackPrivate::pack_array(const QByteArray &arr, quint8 *p, bool wr)
{
int len = arr.length();
if (len <= 255) {
if (wr) *p = 0xc4;
p++;
if (wr) *p = len;
p++;
} else if (len <= 65535) {
if (wr) *p = 0xc5;
p++;
if (wr) _msgpack_store16(p, len);
p += 2;
} else {
if (wr) *p = 0xc6;
p++;
if (wr) _msgpack_store32(p, len);
p += 4;
}
if (wr) memcpy(p, arr.data(), len);
p += len;
return p;
}
quint8 *MsgPackPrivate::pack_map(const QVariantMap &map, quint8 *p, bool wr)
{
QMapIterator<QString, QVariant> it(map);
int len = 0;
while (it.hasNext()) {
it.next();
len++;
}
if (len <= 15) {
if (wr) *p = 0x80 | len;
p++;
} else if (len <= 65535) {
if (wr) *p = 0xde;
p++;
if (wr) _msgpack_store16(p, len);
p += 2;
} else {
if (wr) *p = 0xdf;
p++;
if (wr) _msgpack_store32(p, len);
p += 4;
}
it.toFront();
while (it.hasNext()) {
it.next();
p = pack(it.key(), p, wr);
p = pack(it.value(), p, wr);
}
return p; return p;
} }

View File

@@ -1,18 +1,31 @@
#ifndef PACK_P_H #ifndef PACK_P_H
#define PACK_P_H #define PACK_P_H
#include <QVariant> #include <QVariant>
#include "../msgpack_common.h"
namespace MsgPackPrivate { namespace MsgPackPrivate {
/* if sp (size probe) == true, packer just moves pointer forward /* if wr (write) == false, packer just moves pointer forward
* *
*/ */
QHash<int, MsgPack::pack_user_f> user_packers;
quint8 * pack(const QVariant &v, quint8 *p, bool wr);
quint8 * pack_int(qint32 i, quint8 *p, bool wr);
quint8 * pack_uint(quint32 i, quint8 *p, bool wr);
quint8 * pack_longlong(qint64 i, quint8 *p, bool wr);
quint8 * pack_ulonglong(quint64 i, quint8 *p, bool wr);
quint8 * pack_bool(const QVariant &v, quint8 *p, bool wr);
quint8 * pack_list(const QVariantList &list, quint8 *p, bool wr);
quint8 * pack_string(const QString &str, quint8 *p, bool wr);
quint8 * pack_double(double i, quint8 *p, bool wr);
quint8 * pack_array(const QByteArray &arr, quint8 *p, bool wr);
quint8 * pack_map(const QVariantMap &map, quint8 *p, bool wr);
quint8 * pack(const QVariant &v, quint8 *p, bool sp);
quint8 * pack_int(const QVariant &v, quint8 *p, bool sp);
quint8 * pack_bool(const QVariant &v, quint8 *p, bool sp);
quint8 * pack_list(const QVariant &v, quint8 *p, bool sp);
} }

View File

@@ -17,51 +17,9 @@
*/ */
#ifndef MSGPACK_SYSDEP_H__ #ifndef MSGPACK_SYSDEP_H__
#define MSGPACK_SYSDEP_H__ #define MSGPACK_SYSDEP_H__
#include <qglobal.h>
#include <stdlib.h> #ifndef _WIN32
#include <stddef.h>
#if defined(_MSC_VER) && _MSC_VER < 1600
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#elif defined(_MSC_VER) // && _MSC_VER >= 1600
#include <stdint.h>
#else
#include <stdint.h>
#include <stdbool.h>
#endif
#ifdef _WIN32
#define _msgpack_atomic_counter_header <windows.h>
typedef long _msgpack_atomic_counter_t;
#define _msgpack_sync_decr_and_fetch(ptr) InterlockedDecrement(ptr)
#define _msgpack_sync_incr_and_fetch(ptr) InterlockedIncrement(ptr)
#elif defined(__GNUC__) && ((__GNUC__*10 + __GNUC_MINOR__) < 41)
#define _msgpack_atomic_counter_header "gcc_atomic.h"
#else
typedef unsigned int _msgpack_atomic_counter_t;
#define _msgpack_sync_decr_and_fetch(ptr) __sync_sub_and_fetch(ptr, 1)
#define _msgpack_sync_incr_and_fetch(ptr) __sync_add_and_fetch(ptr, 1)
#endif
#ifdef _WIN32
#ifdef __cplusplus
/* numeric_limits<T>::min,max */
#ifdef max
#undef max
#endif
#ifdef min
#undef min
#endif
#endif
#else
#include <arpa/inet.h> /* __BYTE_ORDER */ #include <arpa/inet.h> /* __BYTE_ORDER */
#endif #endif
@@ -85,8 +43,8 @@ typedef unsigned int _msgpack_atomic_counter_t;
# define _msgpack_be16(x) ((uint16_t)_byteswap_ushort((unsigned short)x)) # define _msgpack_be16(x) ((uint16_t)_byteswap_ushort((unsigned short)x))
# else # else
# define _msgpack_be16(x) ( \ # define _msgpack_be16(x) ( \
((((uint16_t)x) << 8) ) | \ ((((quint16)x) << 8) ) | \
((((uint16_t)x) >> 8) ) ) ((((quint16)x) >> 8) ) )
# endif # endif
#else #else
# define _msgpack_be16(x) ntohs(x) # define _msgpack_be16(x) ntohs(x)
@@ -99,10 +57,10 @@ typedef unsigned int _msgpack_atomic_counter_t;
# define _msgpack_be32(x) ((uint32_t)_byteswap_ulong((unsigned long)x)) # define _msgpack_be32(x) ((uint32_t)_byteswap_ulong((unsigned long)x))
# else # else
# define _msgpack_be32(x) \ # define _msgpack_be32(x) \
( ((((uint32_t)x) << 24) ) | \ ( ((((quint32)x) << 24) ) | \
((((uint32_t)x) << 8) & 0x00ff0000U ) | \ ((((quint32)x) << 8) & 0x00ff0000U ) | \
((((uint32_t)x) >> 8) & 0x0000ff00U ) | \ ((((quint32)x) >> 8) & 0x0000ff00U ) | \
((((uint32_t)x) >> 24) ) ) ((((quint32)x) >> 24) ) )
# endif # endif
#else #else
# define _msgpack_be32(x) ntohl(x) # define _msgpack_be32(x) ntohl(x)
@@ -116,35 +74,35 @@ typedef unsigned int _msgpack_atomic_counter_t;
# define _msgpack_be64(x) __DARWIN_OSSwapInt64(x) # define _msgpack_be64(x) __DARWIN_OSSwapInt64(x)
#else #else
#define _msgpack_be64(x) \ #define _msgpack_be64(x) \
( ((((uint64_t)x) << 56) ) | \ ( ((((quint64)x) << 56) ) | \
((((uint64_t)x) << 40) & 0x00ff000000000000ULL ) | \ ((((quint64)x) << 40) & 0x00ff000000000000ULL ) | \
((((uint64_t)x) << 24) & 0x0000ff0000000000ULL ) | \ ((((quint64)x) << 24) & 0x0000ff0000000000ULL ) | \
((((uint64_t)x) << 8) & 0x000000ff00000000ULL ) | \ ((((quint64)x) << 8) & 0x000000ff00000000ULL ) | \
((((uint64_t)x) >> 8) & 0x00000000ff000000ULL ) | \ ((((quint64)x) >> 8) & 0x00000000ff000000ULL ) | \
((((uint64_t)x) >> 24) & 0x0000000000ff0000ULL ) | \ ((((quint64)x) >> 24) & 0x0000000000ff0000ULL ) | \
((((uint64_t)x) >> 40) & 0x000000000000ff00ULL ) | \ ((((quint64)x) >> 40) & 0x000000000000ff00ULL ) | \
((((uint64_t)x) >> 56) ) ) ((((quint64)x) >> 56) ) )
#endif #endif
#define _msgpack_load16(cast, from) ((cast)( \ #define _msgpack_load16(cast, from) ((cast)( \
(((uint16_t)((uint8_t*)(from))[0]) << 8) | \ (((quint16)((quint8*)(from))[0]) << 8) | \
(((uint16_t)((uint8_t*)(from))[1]) ) )) (((quint16)((quint8*)(from))[1]) ) ))
#define _msgpack_load32(cast, from) ((cast)( \ #define _msgpack_load32(cast, from) ((cast)( \
(((uint32_t)((uint8_t*)(from))[0]) << 24) | \ (((quint32)((quint8*)(from))[0]) << 24) | \
(((uint32_t)((uint8_t*)(from))[1]) << 16) | \ (((quint32)((quint8*)(from))[1]) << 16) | \
(((uint32_t)((uint8_t*)(from))[2]) << 8) | \ (((quint32)((quint8*)(from))[2]) << 8) | \
(((uint32_t)((uint8_t*)(from))[3]) ) )) (((quint32)((quint8*)(from))[3]) ) ))
#define _msgpack_load64(cast, from) ((cast)( \ #define _msgpack_load64(cast, from) ((cast)( \
(((uint64_t)((uint8_t*)(from))[0]) << 56) | \ (((quint64)((quint8*)(from))[0]) << 56) | \
(((uint64_t)((uint8_t*)(from))[1]) << 48) | \ (((quint64)((quint8*)(from))[1]) << 48) | \
(((uint64_t)((uint8_t*)(from))[2]) << 40) | \ (((quint64)((quint8*)(from))[2]) << 40) | \
(((uint64_t)((uint8_t*)(from))[3]) << 32) | \ (((quint64)((quint8*)(from))[3]) << 32) | \
(((uint64_t)((uint8_t*)(from))[4]) << 24) | \ (((quint64)((quint8*)(from))[4]) << 24) | \
(((uint64_t)((uint8_t*)(from))[5]) << 16) | \ (((quint64)((quint8*)(from))[5]) << 16) | \
(((uint64_t)((uint8_t*)(from))[6]) << 8) | \ (((quint64)((quint8*)(from))[6]) << 8) | \
(((uint64_t)((uint8_t*)(from))[7]) ) )) (((quint64)((quint8*)(from))[7]) ) ))
#else #else
@@ -153,33 +111,33 @@ typedef unsigned int _msgpack_atomic_counter_t;
#define _msgpack_be64(x) (x) #define _msgpack_be64(x) (x)
#define _msgpack_load16(cast, from) ((cast)( \ #define _msgpack_load16(cast, from) ((cast)( \
(((uint16_t)((uint8_t*)from)[0]) << 8) | \ (((quint16)((quint8*)from)[0]) << 8) | \
(((uint16_t)((uint8_t*)from)[1]) ) )) (((quint16)((quint8*)from)[1]) ) ))
#define _msgpack_load32(cast, from) ((cast)( \ #define _msgpack_load32(cast, from) ((cast)( \
(((uint32_t)((uint8_t*)from)[0]) << 24) | \ (((quint32)((quint8*)from)[0]) << 24) | \
(((uint32_t)((uint8_t*)from)[1]) << 16) | \ (((quint32)((quint8*)from)[1]) << 16) | \
(((uint32_t)((uint8_t*)from)[2]) << 8) | \ (((quint32)((quint8*)from)[2]) << 8) | \
(((uint32_t)((uint8_t*)from)[3]) ) )) (((quint32)((quint8*)from)[3]) ) ))
#define _msgpack_load64(cast, from) ((cast)( \ #define _msgpack_load64(cast, from) ((cast)( \
(((uint64_t)((uint8_t*)from)[0]) << 56) | \ (((quint64)((quint8*)from)[0]) << 56) | \
(((uint64_t)((uint8_t*)from)[1]) << 48) | \ (((quint64)((quint8*)from)[1]) << 48) | \
(((uint64_t)((uint8_t*)from)[2]) << 40) | \ (((quint64)((quint8*)from)[2]) << 40) | \
(((uint64_t)((uint8_t*)from)[3]) << 32) | \ (((quint64)((quint8*)from)[3]) << 32) | \
(((uint64_t)((uint8_t*)from)[4]) << 24) | \ (((quint64)((quint8*)from)[4]) << 24) | \
(((uint64_t)((uint8_t*)from)[5]) << 16) | \ (((quint64)((quint8*)from)[5]) << 16) | \
(((uint64_t)((uint8_t*)from)[6]) << 8) | \ (((quint64)((quint8*)from)[6]) << 8) | \
(((uint64_t)((uint8_t*)from)[7]) ) )) (((quint64)((quint8*)from)[7]) ) ))
#endif #endif
#define _msgpack_store16(to, num) \ #define _msgpack_store16(to, num) \
do { uint16_t val = _msgpack_be16(num); memcpy(to, &val, 2); } while(0) do { quint16 val = _msgpack_be16(num); memcpy(to, &val, 2); } while(0)
#define _msgpack_store32(to, num) \ #define _msgpack_store32(to, num) \
do { uint32_t val = _msgpack_be32(num); memcpy(to, &val, 4); } while(0) do { quint32 val = _msgpack_be32(num); memcpy(to, &val, 4); } while(0)
#define _msgpack_store64(to, num) \ #define _msgpack_store64(to, num) \
do { uint64_t val = _msgpack_be64(num); memcpy(to, &val, 8); } while(0) do { quint64 val = _msgpack_be64(num); memcpy(to, &val, 8); } while(0)
/* /*
#define _msgpack_load16(cast, from) \ #define _msgpack_load16(cast, from) \
@@ -190,19 +148,5 @@ typedef unsigned int _msgpack_atomic_counter_t;
({ cast val; memcpy(&val, (char*)from, 8); _msgpack_be64(val); }) ({ cast val; memcpy(&val, (char*)from, 8); _msgpack_be64(val); })
*/ */
#if !defined(__cplusplus) && defined(_MSC_VER)
#if !defined(FALSE)
#define FALSE (0)
#endif
#if !defined(TRUE)
#define TRUE (!FALSE)
#endif
#define bool int
#define true TRUE
#define false FALSE
#define inline __inline
#endif
#endif /* msgpack/sysdep.h */ #endif /* msgpack/sysdep.h */

263
qmsgpack.pro.user Normal file
View File

@@ -0,0 +1,263 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.2, 2014-09-12T10:17:42. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.3 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.3 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.53.gcc_64_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/roman/build/build-qmsgpack-Desktop_Qt_5_3_GCC_64bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Очистка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Отладка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/roman/build/build-qmsgpack-Desktop_Qt_5_3_GCC_64bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Очистка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Выпуск</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Установка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Локальная установка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmsgpack</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/roman/git/msgpack-qt/qmsgpack.pro</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">qmsgpack.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QByteArray">{478d7604-9791-49cc-a5a5-2eb4eeaa05bd}</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">15</value>
</data>
</qtcreator>