feat: adapt to new wfassoc lib for qwfassoc

This commit is contained in:
2026-08-17 10:38:39 +08:00
parent d2e5bcf2ed
commit 6687ccb143
5 changed files with 5 additions and 138 deletions
@@ -127,13 +127,6 @@ int main(int argc, char* argv[]) {
return fatal(nullptr, QString::fromUtf8(e.what()));
}
// Initialize the wfassoc runtime. WFStartup must run before most other
// wfassoc calls; if it fails we cannot proceed.
if (!wfassoc::WFStartup()) {
return fatal(nullptr,
QString::fromUtf8(wfassoc::WFGetLastError()));
}
// Build the manifest -> schema -> program pipeline and run the dialog.
// Program construction consumes the schema (move) and performs the deep
// validation (identifier format, dangling references, etc.).
@@ -147,10 +140,8 @@ int main(int argc, char* argv[]) {
qwfassoc::MainWindow window(std::move(program), scope);
exitCode = window.exec();
} catch (const std::exception& e) {
wfassoc::WFShutdown();
return fatal(nullptr, QString::fromUtf8(e.what()));
}
wfassoc::WFShutdown();
return exitCode;
}