diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-19 09:47:29 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-19 09:47:29 +0200 |
commit | 407302fb1b823fbe0ae09c031862f87b252489e6 (patch) | |
tree | f192faf40b9009ee6a884ed4b7d0b3942b6810ac /src/widgets/widgets | |
parent | 0f30dcaea8129092142fe87d2d14209c75363f66 (diff) | |
parent | ad3b41a06d9ba7219c79b5548c5b11698787288d (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/corelib/io/qwindowspipewriter.cpp
src/widgets/styles/qcommonstyle.cpp
Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qdialogbuttonbox.cpp | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 90dfbe1633..1259c236e4 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -56,7 +56,9 @@ #include <qevent.h> #include <qlayout.h> #include <qscrollbar.h> +#if QT_CONFIG(treeview) #include <qtreeview.h> +#endif #include <qheaderview.h> #include <qmath.h> #include <qmetaobject.h> @@ -2619,7 +2621,7 @@ void QComboBox::showPopup() int count = 0; QStack<QModelIndex> toCheck; toCheck.push(view()->rootIndex()); -#ifndef QT_NO_TREEVIEW +#if QT_CONFIG(treeview) QTreeView *treeView = qobject_cast<QTreeView*>(view()); if (treeView && treeView->header() && !treeView->header()->isHidden()) listHeight += treeView->header()->height(); @@ -2631,7 +2633,7 @@ void QComboBox::showPopup() if (!idx.isValid()) continue; listHeight += view()->visualRect(idx).height(); -#ifndef QT_NO_TREEVIEW +#if QT_CONFIG(treeview) if (d->model->hasChildren(idx) && treeView && treeView->isExpanded(idx)) toCheck.push(idx); #endif diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp index ad16acb96c..788ec67fb2 100644 --- a/src/widgets/widgets/qdialogbuttonbox.cpp +++ b/src/widgets/widgets/qdialogbuttonbox.cpp @@ -411,7 +411,9 @@ QPushButton *QDialogButtonBoxPrivate::createButton(QDialogButtonBox::StandardBut else addButton(button, static_cast<QDialogButtonBox::ButtonRole>(role), doLayout); #if QT_CONFIG(shortcut) - button->setShortcut(QGuiApplicationPrivate::platformTheme()->standardButtonShortcut(sbutton)); + const QKeySequence standardShortcut = QGuiApplicationPrivate::platformTheme()->standardButtonShortcut(sbutton); + if (!standardShortcut.isEmpty()) + button->setShortcut(standardShortcut); #endif return button; } |