qt5base-lts/tests/auto/widgets
Marc Mutz 631b143b3f QComboBox: fix crash on setEditable(false) called from editTextChanged()
QLineEdit::setText() emits QLineEdit::textChanged(), which is
connected to QComboBox::editTextChanged(). When a user slot
connected to editTextChanged() sets QComboBox::editable to
false, the line edit will be deleted in setEditable() and
when control returns to QComboBoxPrivate::setCurrentIndex(),
the formerly non-null 'lineEdit' has changed to nullptr,
leading to a nullptr dereference when attempting to set the
completionPrefix on lineEdit->completer().

Fix by re-checking 'lineEdit' after returning from the
QLineEdit::setText() call.

Add a test.

Task-number: QTBUG-54191
Change-Id: I94154796cfde73fb490f8471c48b9d6f62825a92
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-06 10:34:43 +00:00
..
dialogs tst_QFileSystemModel: Remove Win32LongFileName(). 2016-06-08 04:09:48 +00:00
effects Purge sRGB chunks from PNGs in tests. 2016-03-29 08:39:43 +00:00
gestures Autotest: Remove blacklistings 2016-04-01 05:41:21 +00:00
graphicsview Avoid missing paints when resizing GV with QOpenGLWidget viewport 2016-05-24 19:16:46 +00:00
itemviews QTableView: Fix selection for reordered or hidden rows/columns 2016-05-09 05:14:38 +00:00
kernel Remove tst_QWidget::immediateRepaintAfterShow(). 2016-06-04 18:47:54 +00:00
styles Enable testStyleOptionInit for all styles and fix affected styles. 2016-06-06 13:12:14 +00:00
util Pass -silent to lrelease to avoid cruft in test logs. 2016-02-02 16:28:07 +00:00
widgets QComboBox: fix crash on setEditable(false) called from editTextChanged() 2016-07-06 10:34:43 +00:00
widgets.pro Add autotest for QGestureRecognizer. 2014-10-23 21:11:28 +02:00