fix(tools): 5 checker UI hỏng sau đợt tách widget R08
`tools/` không đổi một byte nào giữa hai bản, nhưng 5 checker vẫn chết vì chúng tìm control bằng `getattr(root, "ten")` trên đúng widget cũ — mà R08 đã dời control xuống widget con. Thêm ba helper dùng chung vào `capture_screens.py`: * `_own_member` — tên do app khai trên widget, không phải thừa kế từ Qt * `owner_of` — widget thật sự đang giữ tên đó, duyệt theo bề rộng * `control` — lấy control dù nó nằm ở cấp nào `check_controls_alive` từ "MẤT 24 control" về 0, kèm liệt kê 22 control đã đổi chỗ và 2 cái đổi tên. `check_probes_bite` từ 1/4 lên 6/6 phép cấy lỗi đều bị bắt — phép cấy thứ hai trỏ vào `ui/schedule_task_tab.py` đã bị xoá, nay trỏ vào `presentation/scheduling/kanban_board_widget.py`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
|
||||
|
||||
from capture_screens import ( # noqa: E402
|
||||
_apply_theme, _freeze_schedulers, _isolate_home, _load_fonts)
|
||||
_apply_theme, _freeze_schedulers, _isolate_home, _load_fonts, owner_of)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
@@ -50,6 +50,10 @@ def main() -> int:
|
||||
win.show()
|
||||
app.processEvents()
|
||||
st, w = win.structure, win.workspace
|
||||
# R08-T14 split StructureGraphView: the browser view, the cached graph
|
||||
# and the scan/render steps all moved onto GraphRenderer, while the shell
|
||||
# only forwards the public methods. Probe the widget that owns them.
|
||||
st = owner_of(st, "web") or st
|
||||
fails: list[str] = []
|
||||
|
||||
# startup itself must not build any of it
|
||||
|
||||
Reference in New Issue
Block a user