diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index 125c8c15..7bdb698b 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -3601,7 +3601,7 @@ QList CutterCore::getAllPrimitiveTypes() exp.type = typeObject[RJsonKey::type].toString(); exp.size = (int)typeObject[RJsonKey::size].toVariant().toULongLong(); - exp.category = tr("Primitive"); + exp.category = "Primitive"; primitiveTypes << exp; } diff --git a/src/widgets/TypesWidget.cpp b/src/widgets/TypesWidget.cpp index 91cf9551..1687f205 100644 --- a/src/widgets/TypesWidget.cpp +++ b/src/widgets/TypesWidget.cpp @@ -275,7 +275,12 @@ void TypesWidget::on_actionExport_Types_triggered() return; } QTextStream fileOut(&file); - fileOut << Core()->cmdRaw("tc"); + for (const auto &type : types) { + if (type.category == "Primitive"){ + continue; + } + fileOut << Core()->getTypeAsC(type.type, type.category) << "\n"; + } file.close(); }