changed QMetaType::Type T to int to allow registration of custom QMetaTypes

This commit is contained in:
Enoch Carter
2016-05-26 08:51:54 -06:00
parent 098655e14e
commit 35b0e9108c
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -11,7 +11,7 @@
#include <QReadLocker>
#include <QWriteLocker>
QHash<QMetaType::Type, MsgPackPrivate::packer_t> MsgPackPrivate::user_packers;
QHash<int, MsgPackPrivate::packer_t> MsgPackPrivate::user_packers;
bool MsgPackPrivate::compatibilityMode = false;
QReadWriteLock MsgPackPrivate::packers_lock;
@@ -319,7 +319,7 @@ quint8 *MsgPackPrivate::pack_map(const QVariantMap &map, quint8 *p, bool wr, QVe
return p;
}
bool MsgPackPrivate::register_packer(QMetaType::Type q_type, qint8 msgpack_type, MsgPack::pack_user_f packer)
bool MsgPackPrivate::register_packer(int q_type, qint8 msgpack_type, MsgPack::pack_user_f packer)
{
QWriteLocker locker(&packers_lock);
if (user_packers.contains(q_type)) {