path: root/src/widgets
diff options
authorEdward Welbourne <>2016-07-15 20:47:57 +0200
committerEdward Welbourne <>2016-07-15 20:47:57 +0200
commit82ea53ad24c92b345ac2b542a174887f5de5723a (patch)
tree7d326274b52bbedac481be522a20732f77457073 /src/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')
6 files changed, 12 insertions, 7 deletions
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 03211b4e4c..4d37c7f682 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -1024,9 +1024,11 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget)
// The Windows compositor handles fullscreen OpenGL window specially. Besides
// having trouble with popups, it also has issues with flip-flopping between
// OpenGL-based and normal flushing. Therefore, stick with GL for fullscreen
-// windows. (QTBUG-53515)
+// windows (QTBUG-53515). Similary, translucent windows should not switch to
+// layered native windows (QTBUG-54734).
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(Q_OS_WINCE)
|| tlw->windowState().testFlag(Qt::WindowFullScreen)
+ || tlw->testAttribute(Qt::WA_TranslucentBackground)
diff --git a/src/widgets/styles/ b/src/widgets/styles/
index 3a875f9372..0c034777ff 100644
--- a/src/widgets/styles/
+++ b/src/widgets/styles/
@@ -2935,7 +2935,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
QImage img;
QSize pixmapSize = opt->rect.size();
- if (pixmapSize.isValid()) {
+ if (!pixmapSize.isEmpty()) {
QPixmap pix(pixmapSize);
pix.fill(QColor(fillR, fillG, fillB));
QPainter pix_paint(&pix);
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 3e17b22102..c8970cc397 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -733,7 +733,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value State_None Indicates that the widget does not have a state.
\value State_Active Indicates that the widget is active.
- \value State_AutoRaise Used to indicate if auto-raise appearance should be usd on a tool button.
+ \value State_AutoRaise Used to indicate if auto-raise appearance should be used on a tool button.
\value State_Children Used to indicate if an item view branch has children.
\value State_DownArrow Used to indicate if a down arrow should be visible on the widget.
\value State_Editing Used to indicate if an editor is opened on the widget.
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp
index 083a4a4f27..2c7dbf63be 100644
--- a/src/widgets/util/qcompleter.cpp
+++ b/src/widgets/util/qcompleter.cpp
@@ -1044,6 +1044,10 @@ void QCompleter::setModel(QAbstractItemModel *model)
QAbstractItemModel *oldModel = d->proxy->sourceModel();
+ if (qobject_cast<const QFileSystemModel *>(oldModel))
+ setCompletionRole(Qt::EditRole); // QTBUG-54642, clear FileNameRole set by QFileSystemModel
if (d->popup)
setPopup(d->popup); // set the model and make new connections
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());
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)
- if (lineEdit->completer())
+ if (lineEdit && lineEdit->completer())