| 160 | |
| 161 | |
| 162 | void ControllerRackView::onControllerRemoved( Controller * removedController ) |
| 163 | { |
| 164 | ControllerView * viewOfRemovedController = 0; |
| 165 | |
| 166 | QVector<ControllerView *>::const_iterator end = m_controllerViews.end(); |
| 167 | for ( QVector<ControllerView *>::const_iterator it = m_controllerViews.begin(); it != end; ++it) |
| 168 | { |
| 169 | ControllerView *currentControllerView = *it; |
| 170 | if ( currentControllerView->getController() == removedController ) |
| 171 | { |
| 172 | viewOfRemovedController = currentControllerView; |
| 173 | break; |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | if (viewOfRemovedController ) |
| 178 | { |
| 179 | m_controllerViews.erase( qFind( m_controllerViews.begin(), |
| 180 | m_controllerViews.end(), viewOfRemovedController ) ); |
| 181 | |
| 182 | delete viewOfRemovedController; |
| 183 | --m_nextIndex; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | |
| 188 |
nothing calls this directly
no test coverage detected