Add per-event documentation + getPluginEvents introspection

Mirror the per-method documentation pipeline for events. Events
(declared in a universal module's logos_events: section) now carry a
description parsed from their /// doc comments, and are introspectable
at runtime via a new getPluginEvents framework call.

- lidl_ast: EventDecl gains a description field.
- impl_header_parser: capture the event's doc comment (previously
  discarded) and an optional metadata.json events[].description.
- lidl_gen_provider: generated universal provider emits
  getEvents() override, mirroring getMethods() (name/signature/
  parameters/description; no returnType/isInvokable — events are void).
- logos_provider_object: default-empty virtual getEvents() so the
  legacy provider path and QtProviderObject inherit empty.
- module_proxy / qt_provider_object: intercept getPluginEvents next to
  the getPluginMethods special-case.
- docs: spec + README event-documentation notes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dario Gabriel Lipicar
2026-06-04 13:26:56 -03:00
co-authored by Claude Opus 4.8
parent 760916e97b
commit f803bb4cb0
11 changed files with 137 additions and 6 deletions
@@ -233,6 +233,7 @@ ImplParseResult parseImplHeader(const QString& headerPath,
QJsonObject evObj = ev.toObject();
EventDecl ed;
ed.name = evObj.value("name").toString();
ed.description = evObj.value("description").toString();
QJsonArray params = evObj.value("params").toArray();
for (const QJsonValue& pv : params) {
QJsonObject po = pv.toObject();
@@ -396,6 +397,7 @@ ImplParseResult parseImplHeader(const QString& headerPath,
EventDecl ed;
ed.name = md.name;
ed.params = md.params;
ed.description = joinDocLines(pendingDoc);
result.module.events.append(ed);
}
}