Fix typo in code

parent 52ad8db2
......@@ -91,11 +91,11 @@ QString ToCGenerator::fetchBookmarkRef(QTextBlock block, KoTextRangeManager *tex
static QString removeWhitespacePrefix(const QString& text)
{
int firstNonWhitespaceCharIndex = 0;
int lenght = text.length();
while (firstNonWhitespaceCharIndex < lenght && text.at(firstNonWhitespaceCharIndex).isSpace()) {
const int length = text.length();
while (firstNonWhitespaceCharIndex < length && text.at(firstNonWhitespaceCharIndex).isSpace()) {
firstNonWhitespaceCharIndex++;
}
return text.right(lenght - firstNonWhitespaceCharIndex);
return text.right(length - firstNonWhitespaceCharIndex);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment