diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-07-01 17:28:37 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-07-06 10:34:43 +0000 |
commit | 631b143b3f6650b5761ac2c78e7936e1594b6e4f (patch) | |
tree | 5a3d38d4d13bb4890bd22c3db2beaa6ebed6e452 /src/plugins/platforms | |
parent | a91d0dd369313dfa8865f99e590b868146cb4388 (diff) |
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>
Diffstat (limited to 'src/plugins/platforms')
0 files changed, 0 insertions, 0 deletions