Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/delegateanimationhandler.cpp
Show First 20 Lines • Show All 322 Lines • ▼ Show 20 Line(s) | 260 | { | |||
---|---|---|---|---|---|
323 | 323 | | |||
324 | return state; | 324 | return state; | ||
325 | } | 325 | } | ||
326 | 326 | | |||
327 | AnimationState *DelegateAnimationHandler::findAnimationState(const QAbstractItemView *view, | 327 | AnimationState *DelegateAnimationHandler::findAnimationState(const QAbstractItemView *view, | ||
328 | const QModelIndex &index) const | 328 | const QModelIndex &index) const | ||
329 | { | 329 | { | ||
330 | // Try to find a list of animation states for the view | 330 | // Try to find a list of animation states for the view | ||
331 | AnimationList *list = animationLists.value(view); | 331 | const AnimationList *list = animationLists.value(view); | ||
332 | 332 | | |||
333 | if (list) { | 333 | if (list) { | ||
334 | foreach (AnimationState *state, *list) | 334 | for (AnimationState *state : *list) | ||
335 | if (state->index == index) { | 335 | if (state->index == index) { | ||
336 | return state; | 336 | return state; | ||
337 | } | 337 | } | ||
338 | } | 338 | } | ||
339 | 339 | | |||
340 | return nullptr; | 340 | return nullptr; | ||
341 | } | 341 | } | ||
342 | 342 | | |||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |