| 350 | } |
| 351 | |
| 352 | bool VcsAnnotationItemDelegate::eventFilter(QObject* object, QEvent* event) |
| 353 | { |
| 354 | if (event->type() == QEvent::Resize) { |
| 355 | auto resizeEvent = static_cast<QResizeEvent*>(event); |
| 356 | const int viewBasedWidthHint = widthHintFromViewWidth(resizeEvent->size().width()); |
| 357 | if ((viewBasedWidthHint < m_lastCharBasedWidthHint) && |
| 358 | (viewBasedWidthHint != m_lastViewBasedWidthHint)) { |
| 359 | // emit for first line only, assuming uniformAnnotationItemSizes is set to true |
| 360 | emit sizeHintChanged(m_model, 0); |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | return KTextEditor::AbstractAnnotationItemDelegate::eventFilter(object, event); |
| 365 | } |
| 366 | |
| 367 | void VcsAnnotationItemDelegate::resetBackgrounds() |
| 368 | { |
nothing calls this directly
no test coverage detected