mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
We use char_type, not size_t for storing UCS4 characters.
This may make a difference when char_type is signed. * src/frontends/LyXKeySym.h (getUCSEncoded): change return type from size_t to char_type * src/frontends/qt4/QLyXKeySym.[Ch] (getUCSEncoded): ditto * src/lyxfunc.C (LyXFunc::processKeySym): adjust to the above and add a FIXME since this is strange code that looks like it was not intended to do what it does. * src/lyxfunc.h (encoded_last_key): Correct documentation git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16833 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cb71a1c869
commit
9281cd4675
@ -57,7 +57,7 @@ public:
|
||||
* Return the value of the keysym into the UCS-4 encoding.
|
||||
* This converts the LyXKeySym to a 32-bit encoded character.
|
||||
*/
|
||||
virtual size_t getUCSEncoded() const = 0;
|
||||
virtual char_type getUCSEncoded() const = 0;
|
||||
|
||||
/**
|
||||
* Return a string describing the KeySym with modifier mod.
|
||||
|
@ -201,7 +201,7 @@ string QLyXKeySym::getSymbolName() const
|
||||
}
|
||||
|
||||
|
||||
size_t QLyXKeySym::getUCSEncoded() const
|
||||
char_type QLyXKeySym::getUCSEncoded() const
|
||||
{
|
||||
if (text_.isEmpty())
|
||||
return 0;
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
* Return the value of the keysym into the UCS-4 encoding.
|
||||
* This converts the LyXKeySym to a 32-bit encoded character.
|
||||
*/
|
||||
virtual size_t getUCSEncoded() const;
|
||||
virtual char_type getUCSEncoded() const;
|
||||
|
||||
/**
|
||||
* Return a human-readable version of a key+modifier pair.
|
||||
|
@ -296,7 +296,9 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
|
||||
|
||||
//Encoding const * encoding = view()->cursor().getEncoding();
|
||||
//encoded_last_key = keysym->getISOEncoded(encoding ? encoding->name() : "");
|
||||
size_t encoded_last_key = keysym->getUCSEncoded();
|
||||
// FIXME: encoded_last_key shadows the member variable of the same
|
||||
// name. Is that intended?
|
||||
char_type encoded_last_key = keysym->getUCSEncoded();
|
||||
|
||||
// Do a one-deep top-level lookup for
|
||||
// cancel and meta-fake keys. RVDK_PATCH_5
|
||||
|
@ -88,7 +88,7 @@ private:
|
||||
///
|
||||
LyXView * lyx_view_;
|
||||
|
||||
/// the last character added to the key sequence, in ISO encoded form
|
||||
/// the last character added to the key sequence, in UCS4 encoded form
|
||||
char_type encoded_last_key;
|
||||
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user