mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-21 15:47:38 +00:00
Logging string in case of crash inside Qt text processing.
There are some crash reports from OS X 10.6 and it is the way to find out which string exactly crashes the app in that place.
This commit is contained in:
parent
4424dbf64a
commit
47aa03ce37
@ -330,6 +330,10 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi
|
||||
}
|
||||
|
||||
QString part = str.mid(_from, length);
|
||||
|
||||
// Attempt to catch a crash in text processing
|
||||
SignalHandlers::setCrashAnnotationRef("CrashString", &part);
|
||||
|
||||
QStackTextEngine engine(part, blockFont->f);
|
||||
engine.itemize();
|
||||
|
||||
@ -340,6 +344,8 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi
|
||||
BlockParser parser(&engine, this, minResizeWidth, _from, part);
|
||||
|
||||
layout.endLayout();
|
||||
|
||||
SignalHandlers::clearCrashAnnotationRef("CrashString");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user