Fixed ifdef condition in QJson resulting in big endian breakage.
authorKonstantin Tokarev <annulen@yandex.ru>
Sun, 23 Sep 2012 14:02:55 +0000 (18:02 +0400)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 24 Sep 2012 19:27:51 +0000 (21:27 +0200)
Change-Id: I3d36d75ff95ad2fe2fcbbe262f9782f0709d7041
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/corelib/json/qjson.cpp

index 2291dae..98be592 100644 (file)
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
 namespace QJsonPrivate
 {
 
-#ifdef Q_LITTLE_ENDIAN
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
 #define Q_TO_LITTLE_ENDIAN(x) (x)
 #else
 #define Q_TO_LITTLE_ENDIAN(x) ( ((x & 0xff) << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | ((x & 0xff000000) >> 24) )