diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2016-07-19 10:46:15 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-07-19 10:46:15 +0000 |
commit | b3f260236a5f5bcf2db0692e90bb2a875b9da078 (patch) | |
tree | f1cc4378e829cc4521621329764914adb60439da /src/widgets/widgets | |
parent | 267c01390544ba12f81783c8b0e37ed38db231d6 (diff) | |
parent | 82ea53ad24c92b345ac2b542a174887f5de5723a (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qabstractspinbox.cpp | 3 | ||||
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp index 774f5a708d..5778d16456 100644 --- a/src/widgets/widgets/qabstractspinbox.cpp +++ b/src/widgets/widgets/qabstractspinbox.cpp @@ -757,8 +757,7 @@ bool QAbstractSpinBox::event(QEvent *event) case QEvent::HoverEnter: case QEvent::HoverLeave: case QEvent::HoverMove: - if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event)) - d->updateHoverControl(he->pos()); + d->updateHoverControl(static_cast<const QHoverEvent *>(event)->pos()); break; case QEvent::ShortcutOverride: if (d->edit->event(event)) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 51e23ca7f9..af178ce8f5 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2108,9 +2108,9 @@ void QComboBoxPrivate::setCurrentIndex(const QModelIndex &mi) if (lineEdit) { const QString newText = itemText(normalized); if (lineEdit->text() != newText) { - lineEdit->setText(newText); + lineEdit->setText(newText); // may cause lineEdit -> nullptr (QTBUG-54191) #ifndef QT_NO_COMPLETER - if (lineEdit->completer()) + if (lineEdit && lineEdit->completer()) lineEdit->completer()->setCompletionPrefix(newText); #endif } |