Chore: Proper Lambda Formatting (#2167)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -352,7 +352,7 @@ void TextElement::addToContainer(MessageLayoutContainer &container,
|
||||
|
||||
// QChar::isHighSurrogate(text[0].unicode()) ? 2 : 1
|
||||
|
||||
for (int i = 0; i < textLength; i++) //
|
||||
for (int i = 0; i < textLength; i++)
|
||||
{
|
||||
auto isSurrogate = text.size() > i + 1 &&
|
||||
QChar::isHighSurrogate(text[i].unicode());
|
||||
@@ -360,7 +360,7 @@ void TextElement::addToContainer(MessageLayoutContainer &container,
|
||||
auto charWidth = isSurrogate ? metrics.width(text.mid(i, 2))
|
||||
: metrics.width(text[i]);
|
||||
|
||||
if (!container.fitsInLine(width + charWidth)) //
|
||||
if (!container.fitsInLine(width + charWidth))
|
||||
{
|
||||
container.addElementNoLineBreak(getTextLayoutElement(
|
||||
text.mid(wordStart, i - wordStart), width, false));
|
||||
@@ -621,7 +621,7 @@ void IrcTextElement::addToContainer(MessageLayoutContainer &container,
|
||||
// QChar::isHighSurrogate(text[0].unicode()) ? 2 : 1
|
||||
|
||||
// XXX(pajlada): NOT TESTED
|
||||
for (int i = 0; i < textLength; i++) //
|
||||
for (int i = 0; i < textLength; i++)
|
||||
{
|
||||
auto isSurrogate = text.size() > i + 1 &&
|
||||
QChar::isHighSurrogate(text[i].unicode());
|
||||
|
||||
Reference in New Issue
Block a user