refactor(undo): de-Qt oakundo and wrap it in a pure C ABI

- strip QAbstractItemModel/QAction/signals-slots from UndoStack (UI
  concerns belong to the app layer), index_changed becomes a
  std::function callback
- decouple UndoCommand from Project via an optional modified-flag
  callback pair
- add pure C ABI in include/undo + src/undo/c_api (oakundo_ prefix,
  vtable-based command wrapper, OAKUNDO_E_* error codes)
- fix three engine-side defects: jump(0) infinite loop,
  MultiUndoCommand child leak, push_pre_executed not undoable
- add gtest suites (22 cases) and a standalone build driver
This commit is contained in:
2026-08-05 18:02:24 +08:00
parent bad52feda3
commit c50017127b
21 changed files with 2307 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
add_subdirectory(src)
add_subdirectory(c_api)
if(BUILD_TESTING)
if(BUILD_TESTS)
add_subdirectory(tests)
endif()