mirror of
https://github.com/logos-co/logos-test-modules.git
synced 2026-08-27 10:11:12 +00:00
`[int]` / `[uint]` / `[float64]` / `[bool]` are QList<qlonglong> /
QList<qulonglong> / QList<double> / QList<bool> on the generated Qt consumer
surface now, not QVariantList. `[tstr]` (QStringList), `[any]` (QVariantList)
and `{tstr:any}` (QVariantMap) are unchanged — `any` is the one LIDL type with
no narrower Qt spelling.
Three modules in this repo consume full_api through that surface and stopped
compiling: test_fullapi_qtproxy (20 errors), test_fullapi_ui (8) and
test_uiqml_probe (3). The first two were reported; the third was not — it
reaches the same wrappers through `type: ui_qml`, which selects the Qt consumer
by a different rule than qtproxy's explicit `codegen.consumer_api_style: "qt"`.
Two things beyond the type spellings, because compiling is not the bar:
* test_fullapi_qtproxy's renderer. renderVariant() switches on userType(),
and QVariant has no implicit constructor for a typed QList, so the four
list probes would not even have compiled as a QVariant. renderTypedList()
renders the ELEMENTS through renderVariant(), which reproduces the previous
QVariantList string byte-for-byte (`[i:1,i:2]`, `[B:t,B:f]`) so a recorded
sync-vs-async diff still compares. The same four metatypes are also
dispatched from renderVariant() itself, ahead of the switch, so a QVariant
that ever does carry one cannot render as `?QList<qlonglong>:`.
* test_uiqml_probe's report. logos::qvariantToNlohmann matches a CLOSED
userType() set that a typed QList is not in, so
QVariant::fromValue(QList<qulonglong>) dumps as `null` — the report would
have silently lost the value it exists to show. boxed() puts the elements
back into a QVariantList before dumping.
One real behavioural change is recorded rather than smoothed over: the probe's
NATIVE slots still declare QVariantList (that is what QML's JS->C++ conversion
produces, and measuring it is the point), so a hostile element — a double where
the contract says uint — used to ride out to the provider and be REFUSED by its
std decode. The surface type can no longer carry it, so narrowed() converts at
the boundary instead. The refusal is still measured: the QString slots decode
with fromJson<std::vector<T>> and answer REJECTED before forwarding.
This commit is LOCKSTEP with logos-cpp-sdk / logos-qt-sdk feat/lossless-qt-types
— these sources do not compile against the SDK pair on master, and the master
sources do not compile against the pair on the branch. Verified: all three
modules (and test_fullapi_ui's second codegen variant) build green against
logos-cpp-sdk 621772a + logos-qt-sdk 09c1a5b, and fail against both masters.