summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Christian <andrew.christian@nokia.com>2012-01-05 07:44:21 -0500
committerLars Knoll <lars.knoll@nokia.com>2012-01-05 14:03:06 +0100
commit51039d6bfbbde485a8d87840bbbbe7fdf014dd95 (patch)
treeff5dfaaba8d633cee73d0103e58e2bd0f2190773
parent322703a5a74bd11b8abe984b80f4c75244fe4269 (diff)
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 <lars.knoll@nokia.com>
-rw-r--r--src/qjson_p.h2
-rw-r--r--src/qjsonglobal.h1
2 files changed, 1 insertions, 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