summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-01-16 01:00:11 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-01-16 11:20:42 +0100
commit0a4e5bb265c4a2345a9cbffab1b5150124b8d31e (patch)
treeb243668d53f710af3d57a44c18e1ed0c40b100f7 /src/widgets
parent4772a2da15ae0624633f3fc4d029d5f0e1e33892 (diff)
parentbd828bacb982a51ee21f03487f8390cfc96cc6d3 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/widgets/kernel/qshortcut.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp3
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp3
-rw-r--r--src/widgets/kernel/qwidget.cpp6
-rw-r--r--src/widgets/widgets/qscrollbar.cpp10
4 files changed, 17 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index ca2b783f55..e24d308d65 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -2378,7 +2378,8 @@ QList<QUrl> QFileDialog::getOpenFileUrls(QWidget *parent,
This function is used to access local files on Qt for WebAssembly, where the web
sandbox places restrictions on how such access may happen. Its implementation will
- make the browser display a native file dialog, where the user makes the file selection.
+ make the browser display a native file dialog, where the user makes the file selection
+ based on the parameter \a nameFilter.
It can also be used on other platforms, where it will fall back to using QFileDialog.
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index d658f7fe0c..a723c3a955 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -1213,7 +1213,8 @@ QMimeData *QFileSystemModel::mimeData(const QModelIndexList &indexes) const
/*!
Handles the \a data supplied by a drag and drop operation that ended with
the given \a action over the row in the model specified by the \a row and
- \a column and by the \a parent index.
+ \a column and by the \a parent index. Returns true if the operation was
+ successful.
\sa supportedDropActions()
*/
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 2160e54b8f..db3c269949 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -5952,7 +5952,11 @@ void QWidget::setWindowTitle(const QString &title)
has been set, windowIcon() returns the application icon
(QApplication::windowIcon()).
- \sa windowTitle
+ \note On \macos, window icons represent the active document,
+ and will not be displayed unless a file path has also been
+ set using setFilePath.
+
+ \sa windowTitle, setFilePath
*/
QIcon QWidget::windowIcon() const
{
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index 34ea017279..2ce1d50c86 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -497,14 +497,20 @@ bool QScrollBar::event(QEvent *event)
void QScrollBar::wheelEvent(QWheelEvent *event)
{
event->ignore();
+ bool horizontal = qAbs(event->angleDelta().x()) > qAbs(event->angleDelta().y());
+ // The vertical wheel can be used to scroll a horizontal scrollbar, but only if
+ // there is no simultaneous horizontal wheel movement. This is to avoid chaotic
+ // scrolling on touchpads.
+ if (!horizontal && event->angleDelta().x() != 0 && orientation() == Qt::Horizontal)
+ return;
// scrollbar is a special case - in vertical mode it reaches minimum
// value in the upper position, however QSlider's minimum value is on
// the bottom. So we need to invert the value, but since the scrollbar is
// inverted by default, we need to invert the delta value only for the
// horizontal orientation.
- int delta = (orientation() == Qt::Horizontal ? -event->angleDelta().x() : event->angleDelta().y());
+ int delta = horizontal ? -event->angleDelta().x() : event->angleDelta().y();
Q_D(QScrollBar);
- if (d->scrollByDelta(orientation(), event->modifiers(), delta))
+ if (d->scrollByDelta(horizontal ? Qt::Horizontal : Qt::Vertical, event->modifiers(), delta))
event->accept();
if (event->phase() == Qt::ScrollBegin)