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>bb10
parent
ded417b75a
commit
556dd0228a
|
|
@ -43,6 +43,7 @@
|
|||
#define QJSONARRAY_H
|
||||
|
||||
#include <QtCore/qjsonvalue.h>
|
||||
#include <QtCore/qiterator.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
#define QJSONOBJECT_H
|
||||
|
||||
#include <QtCore/qjsonvalue.h>
|
||||
#include <QtCore/qiterator.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -188,6 +188,7 @@ public:
|
|||
return QUuid::createUuidV5(ns, baseData.toUtf8());
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
QUuid::Variant variant() const;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue