ShiftHandler: QSet → std::array [4/4]: allCapsInputModeFilter


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 allCapsInputModeFilter, too.

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

Taken together, the change from QSets to std::arrays disappointingly
only safes a few bytes in TEXT size, but the important bit is that
there's no longer a per-object setup cost since the data structures
are set up at compile time, and that adding new entries no longer
destroys git history due to the one-liner init code that was there
before.

Amends 506d877b8b618caff34f9b71db12f17c7350c428 (5.6/"1.3").

Pick-to: 6.11 6.8
Change-Id: I5d6adb6b0117fcec50ead1c43b6141166da60c62
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
commit61bb8c93b1cd87cd6dc267f7f48f78cb8162fbdb
parent20cc788bb883a7093b703d42ae93b3f8afb5078a
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeFri, 8 May 2026 12:42:33 +0000