Rename Qt::Key_mu to Qt::Key_micro

The old name misleadingly identifies it as the Greek letter on which
it is based (and to which it case-folds); but U+00B5 is MICRO SIGN,
not the Greek letter mu, and pretending it is the latter only leads to
confusion.

Retain the old name as an alias to the new, prepare to deprecate it
from 6.11 and change all uses of it to the new name.

[ChangeLog][QtCore][Qt::Key] Qt::Key_mu is now renamed Key_micro,
since it is, in fact, the micro sign, not the Greek letter mu. The old
name is retained as an alias for the time being.

Change-Id: I4deb905f5e59b906710bd092c05a2c0a9b6bba65
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
bb10
Edward Welbourne 2023-03-29 18:15:06 +02:00 committed by Eskil Abrahamsen Blomfeldt
parent 6e853572c5
commit 828acefc8a
3 changed files with 11 additions and 4 deletions

View File

@ -602,7 +602,11 @@ namespace Qt {
Key_twosuperior = 0x0b2,
Key_threesuperior = 0x0b3,
Key_acute = 0x0b4,
Key_mu = 0x0b5,
Key_micro = 0x0b5,
#if QT_DEPRECATED_SINCE(6, 11)
Key_mu Q_DECL_ENUMERATOR_DEPRECATED_X("This key was misnamed, use Key_micro instead")
= Key_micro,
#endif
Key_paragraph = 0x0b6,
Key_periodcentered = 0x0b7,
Key_cedilla = 0x0b8,

View File

@ -1442,6 +1442,7 @@
\value Key_Help
\value Key_Direction_L
\value Key_Direction_R
\value Key_Space
\value Key_Any
\value Key_Exclam
@ -1533,7 +1534,8 @@
\value Key_twosuperior
\value Key_threesuperior
\value Key_acute
\value Key_mu
\value [since 6.7] Key_micro
\value Key_mu Deprecated alias for Key_micro
\value Key_paragraph
\value Key_periodcentered
\value Key_cedilla
@ -1578,6 +1580,7 @@
\value Key_ssharp
\value Key_division
\value Key_ydiaeresis
\value Key_Multi_key
\value Key_Codeinput
\value Key_SingleCandidate

View File

@ -141,7 +141,7 @@ Qt::Key QTest::asciiToKey(char ascii)
case 0xb2: return Qt::Key_twosuperior;
case 0xb3: return Qt::Key_threesuperior;
case 0xb4: return Qt::Key_acute;
case 0xb5: return Qt::Key_mu;
case 0xb5: return Qt::Key_micro;
case 0xb6: return Qt::Key_paragraph;
case 0xb7: return Qt::Key_periodcentered;
case 0xb8: return Qt::Key_cedilla;
@ -369,7 +369,7 @@ char QTest::keyToAscii(Qt::Key key)
case Qt::Key_twosuperior: return char(0xb2);
case Qt::Key_threesuperior: return char(0xb3);
case Qt::Key_acute: return char(0xb4);
case Qt::Key_mu: return char(0xb5);
case Qt::Key_micro: return char(0xb5);
case Qt::Key_paragraph: return char(0xb6);
case Qt::Key_periodcentered: return char(0xb7);
case Qt::Key_cedilla: return char(0xb8);