From 51039d6bfbbde485a8d87840bbbbe7fdf014dd95 Mon Sep 17 00:00:00 2001 From: Andrew Christian Date: Thu, 5 Jan 2012 07:44:21 -0500 Subject: Move QBJS_Tag to externally-visible location Programs that auto-detect file or stream formats can use the first four bytes of the qjsondocument by matching QBJS_Tag. This patch exposes the tag so that programs don't have to hardcode the 4 bytes in their code. Change-Id: I661895dd301c6d9dfae6850263c7f5b3461d3366 Reviewed-by: Lars Knoll --- src/qjson_p.h | 2 -- src/qjsonglobal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qjson_p.h b/src/qjson_p.h index 4014dbd..9175366 100644 --- a/src/qjson_p.h +++ b/src/qjson_p.h @@ -118,8 +118,6 @@ struct Object; struct Value; struct Entry; -const uint QBJS_Tag = ('q') | ('b' << 8) | ('j' << 16) | ('s' << 24); - static inline int alignedSize(int size) { return (size + 3) & ~3; } static inline bool useCompressed(const QString &s) diff --git a/src/qjsonglobal.h b/src/qjsonglobal.h index 31050f1..d35d706 100644 --- a/src/qjsonglobal.h +++ b/src/qjsonglobal.h @@ -79,6 +79,7 @@ namespace QtJson UndefinedValue = 0x80 }; + const uint QBJS_Tag = ('q') | ('b' << 8) | ('j' << 16) | ('s' << 24); } #endif // QJSONGLOBAL_H -- cgit v1.2.3