Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.6.1
-
None
-
-
c6af5b9c1 (dev), e9b187a83 (6.7), ff1f12d5a (6.6), 293772f5f (tqtc/lts-6.5), b47ad83d7 (6.6.2)
Description
I updated Qt to the latest 6.6 repo. I have a styled widgets application and it started crashing in the QPlainTextEdit constructor.
I've tracked the error to commit I5c32f5af8b284749732b610e56b4e3d8c8ed1946, QTBUG-1857 because of the change on line 2473 in qwidgettextcontrol.cpp.
I've added a number of screenshots of the stacktrace.
In stacktrace2.png one sees that control is being constructed. Further in stacktrace5.png, q->setCursorWidth( minus 1 ) is called, which causes QApplication::style()>pixelMetric() to be called in stacktrace6.png. This is where the code was changed in the commit above, passing the parent widget. This causes QPlainTextEdit::isReadOnly() to be called in QStyleSheetStyle::renderRule line 2157, stacktrace8.png. At stacktrace9.png shows, d->control->textInteractionFlags() is tested. Howerver, d->control is still nullptr as it is still being constructed (stacktrace2.png).
Attachments
Issue Links
- duplicates
-
QTBUG-121790 QApplication::setStyleSheet crashes QTextEdit
-
- Closed
-
- resulted from
-
QTBUG-1857 Ensure that when pixelMetric() is called, the widget pointer is always passed
-
- Closed
-
For Gerrit Dashboard: QTBUG-121697 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
538197,1 | Q(Plain)TextEdit: don't crash when using a style sheet | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: NEW | 0 | 0 |
537295,6 | Q(Plain)TextEdit: don't crash when using a style sheet | dev | qt/qtbase | Status: MERGED | +2 | 0 |
537841,2 | Q(Plain)TextEdit: don't crash when using a style sheet | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
537914,2 | Q(Plain)TextEdit: don't crash when using a style sheet | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
538057,2 | Q(Plain)TextEdit: don't crash when using a style sheet | 6.6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
538059,2 | Q(Plain)TextEdit: don't crash when using a style sheet | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |