413e3c7436ddd240dc8478d1957d24c7967ff01d
Travis runs 12.04 (old!), and there are only PPA packages for Qt 5.0.2, which contains a bug [1] (which has since been fixed in [2]) that fails the build when using clang. We have to either * wait until Travis CI moves to 14.04 [3], or * someone provides more recent Qt packages for 12.04 (unlikely). Anyway, the two builds on Travis should now pass. [1] https://bugreports.qt.io/browse/QTBUG-32100 [2] https://codereview.qt-project.org/#/c/60150/
qmsgpack
MessagePack for Qt
Installation
Clone repository:
git clone https://github.com/romixlab/qmsgpack.git
Run cmake:
cd qmsgpack
mkdir build
cd build
cmake ..
Compile:
make
Run tests and install
make tests install
Sample usage
Packing
QVariantList list;
list << 1 << 2 << 3;
QByteArray array = MsgPack::pack(list);
Unpacking:
QVariantList unpacked = MsgPack::unpack(array).toList();
By default these Qt types are supported: Int, UInt, LongLong, ULongLong, Double, QByteArray, Bool, QString, QStringList, QVariantList, QVariantMap.
Also you can provide packer and unpacker functions for any other type (even for user type defined via Q_DECLARE_METATYPE) or MsgPack type.
Thread-safety
At this time it is not thread safe to call MsgPack::registerPacker, MsgPack::registerUnpacker and MsgPack::setCompatibilityModeEnabled from different threads.
pack and unpack methods do not use any global data, so
Languages
C++
85.6%
C
7%
CMake
6.1%
QMake
1.3%