~/talk

Lazy QObject tree traversal

Talkat NDC TechTown 2020 · 2020-08-31..09-03· [c-and-cpp]
links:none on file
slides:none on file

Claim: implement a lazy, composable QObject children view so traversal yields objects on demand rather than building a QList. Uses C++20 coroutines and ranges-v3 with a cppcoro generator and a single-pass cursor to compose filters by type/name/regex. Built a children_view and pipeable filters; full-tree traversal performs about the same as Qt’s eager children() up to ~1M elements, type-filtering is slower, a std::vector fallback is competitive, and current coroutine state memory use is higher and needs optimization.

AI-written summary · about

  1. 0:00Intro
  2. 1:53About Qt
  3. 3:17About QObject
  4. 4:43QObject trees
  5. 5:38Tree traversing
  6. 7:00findChildren implementation
  7. 11:09Toolbox
  8. 12:21Coroutines in C++: core definitions
  9. 13:24Coroutines in C++: implementation
  10. 14:00Coroutines in C++: libraries
  11. 14:39Coroutines in C++: usage example
  12. 15:57Lazy traversal with coroutines: implementation
  13. 17:14Lazy traversal with coroutines: usage example
  14. 18:17Implementation without coroutines
  15. 20:08Ranges in C++: example
  16. 21:33Everything is lazy!
  17. 22:42Create a new view
  18. 24:15Create a cursor (single-pass)
  19. 26:13Basic functionality implementation constexpr auto children
  20. 29:03QObject tree traversal
  21. 29:44Filter by type, name, and regex
  22. 30:38Make a copy
  23. 31:30Test environment
  24. 37:15Useful links
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.