Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.5.1
-
None
-
-
f5206b381 (dev)
Description
When appending to QTextEdit a text with a \x" character, I get a qWarning and if I appdn the message itself to the same QTextEdit, I get a crash (reproting actualFontEngine is being accessed while null in QTextEngine::shapeText).
#include <QApplication> #include <QDialog> #include <QTextEdit> #include <QVBoxLayout> static QTextEdit* edit = NULL; void MessageOutput( QtMsgType type, const QMessageLogContext &context, const QString &msg) { QString message = "[DEBUG] -- " + msg + "\n"; edit->append(message.toStdString().c_str()); } int main( int argc, char* argv[] ) { QApplication app(argc, argv); qInstallMessageHandler(MessageOutput); QDialog dlg; dlg.setLayout( new QVBoxLayout ); edit = new QTextEdit; edit->append( "(\"/0@\x3\\r\\n\")\n" ); dlg.layout()->addWidget( edit ); dlg.show(); return app.exec(); }
There may be two issues:
- Getting an unexpected warning
- Crashing when append is called recurively?
Any workaround (like a QTextEdit font setup/config) would be appreciated.
Attachments
For Gerrit Dashboard: QTBUG-113848 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
480113,2 | Skip generation of glyphs for control characters | dev | qt/qtbase | Status: MERGED | +2 | 0 |