fix(qt6): build errors from a11y pass + AUTOMOC hpp fix

Three QML syntax errors introduced by the a11y agents:
- CommentsDBAL.js:25 — string literal split across lines by line-wrapper
- LuaEditor.qml:50 — semicolon between sibling QML elements (invalid)
- SMTPConfigEditor.qml:48 — same semicolon issue

generate_cmake.py: list .hpp files in qt_add_executable so AUTOMOC
scans them for Q_OBJECT — required for header-only Qt classes to link
(signals/vtable are generated by moc, not the compiler).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 21:26:31 +00:00
parent 6a0a5fee41
commit 4ae463f41a
5 changed files with 15 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
# AUTO-GENERATED by generate_cmake.py — do not edit manually
# Generated from cmake_config.json | 296 QML files, 3 C++ sources, 22 SVGs, 1 audio assets
# Generated from cmake_config.json | 296 QML files, 8 C++ sources, 22 SVGs, 1 audio assets
#
# Discovered packages:
# analytics v1.0.0 - Analytics Studio
@@ -47,6 +47,11 @@ qt_add_executable(dbal-qml
main.cpp
src/DBALClient.cpp
src/PackageLoader.cpp
src/DBALRequest.hpp
src/DBALTypes.hpp
src/ModPlayer.hpp
src/NodeRegistry.hpp
src/PackageRegistry.hpp
)
target_compile_definitions(dbal-qml PRIVATE SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")

View File

@@ -211,7 +211,9 @@ def generate_cmake(config: dict, root_dir: Path) -> str:
qt_components_str = " ".join(all_components)
# Build source files list
source_files = ["main.cpp"] + cpp_sources["cpp"]
# .hpp files with Q_OBJECT must be listed so AUTOMOC scans them
hpp_headers = [h for h in cpp_sources["h"] if h.endswith(".hpp")]
source_files = ["main.cpp"] + cpp_sources["cpp"] + hpp_headers
# Collect all QML files: (path, alias_or_None)
all_qml: list[tuple[str, Optional[str]]] = []

View File

@@ -22,8 +22,8 @@ function loadComments(dbal, model) {
model.append({
commentId: c.id || (i + 1),
username: c.username || c.author || "unknown",
initials: (c.username || c.author || "
??").substring(0, 2).toUpperCase(),
initials: (c.username || c.author || "??")
.substring(0, 2).toUpperCase(),
timestamp: c.timestamp || c.createdAt || "Unknown",
body: c.body || c.text || "",
likes: c.likes || 0,

View File

@@ -47,7 +47,8 @@ Rectangle {
anchors.fill: parent; anchors.leftMargin: 16
anchors.rightMargin: 16; spacing: 12
CText { variant: "h4"; text: curName + ".lua" }
CBadge { text: curRet }; Item { Layout.fillWidth: true }
CBadge { text: curRet }
Item { Layout.fillWidth: true }
CSelect {
Layout.preferredWidth: 200
activeFocusOnTab: true

View File

@@ -45,7 +45,8 @@ Rectangle {
FlexRow {
Layout.fillWidth: true; spacing: 12
CText { variant: "h3"; text: "SMTP Configuration" }
CBadge { text: "Email" }; Item { Layout.fillWidth: true }
CBadge { text: "Email" }
Item { Layout.fillWidth: true }
CButton { text: "Reset"
variant: "ghost"; size: "sm"
activeFocusOnTab: true