-----BEGIN PGP SIGNED MESSAGE-----
On Sonntag, 8. Dezember 2002 21:51, John Levon wrote:
> > The unicode is NOT zero now.
> > (gdb) p (int) s.ref(0)
> > $5 = 1083441377 == 0x409400E1
> >
> > The last byte (0xE1) is clearly aacute, but I cannot interpret the
> > others.
> >
> > The key is 65535!, which I didn't expect either.
>
> I have no idea about this. We really need help from Trolltech to find
> out what is going on ...
This version of QLyXKeySym::set() works now. It seems to be sufficient to reset the
key_ ...
void QLyXKeySym::set(QKeyEvent * ev)
{
key_ = ev->key();
{
QString s = ev->text();
lyxerr[Debug::KEY] << " unicode of key is";
if ( !s.isNull()) {
for (int i = 0; i < s.length(); ++i) {
QChar const a = s.ref(i);
lyxerr[Debug::KEY] << " " << a.unicode();
}
if (!s.isEmpty()) {
lyxerr[Debug::KEY] << " ascii == " << ev->ascii();
}
if ((s.length() == 1) && ( key_ == Qt::Key_unknown)) {
if ((int) s.ref(0) == 0) {
s = ev->ascii();
}
key_ = 0;
}
}
text_ = s;
lyxerr[Debug::KEY] << endl;
}
if ( !text_.isNull()) {
lyxerr[Debug::KEY] << "Setting key to " << key_ << ", " << text_.latin1() <<
endl;
}
else {
lyxerr[Debug::KEY] << "Setting key to " << key_ << ", <none>" << endl;
}
}
........................................
Interresting: sometimes is
ev->text().length() == 1
and at the same time
ev->text().isNull == true
which caused the logging to stop. ( lyxerr[Debug::KEY] << text_.latin1() )
Kornel
P.S.
Phew...
- --
Kornel Benko
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
iQCVAwUBPfPEBbewfbDGmeqhAQGZZgQAoAfygDz0A53wuHZwC2HtEK8zD1z+/54A
hsm0WvcVE4VuiTkWSM6Ujh3jaghv+VD2gsoClY5zeEGw8PvliUFeZd7qiB436I4P
bglAadMfB/UtenPL7c0kSOD4U/1W/8+4t7P5Q8/R6GMRFM67I+Bom/WbjGbhmS6N
YXcvjo3cTiI=
=GHER
-----END PGP SIGNATURE-----