mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
KindFlags refactor, indicator helpers, auto-padding, sizeof format fix
- Add KindFlags bitmask enum (KF_HexPreview, KF_Container, KF_String, KF_Vector) - Add helper functions: isHexPreview(), flagsFor(), allTypeNamesForUI() - Add editor helpers: clearIndicatorLine(), fillIndicatorCols(), resolvedSpanFor() - Use SCI_FINDCOLUMN for UTF-8 safe column-to-position conversion - Auto-emit hex padding nodes when changing type to smaller size - Fix struct footer format: sizeof(Name)=0x... (no spaces) - Add tests for sizeof recalculation after node deletion - Add debug output to investigate sizeof refresh issue - Replace icons.qrc with resources.qrc, add embedded fonts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -279,27 +279,28 @@ private slots:
|
||||
QVERIFY(ok);
|
||||
QCOMPARE((uint8_t)b[0], (uint8_t)0x4D);
|
||||
|
||||
// Hex32 with space-separated bytes
|
||||
// Hex32 with space-separated bytes (raw byte order, no endian conversion)
|
||||
b = fmt::parseValue(NodeKind::Hex32, "DE AD BE EF", &ok);
|
||||
QVERIFY(ok);
|
||||
QCOMPARE(b.size(), 4);
|
||||
uint32_t v32;
|
||||
memcpy(&v32, b.data(), 4);
|
||||
QCOMPARE(v32, (uint32_t)0xDEADBEEF);
|
||||
QCOMPARE((uint8_t)b[0], (uint8_t)0xDE);
|
||||
QCOMPARE((uint8_t)b[1], (uint8_t)0xAD);
|
||||
QCOMPARE((uint8_t)b[2], (uint8_t)0xBE);
|
||||
QCOMPARE((uint8_t)b[3], (uint8_t)0xEF);
|
||||
|
||||
// Hex64 with space-separated bytes
|
||||
b = fmt::parseValue(NodeKind::Hex64, "4D 5A 90 00 00 00 00 00", &ok);
|
||||
QVERIFY(ok);
|
||||
QCOMPARE(b.size(), 8);
|
||||
uint64_t v64;
|
||||
memcpy(&v64, b.data(), 8);
|
||||
QCOMPARE(v64, (uint64_t)0x4D5A900000000000ULL);
|
||||
QCOMPARE((uint8_t)b[0], (uint8_t)0x4D);
|
||||
QCOMPARE((uint8_t)b[1], (uint8_t)0x5A);
|
||||
QCOMPARE((uint8_t)b[7], (uint8_t)0x00);
|
||||
|
||||
// Hex64 continuous (should still work)
|
||||
b = fmt::parseValue(NodeKind::Hex64, "4D5A900000000000", &ok);
|
||||
QVERIFY(ok);
|
||||
memcpy(&v64, b.data(), 8);
|
||||
QCOMPARE(v64, (uint64_t)0x4D5A900000000000ULL);
|
||||
QCOMPARE((uint8_t)b[0], (uint8_t)0x4D);
|
||||
QCOMPARE((uint8_t)b[1], (uint8_t)0x5A);
|
||||
|
||||
// Hex64 with 0x prefix and spaces
|
||||
b = fmt::parseValue(NodeKind::Hex64, "0x4D 5A 90 00 00 00 00 00", &ok);
|
||||
|
||||
Reference in New Issue
Block a user