ShiftHandler: QSet → std::array [2/4]: manualCapsInputModeFilter


These QSets were never modified once constructed, and they were
constructed with a statically known number of entries, so they violate
the Golden Rule of Container Selection:

  Never use a dynamically-sized container for statically-sized data.

In addition, the entries were always the same, so there's no need for
them to be instance variables, they can be class variables^Wconstants
instead, and, since we're in a .cpp file, they can even be
file-static/constexpr.

Finally, there are a maximum of eight entries in these QSets, making
the use of a hashed container overkill. Linear search in a std::array
will be just as fast, if not faster.

So use the tiny wrapper around std::array that was added for
manualShiftLanguageFilter for manualCapsInputModeFilter, too.

As a drive-by, reorder the entries so they are sorted numerically, in
case we ever want to use binary search on them.

Amends 81c0d7d4df40c1130a8e7c98411c045b7eafc475 (5.6).

Pick-to: 6.11 6.8
Change-Id: I6e13a8c309c481134b60970b971f462e86c8d025
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
commita420146e79922ea3e0adb079a11d6e425a5bb624
parent9b5720967e44600d8213c0666978c7c5e0a23c0f
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeWed, 6 May 2026 19:08:40 +0000