Remove call to static QGuiApplication::keyboardModifiers method
The event handler listens to the relevant input events already to read the state of the modifiers. The implementation doesn't care about touch, wheel, or tablet events either way. The call was introduced in 28a21d98ef8d880a6dd86ee19dd803424bb5eae1, with no explanation why it would be necessary, and no test cases to exercise that case. Task-number: QTBUG-73829 Change-Id: Ibe408e86f697ac5acae5944b941f0d935ca2e408 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
c2bc4467f7
commit
c4366ff018
@ -3929,7 +3929,7 @@ QItemSelectionModel::SelectionFlags QAbstractItemView::selectionCommand(const QM
|
|||||||
keyModifiers = (static_cast<const QInputEvent*>(event))->modifiers();
|
keyModifiers = (static_cast<const QInputEvent*>(event))->modifiers();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
keyModifiers = QGuiApplication::keyboardModifiers();
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (d->selectionMode) {
|
switch (d->selectionMode) {
|
||||||
@ -3987,7 +3987,7 @@ QItemSelectionModel::SelectionFlags QAbstractItemViewPrivate::multiSelectionComm
|
|||||||
QItemSelectionModel::SelectionFlags QAbstractItemViewPrivate::extendedSelectionCommand(
|
QItemSelectionModel::SelectionFlags QAbstractItemViewPrivate::extendedSelectionCommand(
|
||||||
const QModelIndex &index, const QEvent *event) const
|
const QModelIndex &index, const QEvent *event) const
|
||||||
{
|
{
|
||||||
Qt::KeyboardModifiers modifiers = QGuiApplication::keyboardModifiers();
|
Qt::KeyboardModifiers modifiers = Qt::NoModifier;
|
||||||
if (event) {
|
if (event) {
|
||||||
switch (event->type()) {
|
switch (event->type()) {
|
||||||
case QEvent::MouseMove: {
|
case QEvent::MouseMove: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user