mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
use qint16 type for KeyNameTblSize
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
20d1c5c006
commit
36bbc3d36b
1 changed files with 3 additions and 3 deletions
|
@ -399,7 +399,7 @@ static const struct KeyNameTblData {
|
||||||
{ Qt::Key_PreviousCandidate,QT_TRANSLATE_NOOP("QShortcut", "Previous Candidate") },
|
{ Qt::Key_PreviousCandidate,QT_TRANSLATE_NOOP("QShortcut", "Previous Candidate") },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const short KeyNameTblSize = sizeof(KeyNameTbl) / sizeof(KeyNameTblData);
|
static const qint16 KeyNameTblSize = sizeof(KeyNameTbl) / sizeof(KeyNameTblData);
|
||||||
|
|
||||||
// Table of key bindings, must be sorted by standard key priority
|
// Table of key bindings, must be sorted by standard key priority
|
||||||
const QKeyBinding QKeySequencePrivate::keyBindings[] = {
|
const QKeyBinding QKeySequencePrivate::keyBindings[] = {
|
||||||
|
@ -889,7 +889,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
|
||||||
// For NativeText, check the traslation table first,
|
// For NativeText, check the traslation table first,
|
||||||
// if we don't find anything then try it out with just the untranlated stuff.
|
// if we don't find anything then try it out with just the untranlated stuff.
|
||||||
// PortableText will only try the untranlated table.
|
// PortableText will only try the untranlated table.
|
||||||
for (ushort i = 0; i < KeyNameTblSize; ++i) {
|
for (qint16 i = 0; i < KeyNameTblSize; ++i) {
|
||||||
QString keyName(nativeText
|
QString keyName(nativeText
|
||||||
? QShortcut::tr(KeyNameTbl[i].name)
|
? QShortcut::tr(KeyNameTbl[i].name)
|
||||||
: QString::fromLatin1(KeyNameTbl[i].name));
|
: QString::fromLatin1(KeyNameTbl[i].name));
|
||||||
|
@ -943,7 +943,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
|
||||||
: QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
|
: QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
|
||||||
} else if (key) {
|
} else if (key) {
|
||||||
bool foundmatch = false;
|
bool foundmatch = false;
|
||||||
for (ushort i = 0; i < KeyNameTblSize; i++) {
|
for (qint16 i = 0; i < KeyNameTblSize; i++) {
|
||||||
if (KeyNameTbl[i].key == key) {
|
if (KeyNameTbl[i].key == key) {
|
||||||
p = nativeText ? QShortcut::tr(KeyNameTbl[i].name)
|
p = nativeText ? QShortcut::tr(KeyNameTbl[i].name)
|
||||||
: QString::fromLatin1(KeyNameTbl[i].name);
|
: QString::fromLatin1(KeyNameTbl[i].name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue