diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2023-03-29 18:15:06 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2023-08-24 13:51:36 +0000 |
commit | 828acefc8a108f9dbae46d45e9870ba41576a017 (patch) | |
tree | 70b4683292000d1d245e2eb845985dba3be38e85 | |
parent | 6e853572c5ee614687987db6b8d8506c5971ee5c (diff) |
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>
-rw-r--r-- | src/corelib/global/qnamespace.h | 6 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 5 | ||||
-rw-r--r-- | src/testlib/qasciikey.cpp | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 7dc854aaa6..b6f12a625f 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -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, diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 54ed5a6096..d3dc181903 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -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 diff --git a/src/testlib/qasciikey.cpp b/src/testlib/qasciikey.cpp index a4b6a14f35..114b757dc4 100644 --- a/src/testlib/qasciikey.cpp +++ b/src/testlib/qasciikey.cpp @@ -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); |