MCPcopy Create free account
hub / github.com/KDE/kdevelop / eventFilter

Method eventFilter

kdevplatform/vcs/widgets/vcsannotationitemdelegate.cpp:352–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352bool 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
367void VcsAnnotationItemDelegate::resetBackgrounds()
368{

Callers

nothing calls this directly

Calls 3

eventFilterFunction · 0.50
typeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected