Skip to content
Snippets Groups Projects
Commit f495d2e8 authored by Aurindam Jana's avatar Aurindam Jana
Browse files

QtMessageLogItemDelegate: Avoid infinite loop


Change-Id: I1f227d17bc20faf7131a28aac8022cce30fafbbd
Reviewed-by: default avatarSimjees Abraham <simjees.abraham@nokia.com>
Reviewed-by: default avatarAurindam Jana <aurindam.jana@nokia.com>
parent c51b2810
No related branches found
No related tags found
No related merge requests found
...@@ -361,9 +361,9 @@ qreal QtMessageLogItemDelegate::layoutText(QTextLayout &tl, int width, ...@@ -361,9 +361,9 @@ qreal QtMessageLogItemDelegate::layoutText(QTextLayout &tl, int width,
void QtMessageLogItemDelegate::formatTextForWidth(QString &text) const void QtMessageLogItemDelegate::formatTextForWidth(QString &text) const
{ {
for (int i = 0; i < text.length(); i++) { for (int i = 0; i < text.length(); ++i) {
if (text.at(i).isPunct()) if (text.at(i).isPunct())
text.insert(i, QChar(0x200b)); // ZERO WIDTH SPACE text.insert(++i, QChar(0x200b)); // ZERO WIDTH SPACE
} }
} }
void QtMessageLogItemDelegate::setItemModel(QtMessageLogHandler *model) void QtMessageLogItemDelegate::setItemModel(QtMessageLogHandler *model)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment