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

Function abbreviateLastName

kdevplatform/vcs/models/vcsannotationmodel.cpp:92–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90VcsAnnotationModel::~VcsAnnotationModel() = default;
91
92static QString abbreviateLastName(const QString& author) {
93 auto parts = author.split(QLatin1Char(' '));
94 bool onlyOneFragment = parts.size() == 1 || ( parts.size() == 2 && parts.at(1).isEmpty() );
95 return onlyOneFragment ? parts.first() : parts.first() + QStringLiteral(" %1.").arg(parts.last()[0]);
96}
97
98static QString annotationToolTip(const VcsAnnotationLine& aline)
99{

Callers 1

dataMethod · 0.85

Calls 6

splitMethod · 0.45
sizeMethod · 0.45
isEmptyMethod · 0.45
atMethod · 0.45
firstMethod · 0.45
lastMethod · 0.45

Tested by

no test coverage detected