mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +00:00
Fixed loading of types
This commit is contained in:
parent
dbf389c96c
commit
e118f91cdd
@ -3585,8 +3585,7 @@ QList<TypeDescription> CutterCore::getAllPrimitiveTypes()
|
|||||||
TypeDescription exp;
|
TypeDescription exp;
|
||||||
|
|
||||||
exp.type = typeObject[RJsonKey::type].toString();
|
exp.type = typeObject[RJsonKey::type].toString();
|
||||||
exp.size = typeObject[RJsonKey::size].toVariant().toULongLong();
|
exp.size = (int)typeObject[RJsonKey::size].toVariant().toULongLong();
|
||||||
exp.format = typeObject[RJsonKey::format].toString();
|
|
||||||
exp.category = tr("Primitive");
|
exp.category = tr("Primitive");
|
||||||
primitiveTypes << exp;
|
primitiveTypes << exp;
|
||||||
}
|
}
|
||||||
@ -3605,8 +3604,7 @@ QList<TypeDescription> CutterCore::getAllUnions()
|
|||||||
|
|
||||||
TypeDescription exp;
|
TypeDescription exp;
|
||||||
|
|
||||||
exp.type = typeObject[RJsonKey::type].toString();
|
exp.type = typeObject[RJsonKey::name].toString();
|
||||||
exp.size = typeObject[RJsonKey::size].toVariant().toULongLong();
|
|
||||||
exp.category = "Union";
|
exp.category = "Union";
|
||||||
unions << exp;
|
unions << exp;
|
||||||
}
|
}
|
||||||
@ -3625,8 +3623,8 @@ QList<TypeDescription> CutterCore::getAllStructs()
|
|||||||
|
|
||||||
TypeDescription exp;
|
TypeDescription exp;
|
||||||
|
|
||||||
exp.type = typeObject[RJsonKey::type].toString();
|
exp.type = typeObject[RJsonKey::name].toString();
|
||||||
exp.size = typeObject[RJsonKey::size].toVariant().toULongLong();
|
exp.size = 0;
|
||||||
exp.category = "Struct";
|
exp.category = "Struct";
|
||||||
structs << exp;
|
structs << exp;
|
||||||
}
|
}
|
||||||
@ -3640,9 +3638,12 @@ QList<TypeDescription> CutterCore::getAllEnums()
|
|||||||
QList<TypeDescription> enums;
|
QList<TypeDescription> enums;
|
||||||
|
|
||||||
QJsonObject typesObject = cmdj("tej").object();
|
QJsonObject typesObject = cmdj("tej").object();
|
||||||
for (QString key : typesObject.keys()) {
|
for (const QJsonValue value : typesObject.keys()) {
|
||||||
|
QJsonObject typeObject = value.toObject();
|
||||||
|
|
||||||
TypeDescription exp;
|
TypeDescription exp;
|
||||||
exp.type = key;
|
|
||||||
|
exp.type = typeObject[RJsonKey::name].toString();
|
||||||
exp.size = 0;
|
exp.size = 0;
|
||||||
exp.category = "Enum";
|
exp.category = "Enum";
|
||||||
enums << exp;
|
enums << exp;
|
||||||
@ -3657,9 +3658,12 @@ QList<TypeDescription> CutterCore::getAllTypedefs()
|
|||||||
QList<TypeDescription> typeDefs;
|
QList<TypeDescription> typeDefs;
|
||||||
|
|
||||||
QJsonObject typesObject = cmdj("ttj").object();
|
QJsonObject typesObject = cmdj("ttj").object();
|
||||||
for (QString key : typesObject.keys()) {
|
for (const QJsonValue value : typesObject.keys()) {
|
||||||
|
QJsonObject typeObject = value.toObject();
|
||||||
|
|
||||||
TypeDescription exp;
|
TypeDescription exp;
|
||||||
exp.type = key;
|
|
||||||
|
exp.type = typeObject[RJsonKey::name].toString();
|
||||||
exp.size = 0;
|
exp.size = 0;
|
||||||
exp.category = "Typedef";
|
exp.category = "Typedef";
|
||||||
typeDefs << exp;
|
typeDefs << exp;
|
||||||
|
Loading…
Reference in New Issue
Block a user