forked from qt-creator/qt-creator
TextEditor: Modernize
modernize-* Change-Id: Ic497fea1942a77cf017be3b0033f92e3807066f1 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -224,8 +224,8 @@ int TabSettings::positionAtColumn(const QString &text, int column, int *offset,
|
||||
int TabSettings::columnCountForText(const QString &text, int startColumn) const
|
||||
{
|
||||
int column = startColumn;
|
||||
for (int i = 0; i < text.size(); ++i) {
|
||||
if (text.at(i) == QLatin1Char('\t'))
|
||||
for (auto c : text) {
|
||||
if (c == QLatin1Char('\t'))
|
||||
column = column - (column % m_tabSize) + m_tabSize;
|
||||
else
|
||||
++column;
|
||||
|
||||
Reference in New Issue
Block a user