rdieter pushed to qt5-qtbase (f22). "Shortcuts with KeypadModifier not working (QTBUG-33093, #1219173)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed May 6 19:33:08 UTC 2015
From 7f1b5be863073730ad55d8999747c6da2a05dd44 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter at math.unl.edu>
Date: Wed, 6 May 2015 14:32:32 -0500
Subject: Shortcuts with KeypadModifier not working (QTBUG-33093,#1219173)
diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec
index 27247ba..528ffc5 100644
--- a/qt5-qtbase.spec
+++ b/qt5-qtbase.spec
@@ -37,7 +37,7 @@
Summary: Qt5 - QtBase components
Name: qt5-qtbase
Version: 5.4.1
-Release: 13%{?dist}
+Release: 14%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@@ -90,6 +90,11 @@ Patch50: qt5-poll.patch
# https://bugreports.qt.io/browse/QTBUG-42985
Patch51: qtbase-opensource-src-5.4.0-QTBUG-42985.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1219173
+# https://bugreports.qt.io/browse/QTBUG-33093
+# https://codereview.qt-project.org/#/c/95219/
+Patch52: qtbase-opensource-src-5.4.1-QTBUG-33093.patch
+
## upstream patches
# workaround https://bugreports.qt-project.org/browse/QTBUG-43057
# 'make docs' crash on el6, use qSort instead of std::sort
@@ -364,6 +369,7 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
#patch50 -p1 -b .poll
%patch51 -p1 -b .QTBUG-42985
+%patch52 -p1 -b .QTBUG-33093
%if 0%{?rhel} == 6
%patch100 -p1 -b .QTBUG-43057
@@ -899,6 +905,9 @@ fi
%changelog
+* Wed May 06 2015 Rex Dieter <rdieter at fedoraproject.org> 5.4.1-14
+- Shortcuts with KeypadModifier not working (QTBUG-33093,#1219173)
+
* Tue May 05 2015 Rex Dieter <rdieter at fedoraproject.org> 5.4.1-13
- backport: data corruption in QNetworkAccessManager
diff --git a/qtbase-opensource-src-5.4.1-QTBUG-33093.patch b/qtbase-opensource-src-5.4.1-QTBUG-33093.patch
new file mode 100644
index 0000000..cdb86c1
--- /dev/null
+++ b/qtbase-opensource-src-5.4.1-QTBUG-33093.patch
@@ -0,0 +1,64 @@
+diff -up qtbase-opensource-src-5.4.1/src/gui/kernel/qshortcutmap.cpp.QTBUG-33093 qtbase-opensource-src-5.4.1/src/gui/kernel/qshortcutmap.cpp
+--- qtbase-opensource-src-5.4.1/src/gui/kernel/qshortcutmap.cpp.QTBUG-33093 2015-02-16 22:56:48.000000000 -0600
++++ qtbase-opensource-src-5.4.1/src/gui/kernel/qshortcutmap.cpp 2015-05-06 14:29:44.991086570 -0500
+@@ -380,9 +380,7 @@ QKeySequence::SequenceMatch QShortcutMap
+ result = find(e);
+ if (result == QKeySequence::NoMatch && (e->modifiers() & Qt::KeypadModifier)) {
+ // Try to find a match without keypad modifier
+- QKeyEvent event = *e;
+- event.setModifiers(e->modifiers() & ~Qt::KeypadModifier);
+- result = find(&event);
++ result = find(e, Qt::KeypadModifier);
+ }
+ if (result == QKeySequence::NoMatch && e->modifiers() & Qt::ShiftModifier) {
+ // If Shift + Key_Backtab, also try Shift + Qt::Key_Tab
+@@ -435,13 +433,13 @@ bool QShortcutMap::hasShortcutForKeySequ
+ which can be access through matches().
+ \sa matches
+ */
+-QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e)
++QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifiers)
+ {
+ Q_D(QShortcutMap);
+ if (!d->sequences.count())
+ return QKeySequence::NoMatch;
+
+- createNewSequences(e, d->newEntries);
++ createNewSequences(e, d->newEntries, ignoredModifiers);
+ #if defined(DEBUG_QSHORTCUTMAP)
+ qDebug() << "Possible shortcut key sequences:" << d->newEntries;
+ #endif
+@@ -543,7 +541,7 @@ void QShortcutMap::clearSequence(QVector
+ Alters \a seq to the new sequence state, based on the
+ current sequence state, and the new key event \a e.
+ */
+-void QShortcutMap::createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl)
++void QShortcutMap::createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl, int ignoredModifiers)
+ {
+ Q_D(QShortcutMap);
+ QList<int> possibleKeys = QKeyMapper::possibleKeys(e);
+@@ -573,7 +571,7 @@ void QShortcutMap::createNewSequences(QK
+ curKsl.setKey(0, 2);
+ curKsl.setKey(0, 3);
+ }
+- curKsl.setKey(possibleKeys.at(pkNum), index);
++ curKsl.setKey(possibleKeys.at(pkNum) & ~ignoredModifiers, index);
+ }
+ }
+ }
+diff -up qtbase-opensource-src-5.4.1/src/gui/kernel/qshortcutmap_p.h.QTBUG-33093 qtbase-opensource-src-5.4.1/src/gui/kernel/qshortcutmap_p.h
+--- qtbase-opensource-src-5.4.1/src/gui/kernel/qshortcutmap_p.h.QTBUG-33093 2015-02-16 22:56:48.000000000 -0600
++++ qtbase-opensource-src-5.4.1/src/gui/kernel/qshortcutmap_p.h 2015-05-06 14:27:40.637978022 -0500
+@@ -88,10 +88,10 @@ private:
+ QKeySequence::SequenceMatch state();
+ void dispatchEvent(QKeyEvent *e);
+
+- QKeySequence::SequenceMatch find(QKeyEvent *e);
++ QKeySequence::SequenceMatch find(QKeyEvent *e, int ignoredModifiers = 0);
+ QKeySequence::SequenceMatch matches(const QKeySequence &seq1, const QKeySequence &seq2) const;
+ QVector<const QShortcutEntry *> matches() const;
+- void createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl);
++ void createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl, int ignoredModifiers);
+ void clearSequence(QVector<QKeySequence> &ksl);
+ int translateModifiers(Qt::KeyboardModifiers modifiers);
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/qt5-qtbase.git/commit/?h=f22&id=7f1b5be863073730ad55d8999747c6da2a05dd44
More information about the scm-commits
mailing list