Kornel Benko <[EMAIL PROTECTED]> writes:

| > | +     QString s = ev->text();
| > | +     lyxerr[Debug::KEY] << " unicode of key is";
| > | +     for (int i = 0; i < s.length(); i++) {
| >
| > i++ -> ++i
| 
| Matter of taste here ...

No, not really.
(only since i is POD)

| > s.ref(0) == QChar(0)
| > would look better to me.
| 
| Yes. But it doesn't work. (I tried!)

Then the question is: Why?

ref does return QChar, right?

Btw, what does it signify that ref(0) is 0?


| > | +             xx[0] = ev->ascii();
| > | +             xx[1] = '\0';
| > | +             s = xx;
| >
| > Can't
| >
| > s = ev->ascii()
| >
| > be used?
| > (why not?)
| 
| 
|       int QKeyEvent::ascii() const
| is not char. I was unsure. But your version seems to work.
| 
| ...
| 
| So, next patch attached.

Ok, will have a look again, but I will probably leave it to John to
apply this.

-- 
        Lgb

Reply via email to