Commit 21e1f1be authored by EXT Arnaud Clère's avatar EXT Arnaud Clère

Fixed QColor except pad member

Phone cannot be equal to QDataStream when using reflection (enum cast to
int)
parent 92d86206
......@@ -96,7 +96,7 @@ protected:
bool _item(QIdentifier& ) { return true; } // record keys are implicit, maps should be serialized as a sequence of records with key and value items
bool _item(QIdentifierLiteral) { return true; } // for QBaseWriter
void _meta(QIdentifierLiteral& n, QAsciiData& m) { if (n == qmDataStreamVersion) m=version; }
void _meta(QIdentifierLiteral& n, QAsciiData& m) { if (n.isNull()) n=qmDataStreamVersion; if (n == qmDataStreamVersion) m=version; }
private:
QDataStream* io;
QAsciiData version;
......
......@@ -166,7 +166,8 @@ struct QBind<QColor> {
if (m.utf8().toInt()<7) { v->reportError("UnsupportedQDataStreamVersion");
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()));
QRgba64 c64 = c.rgba64();
return v.sequence().bind(quint8(c.spec())).bind(quint16(c64.alpha())).bind(quint16(c64.red())).bind(quint16(c64.green())).bind(quint16(c64.blue())).bind(quint16(0)); // TODO pad
}
} while (!n.isNull());
Rec<Cursor> r = v.record();
......
......@@ -6,7 +6,7 @@ Xml |<sequence><decimal>1.33333337</decimal><decimal>3.141592653589793
Variant | 1.33333 3.14159 ascii characters are common in QDebug false [ RGB:[ 45 0 186] base:255]
Cbor |85fa3faaaaabfb400921fb54442d187825617363696920636861726163746572732061726520636f6d6d6f6e20696e20514465627567f4bf635247429f182d0018baff646261736518ffff
QCborStream |85fa3faaaaabfb400921fb54442d187825617363696920636861726163746572732061726520636f6d6d6f6e20696e20514465627567f4bf635247429f182d0018baff646261736518ffff
Data |3ff5555560000000400921fb54442d1800000026617363696920636861726163746572732061726520636f6d6d6f6e20696e2051446562756700002d00baff
Data |3ff5555560000000400921fb54442d1800000026617363696920636861726163746572732061726520636f6d6d6f6e20696e20514465627567000001ffff2d2d0000baba0000
QDataStream |3ff5555560000000400921fb54442d1800000026617363696920636861726163746572732061726520636f6d6d6f6e20696e20514465627567000001ffff2d2d0000baba0000
QByteArray |abaaaa3f182d4454fb210940617363696920636861726163746572732061726520636f6d6d6f6e20696e205144656275670001000000ffff2d2d0000baba00000000
Bindables |
......
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