Qt 6.8.3 with BlackBerry 10 (QNX 8 / ARMv7) patches
 
 
 
 
 
 
Go to file
Giuseppe D'Angelo 6e2c9dc7a6 QKeyCombination: move the operators into namespace Qt
QKeyCombination comes with a few operators that combine a Qt::Modifier
and a Qt::Key. These operators are normally defined in Qt's own
namespace (which by default is the global namespace), but indeed the
arguments are declared in the (nested) namespace `Qt`. This is wrong,
as their lookup will fail if a user places an unrelated operator| in
a custom namespace U and then tries to use QKeyCombination's operators:
the overload in namespace U will hide the ones defined globally;
unqualified lookup (as per [over.match.oper]) will search in the
namespaces associated with the parameters (QtNamespace::Qt), but the
operators are *not* in there!

In other words:

namespace NS {
  X operator|(Y, Z);
  auto kc = Qt::Shift | Qt::Key_A;
}

fails to compile if QKeyCombination's operator| is *not* defined in the
`Qt` namespace.

Fix this by indeed defining the operator where it belongs. The functions
are all inline and non-exported so there should not be any ABI issues.

Change-Id: I6d7a4e976fb109b7bf514011142b9a9573e507c5
Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-126820
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1f77e8566f71d98f4bc6bbf5092594e67a32f268)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-31 15:21:36 +00:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
LICENSES Use SPDX identifier to Wintab attribution 2024-06-24 10:03:44 +00:00
bin cmake: Override generator for iOS projects to Xcode in qt-cmake.in 2024-03-18 22:34:48 +01:00
cmake CMake: Allow generating and verifying a source SBOM using 'reuse' tool 2024-07-24 12:38:15 +00:00
coin coin: Add instructions for running license checker during test phase 2024-07-30 12:50:37 +00:00
config.tests Add copyright and licensing to .cpp and .h files missing them 2024-05-28 09:47:01 +02:00
dist Remove dist/README 2024-02-29 15:35:57 +01:00
doc Doc: Add macros for generating a grid structure of items 2024-07-01 11:44:37 +00:00
examples Widget gallery example: set color scheme before constructing UI 2024-06-11 19:35:30 +00:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec CMake: Allow building all examples as standalone just like tests 2024-03-14 11:44:16 +01:00
mkspecs wasm: Update Emscripten to 3.1.56 2024-07-12 01:42:29 +00:00
qmake CMake: Only build QtLibraryInfo if we are building tools 2024-07-21 12:42:33 +00:00
src QKeyCombination: move the operators into namespace Qt 2024-07-31 15:21:36 +00:00
tests QKeyCombination: move the operators into namespace Qt 2024-07-31 15:21:36 +00:00
util Update CLDR to v45, adding language Kuvi 2024-07-17 12:57:30 +02:00
.cmake.conf Add preliminary support for Qt for visionOS 2024-04-18 05:00:57 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Git ignore Visual Studio CMake build directories 2023-11-24 23:42:05 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt cmake: add _extra_files IDE target from heuristics 2024-04-12 08:36:01 +08:00
config_help.txt CMake: Generate an SPDX v2.3 SBOM file for each built repository 2024-06-13 14:55:07 +00:00
configure Change configure license 2024-02-02 15:23:02 +00:00
configure.bat configure.bat: Fix errors on Windows 2024-03-05 11:56:24 +01:00
configure.cmake Disable -ftrivial-auto-var-init=pattern on GCC < 14.2 2024-07-25 20:06:40 +00:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
licenseRule.json Add license exception 2024-04-24 19:02:09 +02:00
qt_cmdline.cmake configure: accept -c++std c++17 again 2024-06-13 20:40:06 +00:00