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

Method inlineNoteSize

plugins/problemreporter/probleminlinenoteprovider.cpp:184–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184QSize ProblemInlineNoteProvider::inlineNoteSize(const KTextEditor::InlineNote& note) const
185{
186 InlineNoteLayout layout;
187 doInlineNoteLayout(note, &layout);
188
189 const auto prob = m_problemForLine[note.position().line()];
190 QFont font = note.font();
191 font.setItalic(true);
192 const QFontMetrics metric(font);
193 const QRect boundingRect = metric.boundingRect(prob->description());
194 return {layout.descriptionX + boundingRect.width() + layout.rightMargin, note.lineHeight()};
195}
196
197void ProblemInlineNoteProvider::paintInlineNote(const KTextEditor::InlineNote& note, QPainter& painter,
198 Qt::LayoutDirection direction) const

Callers

nothing calls this directly

Calls 4

doInlineNoteLayoutFunction · 0.85
lineMethod · 0.45
positionMethod · 0.45
descriptionMethod · 0.45

Tested by

no test coverage detected