diff options
| author | Sven Brauch <mail@svenbrauch.de> | 2024-09-08 19:43:20 +0200 |
|---|---|---|
| committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-09-08 21:10:36 +0000 |
| commit | cc5a8689c162ee46a0d488d3d0cb40737905ff6f (patch) | |
| tree | 4cda67aac67ea2a2d2e4748ad8096d2747f84a29 /src/gui/kernel/qshortcutmap.cpp | |
| parent | 9e3a96189d9db8a458e65cd5078509afe7a160db (diff) | |
QShortcutMap: add missing const& to setShortcutEnabled
If there are a lot of shortcuts in the map, the old code
caused the QKeySequence to be copied, which caused notable
delays.
Pick-to: 6.8
Change-Id: Ia84e02f453301e046bd834b3d670a78c05c5db07
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel/qshortcutmap.cpp')
| -rw-r--r-- | src/gui/kernel/qshortcutmap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp index 7cd273f57cd..d6fa007ad6f 100644 --- a/src/gui/kernel/qshortcutmap.cpp +++ b/src/gui/kernel/qshortcutmap.cpp @@ -202,7 +202,7 @@ int QShortcutMap::setShortcutEnabled(bool enable, int id, QObject *owner, const int i = d->shortcuts.size()-1; while (i>=0) { - QShortcutEntry entry = d->shortcuts.at(i); + const QShortcutEntry &entry = d->shortcuts.at(i); if ((allOwners || entry.owner == owner) && (allIds || entry.id == id) && (allKeys || entry.keySequence == keySequence)) { |
