diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-02-06 10:36:48 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-15 17:27:24 +0100 |
commit | 556dd0228aca07dfe8443fd99e9f2ead4e13ab22 (patch) | |
tree | 4778bf8081c8e823ac298c2b3e7c591b787acac4 /src | |
parent | ded417b75a95cb5e3622f95d41f81c024aa532fb (diff) |
Add JSON support to the bootstrap library
The JSON support will get used in moc to support
the creation of plugin metadata that's embedded
into the plugin itself.
Change-Id: I3bc52b16ca0a43bc8bf9141b450045c6183b7823
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/json/qjsonarray.h | 1 | ||||
-rw-r--r-- | src/corelib/json/qjsonobject.h | 1 | ||||
-rw-r--r-- | src/corelib/plugin/quuid.cpp | 8 | ||||
-rw-r--r-- | src/corelib/plugin/quuid.h | 3 | ||||
-rw-r--r-- | src/tools/bootstrap/bootstrap.pri | 2 | ||||
-rw-r--r-- | src/tools/bootstrap/bootstrap.pro | 9 |
6 files changed, 21 insertions, 3 deletions
diff --git a/src/corelib/json/qjsonarray.h b/src/corelib/json/qjsonarray.h index 8bb1ac0b51..83b07e33c9 100644 --- a/src/corelib/json/qjsonarray.h +++ b/src/corelib/json/qjsonarray.h @@ -43,6 +43,7 @@ #define QJSONARRAY_H #include <QtCore/qjsonvalue.h> +#include <QtCore/qiterator.h> QT_BEGIN_HEADER diff --git a/src/corelib/json/qjsonobject.h b/src/corelib/json/qjsonobject.h index d2831a3cea..973a01585b 100644 --- a/src/corelib/json/qjsonobject.h +++ b/src/corelib/json/qjsonobject.h @@ -43,6 +43,7 @@ #define QJSONOBJECT_H #include <QtCore/qjsonvalue.h> +#include <QtCore/qiterator.h> QT_BEGIN_HEADER diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp index 7b1c682e21..3d7988a8fc 100644 --- a/src/corelib/plugin/quuid.cpp +++ b/src/corelib/plugin/quuid.cpp @@ -45,6 +45,9 @@ #include "qendian.h" #include "qdebug.h" +#ifndef QT_BOOTSTRAPPED +#include "qcryptographichash.h" +#endif QT_BEGIN_NAMESPACE #ifndef QT_NO_QUUID_STRING @@ -133,6 +136,7 @@ bool _q_uuidFromHex(const Char *&src, uint &d1, ushort &d2, ushort &d3, uchar (& } #endif +#ifndef QT_BOOTSTRAPPED static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCryptographicHash::Algorithm algorithm, int version) { QByteArray hashResult; @@ -155,6 +159,7 @@ static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCrypto return result; } +#endif /*! \class QUuid @@ -437,7 +442,7 @@ QUuid::QUuid(const QByteArray &text) \sa variant(), version(), createUuidV3() */ - +#ifndef QT_BOOTSTRAPPED QUuid QUuid::createUuidV3(const QUuid &ns, const QByteArray &baseData) { return createFromName(ns, baseData, QCryptographicHash::Md5, 3); @@ -447,6 +452,7 @@ QUuid QUuid::createUuidV5(const QUuid &ns, const QByteArray &baseData) { return createFromName(ns, baseData, QCryptographicHash::Sha1, 5); } +#endif /*! Creates a QUuid object from the binary representation of the UUID, as diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h index a55d6af3eb..dee97d93a5 100644 --- a/src/corelib/plugin/quuid.h +++ b/src/corelib/plugin/quuid.h @@ -43,7 +43,6 @@ #define QUUID_H #include <QtCore/qstring.h> -#include <QtCore/qcryptographichash.h> QT_BEGIN_HEADER @@ -175,6 +174,7 @@ public: } #endif static QUuid createUuid(); +#ifndef QT_BOOTSTRAPPED static QUuid createUuidV3(const QUuid &ns, const QByteArray &baseData); static QUuid createUuidV5(const QUuid &ns, const QByteArray &baseData); #ifndef QT_NO_QUUID_STRING @@ -189,6 +189,7 @@ public: } #endif +#endif QUuid::Variant variant() const; QUuid::Version version() const; diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index 8a368cb228..e34cc5c033 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -60,7 +60,7 @@ hpux-acc*|hpuxi-acc* { else:if(unix|win32-g++*):LIBS_PRIVATE += -lz else:LIBS += zdll.lib } -win32:LIBS += -luser32 +win32:LIBS += -luser32 -lole32 mac { CONFIG -= incremental diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index fdf41c55c2..1d641d2301 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -43,6 +43,7 @@ DEPENDPATH += $$INCLUDEPATH \ ../../corelib/tools \ ../../corelib/io \ ../../corelib/codecs \ + ../../corelib/json \ ../../xml SOURCES += \ @@ -72,6 +73,7 @@ SOURCES += \ ../../corelib/kernel/qmetatype.cpp \ ../../corelib/kernel/qvariant.cpp \ ../../corelib/kernel/qsystemerror.cpp \ + ../../corelib/plugin/quuid.cpp \ ../../corelib/tools/qbitarray.cpp \ ../../corelib/tools/qbytearray.cpp \ ../../corelib/tools/qbytearraymatcher.cpp \ @@ -88,6 +90,13 @@ SOURCES += \ ../../corelib/tools/qvsnprintf.cpp \ ../../corelib/xml/qxmlutils.cpp \ ../../corelib/xml/qxmlstream.cpp \ + ../../corelib/json/qjson.cpp \ + ../../corelib/json/qjsondocument.cpp \ + ../../corelib/json/qjsonobject.cpp \ + ../../corelib/json/qjsonarray.cpp \ + ../../corelib/json/qjsonvalue.cpp \ + ../../corelib/json/qjsonparser.cpp \ + ../../corelib/json/qjsonwriter.cpp \ ../../xml/dom/qdom.cpp \ ../../xml/sax/qxml.cpp |