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

Method extendedDescription

plugins/git/simplecommitform.cpp:126–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126QString SimpleCommitForm::extendedDescription(int wrapAtColumn) const
127{
128 if (wrapAtColumn <= 0)
129 return m_messageEdit->toPlainText();
130 int currentLineLen = 0;
131 QString ret;
132 for(const auto c: m_messageEdit->toPlainText()) {
133 if (c == QLatin1Char('\n')) {
134 ret += QLatin1Char('\n');
135 currentLineLen = 0;
136 } else if (currentLineLen > wrapAtColumn && c.isSpace()) {
137 ret += QLatin1Char('\n');
138 currentLineLen = 0;
139 } else {
140 ret += c;
141 currentLineLen++;
142 }
143 }
144 return ret;
145}
146
147void SimpleCommitForm::setExtendedDescription(const QString& txt)
148{

Callers 1

commitActiveProjectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected