From 57351dd42a9b739eb9ae1fce7182bdfbbf7572fb Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 25 Dec 2017 14:12:16 +0300 Subject: [PATCH] Remove QTextLayout that appears to be not needed. --- Telegram/SourceFiles/ui/text/text_block.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/ui/text/text_block.cpp b/Telegram/SourceFiles/ui/text/text_block.cpp index e435b50dc..a10b53932 100644 --- a/Telegram/SourceFiles/ui/text/text_block.cpp +++ b/Telegram/SourceFiles/ui/text/text_block.cpp @@ -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"); } }