diff --git a/inc/finalmq/Qt/qt.h b/inc/finalmq/Qt/qt.h index 384b7b92..0973d88b 100644 --- a/inc/finalmq/Qt/qt.h +++ b/inc/finalmq/Qt/qt.h @@ -193,7 +193,6 @@ class QtTypeHelper m_typesToField.emplace("QBitArray", MetaField{MetaTypeId::TYPE_ARRAY_BOOL, "", "", "", 0, {}}); m_typesToField.emplace("QDate", MetaField{MetaTypeId::TYPE_INT64, "", "", "", 0, {}}); m_typesToField.emplace("QTime", MetaField{MetaTypeId::TYPE_UINT32, "", "", "", 0, {}}); - // m_typesToField.emplace("QDateTime", MetaField{ MetaTypeId::TYPE_STRUCT, "", "", "", 0, {} }); m_typesToField.emplace("QUrl", MetaField{MetaTypeId::TYPE_BYTES, "", "", "", 0, {"qttype:QUrl,qtcode:bytes"}}); m_typesToField.emplace("QLocale", MetaField{MetaTypeId::TYPE_STRING, "", "", "", 0, {}}); m_typesToField.emplace("QPixmap", MetaField{MetaTypeId::TYPE_BYTES, "", "", "", 0, {"png:true"}}); @@ -829,11 +828,14 @@ class ConnectObject : public QObject if(remoteEntity) { QVariantList args; - const QList parameterTypes = m_metaMethod.parameterTypes(); - for(int i = 0; i < parameterTypes.size(); ++i) + if (params[0] != nullptr) { - int type = QMetaType::type(parameterTypes[i]); - args.append(QVariant(type, params[i + 1])); + const QList parameterTypes = m_metaMethod.parameterTypes(); + for (int i = 0; i < parameterTypes.size(); ++i) + { + int type = QMetaType::type(parameterTypes[i]); + args.append(QVariant(type, params[i + 1])); + } } QByteArray bufferQt; diff --git a/inc/finalmq/Qt/qtdata.fmq b/inc/finalmq/Qt/qtdata.fmq index c4331136..446c852b 100644 --- a/inc/finalmq/Qt/qtdata.fmq +++ b/inc/finalmq/Qt/qtdata.fmq @@ -63,8 +63,14 @@ {"type":"FmqQGradientInterpolationMode","desc":"","entries":[ {"name":"ColorInterpolation", "id":0, "desc":""}, {"name":"ComponentInterpolation", "id":1, "desc":""} + ]}, + {"type":"FmqTimeSpec","attrs":["enumbits:8"],"desc":"","entries":[ + {"name":"LocalTime", "id":0, "desc":""}, + {"name":"UTC", "id":1, "desc":""}, + {"name":"OffsetFromUTC","id":2, "desc":""}, + {"name":"TimeZone", "id":3, "desc":""} ]} - + ], "structs":[ @@ -233,35 +239,60 @@ {"tid":"struct[]","type":"FmqQPaletteColorRole", "name":"goups", "attrs":["fixedarray:3"], "desc":"","flags":[]} ]}, + {"type":"FmqQDateTime","attrs":["qttype:QDateTime"],"desc":"","fields":[ + {"tid":"int64", "name":"date", "desc":"","flags":[]}, + {"tid":"uint32", "name":"time", "desc":"","flags":[]}, + {"tid":"enum", "type":"FmqTimeSpec", "name":"timeSpec","attrs":["abortstruct:LocalTime|UTC|OffsetFromUTC"],"desc":"","flags":[]}, + {"tid":"string", "name":"timeZone","desc":"","flags":[]} + ]}, + + {"type":"FmqQLine","attrs":["qttype:QLine"],"desc":"","fields":[ + {"tid":"struct", "type":"FmqQPoint", "name":"p1", "desc":"","flags":[]}, + {"tid":"struct", "type":"FmqQPoint", "name":"p2", "desc":"","flags":[]} + ]}, + + {"type":"FmqQLineF","attrs":["qttype:QLineF"],"desc":"","fields":[ + {"tid":"struct", "type":"FmqQPointF", "name":"p1", "desc":"","flags":[]}, + {"tid":"struct", "type":"FmqQPointF", "name":"p2", "desc":"","flags":[]} + ]}, + {"type":"FmqQVariant","attrs":["qttype:QVariant"],"desc":"desc","fields":[ - {"tid":"TYPE_UINT32","type":"","name":"typeId","attrs":["indexoffset:1,indexmode:mapping,0:0,1:1,2:2,3:3,4:4,5:5,6:6,32:7,33:8,34:9,35:10,36:11,37:12,38:13,31:14,7:15,10:16,12:17,13:18,19:19,20:20,21:21,22:22,25:23,26:24"],"desc":"desc","flags":["METAFLAG_INDEX"]}, - {"tid":"TYPE_UINT8","type":"","name":"isnull","desc":"desc","flags":[]}, - {"tid":"TYPE_UINT8","type":"","name":"valueUnknown","desc":"desc","attrs":["fixedarray:0"],"flags":[]}, - {"tid":"TYPE_BOOL", "name":"valueBool"}, - {"tid":"TYPE_INT32", "name":"valueInt"}, - {"tid":"TYPE_UINT32", "name":"valueUInt"}, - {"tid":"TYPE_INT64", "name":"valueLongLong"}, - {"tid":"TYPE_UINT64", "name":"valueULongLong"}, - {"tid":"TYPE_DOUBLE", "name":"valueDouble"}, - {"tid":"TYPE_INT32", "name":"valueLong"}, - {"tid":"TYPE_INT16", "name":"valueShort"}, - {"tid":"TYPE_INT8", "name":"valueChar"}, - {"tid":"TYPE_UINT32", "name":"valueULong"}, - {"tid":"TYPE_UINT16", "name":"valueUShort"}, - {"tid":"TYPE_UINT8", "name":"valueUChar"}, - {"tid":"TYPE_FLOAT", "name":"valueFloat"}, - {"tid":"TYPE_UINT64", "name":"valueVoidStar"}, - {"tid":"TYPE_UINT16", "name":"valueQChar"}, - {"tid":"TYPE_STRING", "name":"valueQString"}, - {"tid":"TYPE_ARRAY_STRING", "name":"valueQStringList"}, - {"tid":"TYPE_BYTES", "name":"valueQByteArray"}, - {"tid":"TYPE_ARRAY_BOOL", "name":"valueQBitArray"}, - {"tid":"TYPE_STRUCT", "type":"FmqQRect", "name":"valueQRect"}, - {"tid":"TYPE_STRUCT", "type":"FmqQRectF", "name":"valueQRectF"}, - {"tid":"TYPE_STRUCT", "type":"FmqQSize", "name":"valueQSize"}, - {"tid":"TYPE_STRUCT", "type":"FmqQSizeF", "name":"valueQSizeF"}, - {"tid":"TYPE_STRUCT", "type":"FmqQPoint", "name":"valuePoint"}, - {"tid":"TYPE_STRUCT", "type":"FmqQPointF", "name":"valuePointF"} + {"tid":"TYPE_UINT32", "type":"", "name":"typeId","attrs":["indexoffset:1,indexmode:mapping,0:0,1:1,2:2,3:3,4:4,5:5,6:6,32:7,33:8,34:9,35:10,36:11,37:12,38:13,31:14,7:15,10:16,11:17,12:18,13:19,14:20,15:21,16:22,17:23,18:24,19:25,20:26,21:27,22:28,23:29,24:30,25:31,26:32"],"desc":"desc","flags":["METAFLAG_INDEX"]}, + {"tid":"TYPE_UINT8", "type":"", "name":"isnull","desc":"desc","flags":[]}, + + {"tid":"TYPE_UINT8", "name":"valueUnknown","desc":"desc","attrs":["fixedarray:0"],"flags":[]}, + {"tid":"TYPE_BOOL", "name":"valueBool"}, + {"tid":"TYPE_INT32", "name":"valueInt"}, + {"tid":"TYPE_UINT32", "name":"valueUInt"}, + {"tid":"TYPE_INT64", "name":"valueLongLong"}, + {"tid":"TYPE_UINT64", "name":"valueULongLong"}, + {"tid":"TYPE_DOUBLE", "name":"valueDouble"}, + {"tid":"TYPE_INT32", "name":"valueLong"}, + {"tid":"TYPE_INT16", "name":"valueShort"}, + {"tid":"TYPE_INT8", "name":"valueChar"}, + {"tid":"TYPE_UINT32", "name":"valueULong"}, + {"tid":"TYPE_UINT16", "name":"valueUShort"}, + {"tid":"TYPE_UINT8", "name":"valueUChar"}, + {"tid":"TYPE_FLOAT", "name":"valueFloat"}, + {"tid":"TYPE_UINT64", "name":"valueVoidStar"}, + {"tid":"TYPE_UINT16", "name":"valueQChar"}, + {"tid":"TYPE_STRING", "name":"valueQString"}, + {"tid":"TYPE_ARRAY_STRING", "name":"valueQStringList"}, + {"tid":"TYPE_BYTES", "name":"valueQByteArray"}, + {"tid":"TYPE_ARRAY_BOOL", "name":"valueQBitArray"}, + {"tid":"TYPE_INT64", "name":"valueQDate"}, + {"tid":"TYPE_UINT32", "name":"valueQTime"}, + {"tid":"TYPE_STRUCT", "type":"FmqQDateTime", "name":"valueQDateTime"}, + {"tid":"TYPE_STRING", "name":"valueQUrl","attrs":["qttype:QUrl,qtcode:bytes"]}, + {"tid":"TYPE_STRING", "name":"valueQLocale"}, + {"tid":"TYPE_STRUCT", "type":"FmqQRect", "name":"valueQRect"}, + {"tid":"TYPE_STRUCT", "type":"FmqQRectF", "name":"valueQRectF"}, + {"tid":"TYPE_STRUCT", "type":"FmqQSize", "name":"valueQSize"}, + {"tid":"TYPE_STRUCT", "type":"FmqQSizeF", "name":"valueQSizeF"}, + {"tid":"TYPE_STRUCT", "type":"FmqQLine", "name":"valueQLine"}, + {"tid":"TYPE_STRUCT", "type":"FmqQLineF", "name":"valueQLineF"}, + {"tid":"TYPE_STRUCT", "type":"FmqQPoint", "name":"valueQPoint"}, + {"tid":"TYPE_STRUCT", "type":"FmqQPointF", "name":"valueQPointF"} ]} ]