diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-27 01:00:05 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-27 01:00:06 +0200 |
commit | 1c06ff9cac74964f60615d040f013d8eb852e17d (patch) | |
tree | 50a00da08df6f1f6fd781313828514e47bdeeafe /src | |
parent | 1da49d8493de7180a9db38d4614ba6fbbe898276 (diff) | |
parent | a0ad2cbdf27d0d23727b09609e127ac17e414a22 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: I73d9e896c05f7d944f3092b51a3a95c7e6e284b8
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/folderlistmodel/qquickfolderlistmodel.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4promiseobject.cpp | 1 | ||||
-rw-r--r-- | src/quick/handlers/qquickpointerdevicehandler.cpp | 51 | ||||
-rw-r--r-- | src/quick/items/qquickitem.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquicktableview.cpp | 1 |
5 files changed, 55 insertions, 2 deletions
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp index 6b76d63555..f5acfd86b7 100644 --- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp @@ -539,6 +539,8 @@ QStringList QQuickFolderListModel::nameFilters() const void QQuickFolderListModel::setNameFilters(const QStringList &filters) { Q_D(QQuickFolderListModel); + if (d->nameFilters == filters) + return; d->fileInfoThread.setNameFilters(filters); d->nameFilters = filters; } diff --git a/src/qml/jsruntime/qv4promiseobject.cpp b/src/qml/jsruntime/qv4promiseobject.cpp index 27075e96a0..17d218a6eb 100644 --- a/src/qml/jsruntime/qv4promiseobject.cpp +++ b/src/qml/jsruntime/qv4promiseobject.cpp @@ -163,6 +163,7 @@ void ReactionHandler::executeReaction(ReactionEvent *event) ScopedFunctionObject reaction(scope); if (scope.hasException()) { reaction = capability->d()->reject.as<QV4::FunctionObject>(); + result = scope.engine->catchException(); } else { reaction = capability->d()->resolve.as<QV4::FunctionObject>(); } diff --git a/src/quick/handlers/qquickpointerdevicehandler.cpp b/src/quick/handlers/qquickpointerdevicehandler.cpp index 449d726b78..90f31bf9fd 100644 --- a/src/quick/handlers/qquickpointerdevicehandler.cpp +++ b/src/quick/handlers/qquickpointerdevicehandler.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtQuick module of the Qt Toolkit. @@ -230,6 +230,55 @@ void QQuickPointerDeviceHandler::setAcceptedPointerTypes(QQuickPointerDevice::Po } } \endqml + + If you set \c acceptedModifiers to an OR combination of modifier keys, + it means \e all of those modifiers must be pressed to activate the handler: + + \qml + Item { + TapHandler { + acceptedModifiers: Qt.ControlModifier | Qt.AltModifier | Qt.ShiftModifier + onTapped: console.log("control-alt-shift-tapped") + } + } + \endqml + + The available modifiers are as follows: + + \value NoModifier No modifier key is allowed. + \value ShiftModifier A Shift key on the keyboard must be pressed. + \value ControlModifier A Ctrl key on the keyboard must be pressed. + \value AltModifier An Alt key on the keyboard must be pressed. + \value MetaModifier A Meta key on the keyboard must be pressed. + \value KeypadModifier A keypad button must be pressed. + \value GroupSwitchModifier X11 only (unless activated on Windows by a command line argument). + A Mode_switch key on the keyboard must be pressed. + \value KeyboardModifierMask The handler does not care which modifiers are pressed. + + If you need even more complex behavior than can be achieved with + combinations of multiple handlers with multiple modifier flags, you can + check the modifiers in JavaScript code: + + \qml + Item { + TapHandler { + onTapped: + switch (point.modifiers) { + case Qt.ControlModifier | Qt.AltModifier: + console.log("CTRL+ALT"); + break; + case Qt.ControlModifier | Qt.AltModifier | Qt.MetaModifier: + console.log("CTRL+META+ALT"); + break; + default: + console.log("other modifiers", point.modifiers); + break; + } + } + } + \endqml + + \sa Qt::KeyboardModifier */ void QQuickPointerDeviceHandler::setAcceptedModifiers(Qt::KeyboardModifiers acceptedModifiers) { diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 4827f1ddd9..796ab6cdd7 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -8490,7 +8490,7 @@ void QQuickItemLayer::setMipmap(bool mipmap) \note ShaderEffectSource.RGB and ShaderEffectSource.Alpha should be used with caution, as support for these formats in the underlying - hardare and driver is often not present. + hardware and driver is often not present. \sa {Item Layers} */ diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index db579c74bc..95fac30808 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -54,6 +54,7 @@ /*! \qmltype TableView \inqmlmodule QtQuick + \since 5.12 \ingroup qtquick-views \inherits Flickable \brief Provides a table view of items to display data from a model. |