Remove QTextLayout that appears to be not needed.

This commit is contained in:
John Preston 2017-12-25 14:12:16 +03:00
parent 58d21ff916
commit 57351dd42a
1 changed files with 1 additions and 7 deletions

View File

@ -326,20 +326,14 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi
}
}
QString part = str.mid(_from, length);
const auto part = str.mid(_from, length);
// Attempt to catch a crash in text processing
CrashReports::SetAnnotationRef("CrashString", &part);
QStackTextEngine engine(part, blockFont->f);
QTextLayout layout(&engine);
layout.beginLayout();
layout.createLine();
BlockParser parser(&engine, this, minResizeWidth, _from, part);
layout.endLayout();
CrashReports::ClearAnnotationRef("CrashString");
}
}