MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / changeUnderCursor

Method changeUnderCursor

src/plugins/git/gui/giteditor.cpp:273–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273QString GitEditor::changeUnderCursor(const QTextCursor &c)
274{
275 QTextCursor cursor = c;
276 // Any number is regarded as change number.
277 cursor.select(QTextCursor::WordUnderCursor);
278 if (!cursor.hasSelection())
279 return {};
280 const QString change = cursor.selectedText();
281 if (d->changeNumberPattern.match(change).hasMatch())
282 return change;
283 return {};
284}
285
286QString GitEditor::lineNumber(int blockNumber) const
287{

Callers 1

Calls 3

selectMethod · 0.80
selectedTextMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected