Commit 3c735968 authored by EXT Arnaud Clère's avatar EXT Arnaud Clère

Removed QName inheritance from QLatin1String to avoid breaking

invariants if QName is used in a QVector<QLatin1String>
Made encoding conversions more apprent and removed a few unnecessary
ones
parent b70e6773
......@@ -68,17 +68,48 @@ Q_DECLARE_METATYPE(QUtf8String)
//! Read-only view of a string literal using a highly-interoperable, printable, subset of ASCII that is
//! compatible with utf8, latin1 and other ANSI codepages without transformation
//! \warning This implementation does not enforce input ASCII subset
class QName : public QLatin1String
class QName
{
public:
using QLatin1String::QLatin1String;
QName() : QLatin1String(nullptr) {}
template<int Size> constexpr QName(const char(&p)[Size]) : QName(p, Size-int(sizeof('\0'))) { /*Q_ASSERT(QtPrivate::isAscii(*this));*/ }
const char* latin1() const { return data() ; }
const char* utf8() const { return data() ; }
QUtf8String toUtf8() const { return QUtf8String(data()); }
constexpr inline QName( ) : QName(nullptr ) {}
constexpr inline explicit QName(const char* s ) : QName(s, s ? int(strlen(s)) : 0) {}
/**/ inline explicit QName(const QByteArray& s ) : QName(s.constData(), s.size()) {}
template<int Size>
constexpr inline explicit QName(const char (&s)[Size]) : QName(s, Size-int(sizeof('\0'))) {}
constexpr inline explicit QName(const char* s, int sz) : QName(s, s+sz) {}
constexpr inline explicit QName(const char* s, const char *end)
: m_ascii(s, end)
{
#ifdef DEBUG
if ( s!=end ) {
if (*s < 'A' || 'z' <= *s || ('Z' < *s && *s < 'a')) qWarning("QName with non-alphabetic first char may be forbidden by IBind");
}
for (; s!=end; s++) {
if (*s < 0x20/*' '*/ || 0x7F/*DEL*/ <= *s) Q_ASSERT(false);
if (*s < '0' || 'z' <= *s || ('9' < *s && *s < 'A')
|| ('Z' < *s && *s < '_')
|| ' '== *s || *s =='a' ) qWarning("QName with non-alphanumeric or _ char may be forbidden by IBind");
}
#endif
}
constexpr inline bool isNull() const noexcept { return m_ascii.isNull(); }
constexpr inline int size() const noexcept { return m_ascii.size (); }
constexpr inline const char* ascii() const noexcept { return m_ascii.data (); }
constexpr inline const char* utf8() const noexcept { return m_ascii.data (); }
constexpr inline const char* latin1() const noexcept { return m_ascii.latin1(); }
constexpr inline operator QLatin1String() const noexcept { return m_ascii ; }
constexpr inline QLatin1String toLatin1() const noexcept { return m_ascii ; }
/**/ inline QUtf8String toUtf8 () const noexcept { return QUtf8String(m_ascii.data()); }
inline bool operator==(const char *s) const noexcept { return m_ascii==s; }
inline bool operator!=(const char *s) const noexcept { return m_ascii!=s; }
private:
QLatin1String m_ascii;
};
constexpr inline QName operator""_name(const char* s, size_t sz) { return QName(s, int(sz)); }
// //////////////////////////////////////////////////////////////////////////
// Standard error names
......@@ -679,7 +710,7 @@ struct IReader : public IBind
QByteArray ba; if (_bind(ba)) { toVariant(dst,ba); return true; }
QString t; if (_bind( t)) { dst = QVariant(t); return true; }
_setChoice(false);
if (!_null()) _reportError("Expected boolean|decimal|bytes|text|sequence|record|null");
if (!_null()) _reportError(QName("Expected boolean|decimal|bytes|text|sequence|record|null"));
/**/ dst = QVariant( ); return true;
}
......@@ -1152,7 +1183,7 @@ struct QBind<Val<Cursor>> {
double d; if ((srcRes = src.bind( d))) { dst.bind( d); return srcRes; } //! \remark Double-precision floating point numeric types can only be handled if IBind refuses to lose leading digits or precision
// TODO Other BindNative types we do not want to treat as text: QDateTime, QUuid
}
srcRes.reportError("Expected sequence|record|null|text|bytes|boolean|integer|decimal");
srcRes.reportError(QName("Expected sequence|record|null|text|bytes|boolean|integer|decimal"));
return srcRes;
}
else if (src->mode()==Write && dst->mode()==Read) { return bind(std::move(dst),std::move(src)); } // To return reader's Cursor instead of writer's Cursor since it should contain more information (mismatches, etc.)
......
......@@ -190,8 +190,8 @@ public:
/**/ Seq<Cursor> sequence(quint32* s=nullptr) { return Cursor(this).value().sequence(s); }
template<typename T> Cursor bind ( T&& t) { return Cursor(this).value().bind(std::forward<T>(t)); }
protected:
bool _sequence(quint32* =nullptr) { levels.push(Step( )); return true; }
bool _record (quint32* =nullptr) { levels.push(Step("")); return true; }
bool _sequence(quint32* =nullptr) { levels.push(Step( )); return true; }
bool _record (quint32* =nullptr) { levels.push(Step(QName(""))); return true; }
bool _null ( ) { set(QCborValue( )); return true; }
bool _bind ( const char* u8) { set(QCborValue( u8 )); return true; }
bool _bind ( bool&& b) { set(QCborValue( b )); return true; }
......@@ -238,8 +238,8 @@ public:
QUtf8String currentPath() {
QUtf8String path;
Q_FOREACH(Step s, steps) {
if (!s.key.isNull()) { path.append('{').append( s.key ); }
else { path.append('[').append(QUtf8String::number(s.idx)); }
if (!s.key.isNull()) { path.append('{').append( s.key.utf8()); }
else { path.append('[').append(QUtf8String::number(s.idx )); }
}
return path;
}
......
......@@ -65,8 +65,8 @@ public:
template<typename T> Cursor bind ( T&& t) { return Cursor(this).value().bind(std::forward<T>(t)); }
protected:
friend class QJsonReader; //!< Calls methods below for out-of-order cachedItems
bool _sequence(quint32* s=nullptr) { Q_UNUSED(s); steps.push(Step( )); return true; }
bool _record (quint32* s=nullptr) { Q_UNUSED(s); steps.push(Step("")); return true; }
bool _sequence(quint32* s=nullptr) { Q_UNUSED(s); steps.push(Step( )); return true; }
bool _record (quint32* s=nullptr) { Q_UNUSED(s); steps.push(Step(QName(""))); return true; }
bool _null ( ) { set(QJsonValue( )); return true; }
bool _bind ( const char* u8) { set(QJsonValue(u8)); return true; }
bool _bind ( bool&& b) { set(QJsonValue( b)); return true; }
......@@ -308,7 +308,7 @@ protected:
dst = QVariant(QString::fromUtf8(s)); return true;
}
_setChoice(false);
if (!_null()) _reportError("Expected boolean|decimal|bytes|text|sequence|record|null");
if (!_null()) _reportError(QName("Expected boolean|decimal|bytes|text|sequence|record|null"));
dst = QVariant(); return true;
}
......@@ -524,7 +524,7 @@ struct QBind<QJsonValue, TResult> {
quint64 u; if ((r = v.bind(u))) { j = QJsonValue(double(u)); return r; }
double d; if ((r = v.bind(d))) { j = QJsonValue( d ); return r; }
}
if (!(r = v.null())) r.reportError("Expected bool|double|QString|QJsonArray|QJsonOnject|null");
if (!(r = v.null())) r.reportError(QName("Expected bool|double|QString|QJsonArray|QJsonOnject|null"));
/**/ j = QJsonValue( ); return r;
}
else { Q_ASSERT_X(!v, Q_FUNC_INFO, "Unsupported v->mode()"); return v.null(); }
......
......@@ -205,7 +205,7 @@ protected:
if (!parent.isValid() && row==0) {
int i = m->columnCount();
m->insertColumn(i);
m->setHeaderData(i,Qt::Horizontal,n);
m->setHeaderData(i,Qt::Horizontal,n.toLatin1());
columnNames.insert(i,n.utf8());
}
}
......
......@@ -52,7 +52,7 @@ class QSettingsWriter : public IWriter
{
Q_DISABLE_COPY(QSettingsWriter)
public:
QSettingsWriter(QSettings* s) : settings(s) { Q_ASSERT(s); levels.push(Level("")); }
QSettingsWriter(QSettings* s) : settings(s) { Q_ASSERT(s); levels.push(Level(QName(""))); }
// Shortcuts
/**/ Val<Cursor> value ( ) { return Cursor(this).value(); }
......@@ -67,8 +67,8 @@ protected:
bool _bind (const char* u8) { settings->setValue(key(), QVariant (u8) ); return true; }
bool _null ( ) { settings->setValue(key(), QVariant ( ) ); return true; }
bool _sequence(quint32* =nullptr) { settings->beginGroup(key()); levels.push(Level( )); return true; }
bool _record (quint32* =nullptr) { settings->beginGroup(key()); levels.push(Level("")); return true; }
bool _sequence(quint32* =nullptr) { settings->beginGroup(key()); levels.push(Level( )); return true; }
bool _record (quint32* =nullptr) { settings->beginGroup(key()); levels.push(Level(QName(""))); return true; }
bool _item(QName n) { levels.last().key=n; return true; }
bool _item( ) { levels.last().idx++; return true; }
......@@ -76,7 +76,7 @@ protected:
private:
QString key() {
Q_ASSERT(!levels.isEmpty());
return levels.last().key!=nullptr
return !levels.last().key.isNull()
? QString (levels.last().key)
: QString::number(levels.last().idx);
}
......@@ -93,7 +93,7 @@ class QSettingsReader : public IReader
Q_DISABLE_COPY(QSettingsReader)
public:
Q_ENABLE_MOVE(QSettingsReader, std::swap(isChoice, o.isChoice); )
QSettingsReader(QSettings* s) : settings(s) { Q_ASSERT(s); levels.push(Level("")); }
QSettingsReader(QSettings* s) : settings(s) { Q_ASSERT(s); levels.push(Level(QName(""))); }
struct Error { QName error; QUtf8String path; template<class T> T bind(Val<T>&& value) { return value.bind(QUtf8String(error.utf8())+' '+path); } };
QVector<Error> errors;
......@@ -129,9 +129,9 @@ protected:
bool _bind( float& t) { return set(t, qBindExpectedDecimal ); }
bool _bind( double& t) { return set(t, qBindExpectedDecimal ); }
bool _sequence(quint32* =nullptr) { if (levels.last().isGroup) { levels.push(Level( )); return true; } _reportError(qBindExpectedSequence); return false; }
bool _record (quint32* =nullptr) { if (levels.last().isGroup) { levels.push(Level("")); return true; } _reportError(qBindExpectedRecord ); return false; }
bool _null ( ) { if (settings->value(key()).isNull()) { return true; } _reportError(qBindExpectedNull ); return false; }
bool _sequence(quint32* =nullptr) { if (levels.last().isGroup) { levels.push(Level( )); return true; } _reportError(qBindExpectedSequence); return false; }
bool _record (quint32* =nullptr) { if (levels.last().isGroup) { levels.push(Level(QName(""))); return true; } _reportError(qBindExpectedRecord ); return false; }
bool _null ( ) { if (settings->value(key()).isNull()) { return true; } _reportError(qBindExpectedNull ); return false; }
bool _item(QUtf8String& k) { levels.last().key=QName(k) ; return true; }
bool _item( ) { levels.last().idx++ ; return true; }
......@@ -145,7 +145,7 @@ private:
bool set(T& t, QName error) { QVariant v = settings->value(key()); if (v.convert(qMetaTypeId<T>())) { t = v.value<T>(); return true; } _reportError(error); return false; }
QString key() {
Q_ASSERT(!levels.isEmpty());
return levels.last().key!=nullptr
return !levels.last().key.isNull()
? QString (levels.last().key)
: QString::number(levels.last().idx);
}
......
......@@ -67,8 +67,8 @@ protected:
bool _bind (const char* u8) { set(QVariant (u8)); return true; }
bool _null ( ) { set(QVariant ( )); return true; }
bool _sequence(quint32* =nullptr) { levels.push(Level( )); return true; }
bool _record (quint32* =nullptr) { levels.push(Level("")); return true; }
bool _sequence(quint32* =nullptr) { levels.push(Level( )); return true; }
bool _record (quint32* =nullptr) { levels.push(Level(QName(""))); return true; }
bool _item(QName n) { levels.last().key=n ; return true; }
bool _item( ) { levels.last().key=QName(); return true; }
......@@ -80,7 +80,7 @@ private:
}
else {
if (!levels.last().key.isNull())
levels.last().object[levels.last().key]=v;
levels.last().object[levels.last().key.toLatin1()]=v;
else
levels.last().array.append(v);
}
......@@ -107,7 +107,7 @@ public:
QUtf8String currentPath() {
QUtf8String path;
Q_FOREACH(Level l, levels) {
if (l.key.isNull()) { path.append('{').append(l.key); }
if (l.key.isNull()) { path.append('{').append(l.key.utf8(), l.key.size()); }
else { path.append('[').append(QUtf8String::number(l.idx)); }
}
return path;
......@@ -116,7 +116,7 @@ protected:
// TODO Support _meta to be able to cache and restitute all metadata as well as data+datatype
template<typename T>
bool _bind(T& t) { if (current()->type()==qMetaTypeId<T>()) { t = current()->value<T>(); return true; } _reportError("Expected declared metatype T"); return false; }
bool _bind(T& t) { if (current()->type()==qMetaTypeId<T>()) { t = current()->value<T>(); return true; } _reportError(QName("Expected declared metatype T")); return false; }
bool _bind(QUtf8String& t) { if (current()->type()==qMetaTypeId<QUtf8String>()) { t = current()->value<QUtf8String>(); return true; } _reportError(qBindExpectedText ); return false; }
bool _bind( QString& t) { if (current()->type()==qMetaTypeId< QString>()) { t = current()->value< QString>(); return true; } _reportError(qBindExpectedText ); return false; }
......
......@@ -73,26 +73,26 @@ public:
template<typename T> Cursor bind(T&& t) { return Cursor(this).value().bind(std::forward<T>(t)); }
protected:
bool _sequence(quint32* =nullptr) { io->writeStartElement(tag("sequence")); att(); return true; }
bool _record (quint32* =nullptr) { io->writeStartElement(tag("record" )); att(); return true; }
bool _null ( ) { io->writeEmptyElement(tag("null" )); att(); return true; }
bool _bind ( const char* u8) { writeText("string" ,u8 ); return true; }
bool _bind ( bool&& b) { writeText("boolean", b ? "true" : "false"); return true; }
bool _bind ( qint64&& n) { const int s=66; char c[s]; writeText("integer", qlltoa2(c+s, n)); return true; }
bool _bind ( quint64&& n) { const int s=66; char c[s]; writeText("integer", qulltoa2(c+s, n)); return true; }
bool _bind ( float&& n) { static QUtf8String s; s.setNum(double(n),'g',std::numeric_limits< float>::max_digits10); writeText("decimal" , s ); return true; } // with specific precision
bool _bind ( double&& n) { static QUtf8String s; s.setNum( n ,'g',std::numeric_limits< double>::max_digits10); writeText("decimal" , s ); return true; } // with specific precision
bool _bind ( QByteArray&& s) { QUtf8String hex(s.size()*2+2+1,'\0'); hex.append("0x"); hex.append(s.toHex().toUpper()) ; writeText("hexBinary", hex); return true; }
bool _sequence(quint32* =nullptr) { io->writeStartElement(tag(QName("sequence"))); att(); return true; }
bool _record (quint32* =nullptr) { io->writeStartElement(tag(QName("record" ))); att(); return true; }
bool _null ( ) { io->writeEmptyElement(tag(QName("null" ))); att(); return true; }
bool _bind ( const char* u8) { writeText(QName("string" ),u8 ); return true; }
bool _bind ( bool&& b) { writeText(QName("boolean"), b ? "true" : "false"); return true; }
bool _bind ( qint64&& n) { const int s=66; char c[s]; writeText(QName("integer"), qlltoa2(c+s, n)); return true; }
bool _bind ( quint64&& n) { const int s=66; char c[s]; writeText(QName("integer"), qulltoa2(c+s, n)); return true; }
bool _bind ( float&& n) { static QUtf8String s; s.setNum(double(n),'g',std::numeric_limits< float>::max_digits10); writeText(QName("decimal" ), s ); return true; } // with specific precision
bool _bind ( double&& n) { static QUtf8String s; s.setNum( n ,'g',std::numeric_limits< double>::max_digits10); writeText(QName("decimal" ), s ); return true; } // with specific precision
bool _bind ( QByteArray&& s) { QUtf8String hex(s.size()*2+2+1,'\0'); hex.append("0x"); hex.append(s.toHex().toUpper()) ; writeText(QName("hexBinary"), hex); return true; }
bool _isOk() noexcept { return !io->hasError(); }
bool _out ( ) { io->writeEndElement(); return true; }
bool _item( ) { return true; }
bool _item(QName n) { name=n.toUtf8(); return true; }
bool _item(QName n) { name=n; return true; }
void _meta(QMetaData& m) {
for (auto&& kv : m) {
if (kv.first == qmName) {
name = kv.second;
name = QName(kv.second.utf8());
}
else {
auto found = metaData.find(kv.first);
......@@ -107,10 +107,10 @@ protected:
}
private:
void writeText(QName def, QString text) { io->writeStartElement(tag(def)); att(); io->writeCharacters(text); io->writeEndElement(); }
QString tag(QName def) { if (name.isNull()) { return def; } auto n=name; name=QUtf8String(); return QString::fromUtf8(n); }
void att() { for (auto&& a : metaData) { if (!a.second.isNull()) io->writeAttribute(a.first, QString::fromUtf8(a.second)); } }
QLatin1String tag(QName def) { if (name.isNull()) { return def.toLatin1(); } auto n=name; name=QName(); return n.toLatin1(); }
void att() { for (auto&& a : metaData) { if (!a.second.isNull()) io->writeAttribute(a.first.toLatin1(), QString::fromUtf8(a.second)); } }
QXmlStreamWriter* io;
QMetaData metaData;
QUtf8String name;
QName name;
};
......@@ -84,16 +84,16 @@ struct Person
template<class TResult> //=Cursor
TResult bind(Val<TResult>&& value) { // works with value->mode()==Read as well as Write
return value
.record("Person")
.sequence("names")
.record(QName("Person"))
.sequence(QName("names"))
.bind(firstName)
.bind( lastName)
.out()
.bind("height" ,height )
.bind("age" ,age ,-1) // reads null() as -1
.bind("phones" ,phones ) // recursive calls to QBind will take care of that part
.bind("comments",comments)
.bind("children",children)
.bind(QName("height" ),height )
.bind(QName("age" ),age ,-1) // reads null() as -1
.bind(QName("phones" ),phones ) // recursive calls to QBind will take care of that part
.bind(QName("comments"),comments)
.bind(QName("children"),children)
; // automagically closes opened record()
}
};
......@@ -161,22 +161,22 @@ struct QBind<QColor> {
v=v.meta(m);
auto dataStreamVersion = m.find(qmDataStreamVersion);
if (dataStreamVersion!=m.end()) {
if (dataStreamVersion->second.toInt()<7) { v->reportError("Unsupported QDataStream.version()");
if (dataStreamVersion->second.toInt()<7) { v->reportError(QName("Unsupported QDataStream.version()"));
return v.null();
}
return v.sequence().bind(qint8(c.spec())).bind(quint16(c.alpha())).bind(quint16(c.cyan())).bind(quint16(c.magenta())).bind(quint16(c.yellow())).bind(quint16(c.black()));
}
Rec<Cursor> r = v.record();
switch(c.spec()) {
case QColor::Spec::Rgb : r = r.sequence("RGB" ).bind(quint8(c.red ())).bind(quint8(c.green ())).bind(quint8(c.blue ())) .out(); break;
case QColor::Spec::Hsl : r = r.sequence("HSL" ).bind(qint16(c.hslHue())).bind(quint8(c.hslSaturation())).bind(quint8(c.lightness())) .out(); break;
case QColor::Spec::Hsv : r = r.sequence("HSV" ).bind(qint16(c.hsvHue())).bind(quint8(c.hsvSaturation())).bind(quint8(c.value ())) .out(); break;
case QColor::Spec::Cmyk: r = r.sequence("CMYK").bind(quint8(c.cyan ())).bind(quint8(c.magenta ())).bind(quint8(c.yellow ())).bind(quint8(c.black())).out(); break;
case QColor::Spec::Rgb : r = r.sequence(QName("RGB" )).bind(quint8(c.red ())).bind(quint8(c.green ())).bind(quint8(c.blue ())) .out(); break;
case QColor::Spec::Hsl : r = r.sequence(QName("HSL" )).bind(qint16(c.hslHue())).bind(quint8(c.hslSaturation())).bind(quint8(c.lightness())) .out(); break;
case QColor::Spec::Hsv : r = r.sequence(QName("HSV" )).bind(qint16(c.hsvHue())).bind(quint8(c.hsvSaturation())).bind(quint8(c.value ())) .out(); break;
case QColor::Spec::Cmyk: r = r.sequence(QName("CMYK")).bind(quint8(c.cyan ())).bind(quint8(c.magenta ())).bind(quint8(c.yellow ())).bind(quint8(c.black())).out(); break;
default: Q_ASSERT(false);
}
if (c.alpha()<255) { r = r.bind("alpha",quint8(c.alpha())); }
return r.bind("base",quint8(255)); // Explicits ARGBCMYKSLV components' base (H base is 360 corresponding to color wheel degrees, with -1 used for gray in addition to S being 0)
// QDebug use of float values removes need for base but may lose precision
if (c.alpha()<255) { r = r.bind(QName("alpha"),quint8(c.alpha())); }
return r.bind(QName("base"),quint8(255)); // Explicits ARGBCMYKSLV components' base (H base is 360 corresponding to color wheel degrees, with -1 used for gray in addition to S being 0)
// QDebug use of float values removes need for base but may lose precision
}
};
......@@ -982,8 +982,8 @@ Seq<Cursor> flatten(QList<Person>& ps, Seq<Cursor>&& s) {
for (auto&& p : ps) { // Iterating on ps only works for Write but flatten cannot be Read/Write anyway
s = s
.record()
.bind("first name", p.firstName )
.bind("height(ft)", p.height*3.28)
.bind(QName("first name"), p.firstName )
.bind(QName("height(ft)"), p.height*3.28)
.out()
.with(p.children, flatten);
}
......@@ -1034,10 +1034,10 @@ void doGuiExample() {
for (auto&& person : persons) { // Read would require looping while !s.item()
s = s // To keep working with the active Cursor
.record()
.item("first name")
.item(QName("first name"))
.meta(qmColor, person.age >= 42 ? "green" : "blue")
.bind(person.firstName)
.item("office phone").with([&](Val<Cursor>&& v) {
.item(QName("office phone")).with([&](Val<Cursor>&& v) {
for (auto&& phone : person.phones) {
if (phone._t == Phone::Office) {
return v.bind(phone._n);
......
============| QDebug| Text| Json| Xml| Variant| Cbor| QCborStream| Data| QDataStream| QByteArray| Bindables|Bindables>Cbor|Bindables>Json|total(usecs)|variation(%)
builtin> | 7.8| 2.1| 7.1| 29.0| 8.0| 0.9| 2.0| 1.1| 0.7| 0.1| 0.1| 1.0| 7.8| 67.5| 8.1
builtin> | 7.3| 2.1| 7.5| 31.0| 8.1| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.4| 68.8| 1.9
builtin> | 7.3| 2.2| 7.1| 28.4| 7.9| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.8| 66.1| 4.0
builtin> | 7.4| 3.4| 8.6| 30.0| 7.6| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.4| 69.8| 5.6
builtin> | 6.8| 2.1| 7.1| 31.0| 8.1| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.4| 67.9| 2.7
builtin> | 6.8| 2.1| 7.2| 30.3| 11.6| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.3| 70.7| 4.1
builtin> | 6.7| 2.2| 7.0| 27.6| 8.8| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.1| 7.4| 65.1| 7.9
builtin> | 6.8| 2.3| 7.1| 31.0| 7.6| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.4| 67.5| 3.7
builtin> | 6.8| 2.1| 7.1| 27.7| 8.0| 0.9| 1.5| 1.1| 0.7| 0.1| 0.0| 1.0| 7.4| 64.4| 4.5
builtin> | 6.8| 2.1| 7.2| 31.1| 12.8| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.7| 73.1| 13.5
builtin> | 6.8| 2.1| 7.3| 27.2| 7.7| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.4| 63.9| 12.7
builtin> | 6.7| 2.1| 7.2| 29.7| 8.0| 0.9| 1.9| 1.1| 0.7| 0.1| 0.1| 1.0| 7.8| 67.3| 5.4
builtin> | 7.2| 2.1| 7.5| 28.8| 7.9| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.8| 66.6| 1.0
builtin> | 7.2| 2.1| 7.6| 29.4| 7.9| 0.9| 1.5| 1.1| 0.7| 0.1| 0.0| 1.4| 7.8| 67.7| 1.6
builtin> | 7.4| 2.2| 7.3| 28.5| 7.6| 0.9| 1.6| 1.1| 0.7| 0.1| 0.1| 1.0| 7.5| 65.9| 38.1
builtin> | 7.5| 2.2| 7.7| 35.2| 8.0| 1.4| 1.7| 1.2| 0.7| 0.1| 0.1| 1.0| 7.9| 74.6| 13.1
builtin> | 7.7| 2.2| 7.6| 30.1| 8.0| 0.9| 1.5| 1.1| 1.1| 0.1| 0.1| 1.0| 7.9| 69.2| 7.2
builtin> | 7.7| 2.2| 7.7| 34.3| 8.0| 0.9| 1.5| 1.5| 0.7| 0.1| 0.1| 1.0| 7.9| 73.6| 6.3
builtin> | 7.7| 2.2| 7.7| 30.1| 8.0| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.9| 68.9| 6.3
builtin> | 7.6| 2.6| 7.2| 36.0| 8.0| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.4| 7.9| 75.2| 9.1
builtin> | 7.7| 2.2| 7.7| 29.7| 8.0| 1.3| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.8| 69.0| 8.2
builtin> | 7.7| 2.2| 8.2| 33.4| 8.0| 1.3| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.9| 73.2| 6.1
builtin> | 7.7| 2.2| 7.7| 30.2| 7.7| 0.9| 1.5| 1.1| 0.7| 0.1| 0.0| 1.0| 7.5| 68.3| 6.6
builtin> | 7.3| 2.2| 7.5| 28.6| 7.6| 0.9| 1.5| 1.1| 0.7| 0.1| 0.1| 1.0| 7.4| 66.0| 3.3
builtin> | 7.3| 2.2| 7.4| 28.3| 7.6| 0.9| 1.6| 1.1| 0.7| 0.1| 0.1| 1.0| 7.5| 65.6| 0.7
builtin> | 7.3| 2.2| 7.3| 30.1| 7.7| 0.9| 1.5| 1.1| 0.7| 0.1| 0.0| 1.0| 7.5| 67.4| 2.9
============| QDebug| Text| Json| Xml| Variant| Cbor| QCborStream| Data| QDataStream| QByteArray| Bindable| Bindable>Cbor| Bindable>Json|total(usecs)|variation(%)
doubles> | 14.5| 13.8| 17.6| 55.8| 22.7| 1.1| 1.4| 1.4| 1.2| 0.4| 0.0| 1.1| 17.6| 148.7| 6.7
doubles> | 14.5| 13.7| 17.5| 58.1| 22.5| 1.2| 1.4| 1.4| 1.2| 0.4| 0.0| 1.1| 17.6| 150.6| 1.3
doubles> | 14.6| 13.8| 17.5| 58.7| 22.6| 1.2| 1.5| 1.4| 1.2| 0.4| 0.0| 1.1| 17.6| 151.6| 0.7
doubles> | 14.6| 14.2| 21.7| 55.3| 26.0| 1.2| 1.4| 1.4| 1.2| 0.4| 0.0| 1.1| 17.6| 156.0| 2.9
doubles> | 15.0| 13.5| 17.4| 61.3| 21.9| 1.1| 1.4| 1.4| 1.2| 0.4| 0.0| 1.2| 17.5| 153.3| 0.2
doubles> | 15.0| 13.5| 17.6| 59.6| 21.8| 1.1| 1.3| 1.4| 1.2| 0.4| 0.0| 1.2| 17.4| 151.6| 1.1
============| QDebug| Text| Json| Xml| Variant| Cbor| QCborStream| Data| QDataStream| QByteArray| Bindable| Bindable>Cbor| Bindable>Json|total(usecs)|variation(%)
Person> | 6.1| 4.7| 13.5| 27.8| 15.1| 4.6| 4.8| 0.9| 0.7| 0.2| 0.0| 2.8| 13.7| 94.9| 6.6
Person> | 6.1| 4.8| 13.5| 28.3| 11.2| 2.8| 3.1| 1.0| 0.7| 0.2| 0.0| 2.9| 13.5| 87.8| 7.4
Person> | 6.1| 5.5| 13.7| 28.1| 11.2| 2.7| 3.1| 0.9| 0.7| 0.2| 0.0| 2.7| 13.6| 88.4| 0.6
Person> | 6.1| 4.7| 13.5| 28.0| 12.0| 2.8| 3.4| 0.9| 0.7| 0.2| 0.0| 2.8| 14.3| 89.3| 1.0
Person> | 6.6| 4.6| 13.7| 27.5| 11.0| 2.6| 3.1| 0.9| 0.7| 0.2| 0.0| 2.7| 14.2| 87.9| 0.9
Person> | 6.7| 4.7| 13.7| 27.8| 11.0| 2.7| 3.2| 0.9| 0.7| 0.2| 0.0| 2.7| 13.8| 88.0| 0.1
============| QDebug| Text| Json| Xml| Variant| Cbor| QCborStream| Data| QDataStream| QByteArray| Bindable| Bindable>Cbor| Bindable>Json|total(usecs)|variation(%)
Phone> | 2.5| 3.6| 6.1| 13.3| 5.8| 4.2| 1.1| 0.5| 0.2| 0.4| 0.0| 3.6| 6.1| 47.2| 1.8
Phone> | 2.0| 5.4| 10.1| 17.1| 5.8| 4.1| 1.1| 0.5| 0.2| 0.4| 0.0| 3.6| 6.1| 56.5| 19.5
Phone> | 2.1| 4.0| 6.1| 13.7| 5.8| 3.7| 1.2| 0.5| 0.2| 0.4| 0.0| 3.7| 6.3| 47.5| 15.8
Phone> | 2.1| 3.7| 5.6| 17.7| 5.5| 5.7| 2.5| 0.5| 0.2| 0.4| 0.0| 3.7| 5.9| 53.3| 12.2
Phone> | 2.1| 3.7| 5.7| 13.2| 5.5| 3.7| 1.1| 0.5| 0.2| 0.4| 0.0| 3.6| 5.8| 45.5| 14.6
Phone> | 2.1| 3.7| 5.7| 16.3| 5.4| 3.7| 1.1| 0.5| 0.2| 0.4| 0.0| 3.6| 5.7| 48.6| 6.6
Phone> | 2.2| 3.6| 5.7| 14.4| 9.6| 6.9| 1.2| 0.5| 0.2| 0.4| 0.0| 3.6| 5.9| 54.1| 11.5
Phone> | 2.1| 3.7| 5.6| 19.9| 8.4| 3.6| 1.1| 0.9| 0.2| 0.5| 0.0| 4.8| 13.4| 64.3| 18.7
Phone> | 4.5| 10.1| 8.7| 13.2| 6.0| 3.6| 1.1| 0.5| 0.2| 0.4| 0.0| 3.8| 5.8| 58.0| 9.8
Phone> | 2.1| 3.7| 5.8| 13.0| 5.4| 3.6| 1.1| 0.5| 0.3| 0.4| 0.0| 3.6| 5.8| 45.1| 22.2
Phone> | 2.1| 3.7| 5.7| 13.4| 5.4| 3.6| 1.1| 0.5| 0.2| 0.4| 0.0| 3.6| 5.9| 45.7| 1.2
Phone> | 2.0| 3.7| 5.7| 13.1| 5.4| 3.6| 1.1| 0.5| 0.2| 0.4| 0.0| 3.6| 5.7| 45.1| 1.2
Phone> | 2.0| 3.7| 5.7| 13.0| 5.4| 3.6| 1.1| 0.5| 0.2| 0.4| 0.0| 3.6| 5.8| 45.1| 0.1
Phone> | 2.0| 3.7| 5.7| 13.1| 5.4| 4.2| 1.4| 0.5| 0.2| 0.4| 0.0| 3.8| 5.7| 46.1| 2.2
Phone> | 2.5| 3.7| 5.5| 12.7| 5.5| 3.7| 1.1| 0.5| 0.2| 0.4| 0.0| 3.7| 5.6| 45.1| 1.4
Phone> | 2.6| 3.7| 5.7| 12.4| 6.0| 3.7| 1.1| 0.5| 0.2| 0.4| 0.0| 3.6| 5.7| 45.5| 0.9
Phone> | 2.5| 3.7| 5.5| 19.9| 5.6| 3.6| 1.2| 0.5| 0.2| 0.4| 0.0| 3.7| 5.7| 52.5| 15.3
============| Json>P| P>Json| Json>P| P>JsonValue| JsonValue>P|Json>JsonValue| Json>Cbor|total(usecs)|variation(%)
Person<>Json| 17.1| 6.6| 12.9| 9.8| 3.2| 29.1| 22.6| 101.4| 10.0
Person<>Json| 15.8| 6.6| 13.1| 9.9| 3.2| 22.8| 21.0| 92.4| 8.8
Person<>Json| 17.9| 6.6| 12.8| 9.7| 3.2| 22.9| 20.9| 93.9| 1.6
Person<>Json| 16.0| 6.6| 12.9| 9.8| 4.9| 28.5| 21.1| 99.8| 6.2
Person<>Json| 16.0| 6.6| 12.9| 9.7| 3.2| 22.9| 23.3| 94.5| 5.3
Person<>Json| 16.6| 7.0| 13.6| 10.1| 3.5| 23.9| 21.7| 96.4| 2.0
Person<>Json| 16.5| 6.9| 14.3| 10.1| 3.5| 24.0| 24.6| 100.1| 3.9
Person<>Json| 16.5| 6.5| 13.7| 10.2| 3.4| 32.2| 23.2| 105.8| 5.7
Person<>Json| 16.6| 7.0| 13.3| 10.2| 3.5| 24.0| 24.2| 98.8| 6.6
Person<>Json| 16.7| 7.0| 13.2| 10.6| 3.2| 23.8| 22.2| 96.5| 2.3
Person<>Json| 16.6| 7.0| 13.6| 10.5| 3.0| 24.2| 22.7| 97.6| 1.2
Person<>Json| 16.6| 7.0| 13.4| 10.7| 3.0| 27.4| 26.8| 104.9| 7.5
Person<>Json| 15.9| 6.6| 12.9| 9.8| 3.2| 23.9| 20.9| 93.1| 11.2
Person<>Json| 19.5| 6.7| 13.0| 10.3| 3.2| 23.8| 22.8| 99.3| 6.6
Person<>Json| 15.9| 6.6| 13.4| 12.1| 3.2| 22.3| 20.8| 94.3| 5.1
Person<>Json| 15.9| 6.6| 14.6| 10.0| 3.2| 23.4| 26.6| 100.3| 6.4
Person<>Json| 15.8| 6.6| 13.1| 9.2| 3.0| 22.2| 20.9| 90.8| 9.5
Person<>Json| 15.8| 6.6| 13.3| 9.1| 3.2| 22.2| 20.9| 91.0| 0.3
Person<>Json| 15.8| 6.6| 12.8| 9.1| 3.1| 22.6| 20.8| 90.8| 0.2
Person<>Json| 16.2| 6.6| 13.1| 9.7| 3.1| 24.5| 22.0| 95.3| 2.4
Person<>Json| 16.0| 6.6| 13.1| 9.6| 3.0| 28.3| 22.2| 98.9| 3.8
Person<>Json| 17.0| 6.7| 13.0| 9.6| 3.1| 23.9| 22.5| 95.9| 3.0
Person<>Json| 15.9| 6.6| 13.2| 9.6| 3.1| 24.5| 21.9| 94.8| 1.1
Person<>Json| 16.0| 6.6| 15.1| 11.7| 4.0| 23.9| 22.5| 99.7| 5.2
Person<>Json| 16.0| 6.6| 13.1| 9.6| 3.1| 24.3| 21.9| 94.7| 5.1
Person<>Json| 15.9| 7.9| 17.1| 12.8| 3.2| 23.8| 22.1| 102.7| 8.5
Person<>Json| 16.2| 6.7| 16.6| 9.8| 3.0| 35.8| 25.3| 113.4| 10.4
Person<>Json| 16.0| 6.8| 13.7| 10.8| 3.1| 24.4| 23.3| 98.0| 13.6
Person<>Json| 16.2| 7.4| 13.2| 9.7| 3.1| 26.3| 22.1| 97.9| 0.1
Person<>Json| 16.9| 7.8| 17.5| 9.8| 5.3| 53.5| 45.5| 156.3| 59.6
============| Cbor>P| P>Cbor| Cbor>P| QCborStream>P| P>CborValue| CborValue>P|Cbor>CborValue|CborValue>Cbor| Cbor>Json|total(usecs)|variation(%)
Person<>Cbor| 15.1| 2.8| 16.0| 6.3| 8.3| 3.9| 22.4| 8.3| 16.7| 99.8| 0.6
Person<>Cbor| 14.7| 2.8| 15.9| 6.4| 8.3| 5.9| 22.4| 8.3| 16.1| 100.9| 1.1
Person<>Cbor| 16.7| 2.7| 17.5| 6.4| 8.4| 3.9| 23.5| 8.4| 17.2| 104.7| 10.0
Person<>Cbor| 16.9| 2.7| 17.6| 6.3| 8.3| 3.9| 23.5| 8.5| 16.7| 104.3| 0.4
Person<>Cbor| 16.4| 2.7| 17.3| 6.7| 8.4| 3.8| 22.8| 8.5| 15.7| 102.2| 2.1
============| P>Settings| Settings>P| P>Settings|total(usecs)|variation(%)
Person<>Settings| 232.2| 0.6| 12.4| 245.1| 2.6
Person<>Settings| 230.0| 0.6| 11.8| 242.4| 1.1
Person<>Settings| 239.3| 0.6| 12.0| 251.8| 3.9
Person<>Settings| 229.5| 0.6| 11.7| 241.8| 4.0
Person<>Settings| 221.9| 0.6| 11.7| 234.2| 3.2
Person<>Settings| 222.5| 0.6| 11.7| 234.7| 0.2
Person<>Settings| 224.2| 0.6| 12.2| 237.0| 0.9
Person<>Settings| 244.2| 0.8| 11.8| 256.7| 9.5
Person<>Settings| 253.2| 0.8| 12.0| 266.0| 3.6
Person<>Settings| 261.6| 1.1| 11.6| 274.4| 3.2
Person<>Settings| 243.2| 0.7| 12.1| 256.1| 6.7
Person<>Settings| 244.1| 0.7| 11.2| 256.0| 0.0
Person<>Settings| 247.8| 0.8| 11.3| 259.8| 1.5
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment