summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2016-07-15 20:47:57 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2016-07-15 20:47:57 +0200
commit82ea53ad24c92b345ac2b542a174887f5de5723a (patch)
tree7d326274b52bbedac481be522a20732f77457073 /src/widgets/widgets
parente46e112eb10850801218bd810ecaeb8fd29f4c34 (diff)
parent178ab885626bcd67507fde7f67f65c1872ac3be3 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: qmake/library/qmakeevaluator.cpp One side changed the iterator to use ranged-for, the other changed its body; they only conflicted because the latter had to add braces around the body, intruding on the for-line. Trivial resolution. Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp3
-rw-r--r--src/widgets/widgets/qcombobox.cpp4
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
}