| 33 | Q_ASSERT(w); |
| 34 | } |
| 35 | Area::WalkerMode operator()(AreaIndex *index) |
| 36 | { |
| 37 | const auto& views = index->views(); |
| 38 | const auto it = std::find_if(views.cbegin(), views.cend(), [this](const View* v) { |
| 39 | return v->widget() == w; |
| 40 | }); |
| 41 | if (it == views.cend()) { |
| 42 | return Area::ContinueWalker; |
| 43 | } |
| 44 | view = *it; |
| 45 | return Area::StopWalker; |
| 46 | } |
| 47 | |
| 48 | QWidget* const w; |
| 49 | View *view; |