mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02: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
1 changed files with 6 additions and 0 deletions
|
@ -330,6 +330,10 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi
|
||||||
}
|
}
|
||||||
|
|
||||||
QString part = str.mid(_from, length);
|
QString part = str.mid(_from, length);
|
||||||
|
|
||||||
|
// Attempt to catch a crash in text processing
|
||||||
|
SignalHandlers::setCrashAnnotationRef("CrashString", &part);
|
||||||
|
|
||||||
QStackTextEngine engine(part, blockFont->f);
|
QStackTextEngine engine(part, blockFont->f);
|
||||||
engine.itemize();
|
engine.itemize();
|
||||||
|
|
||||||
|
@ -340,6 +344,8 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi
|
||||||
BlockParser parser(&engine, this, minResizeWidth, _from, part);
|
BlockParser parser(&engine, this, minResizeWidth, _from, part);
|
||||||
|
|
||||||
layout.endLayout();
|
layout.endLayout();
|
||||||
|
|
||||||
|
SignalHandlers::clearCrashAnnotationRef("CrashString");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue