Started working on Qt types packers/unpackers

QColor implemented
cmake will fail with Qt4 for now
This commit is contained in:
Roman
2015-04-11 22:11:44 +03:00
parent 8e3dc57316
commit e7c0ee2387
9 changed files with 189 additions and 10 deletions

View File

@@ -2,6 +2,7 @@
#include "msgpack_common.h"
#include "private/unpack_p.h"
#include "private/pack_p.h"
#include "private/qt_types_p.h"
QVariant MsgPack::unpack(const QByteArray &data)
{
@@ -35,6 +36,11 @@ bool MsgPack::registerUnpacker(qint8 msgpackType, MsgPack::unpack_user_f unpacke
return MsgPackPrivate::register_unpacker(msgpackType, unpacker);
}
bool MsgPack::registerType(QMetaType::Type qType, quint8 msgpackType)
{
return MsgPackPrivate::register_qtype(qType, msgpackType);
}
void MsgPack::setCompatibilityModeEnabled(bool enabled)
{
MsgPackPrivate::compatibilityMode = enabled;