| 99 | |
| 100 | template <class T> |
| 101 | T* getFirstDescendantOfType() { |
| 102 | for (Widget* child : children) { |
| 103 | T* c = dynamic_cast<T*>(child); |
| 104 | if (c) |
| 105 | return c; |
| 106 | c = child->getFirstDescendantOfType<T>(); |
| 107 | if (c) |
| 108 | return c; |
| 109 | } |
| 110 | return NULL; |
| 111 | } |
| 112 | |
| 113 | /** Checks if the given widget is a child of `this` widget. |
| 114 | */ |
nothing calls this directly
no outgoing calls
no test coverage detected