CSS Parser and Qt/e 2.

Luciano Montanaro mikelima at cirulla.net
Fri Jan 27 14:31:17 GMT 2006


On Friday 27 January 2006 15:02, Maks Orlovich wrote:
> On Friday 27 January 2006 08:47, Stefan Eilers wrote:
> > Am Freitag, 27. Januar 2006 11:00 schrieb Luciano Montanaro:
> > > Actually, what I don't understand is why doing a (conditional, if the
> > > arch endiannes requires it) byte swapping does not work.
> >
> > Manual byte swapping is easy but will force me to change the code at
> > many other positions as long as all conversion from unsigned short back
> > to QChar will fail. I would have to find all conversions and change
> > them by hand. I
>
> I would suggest just doing it in runParser(). Another option may be to
> adjust YY_SC_TO_UI and CSSParser::text but honestly, the risks of making
> a mistake/number of  changes needed are much larger there.

You cannot, since runParser() is called from multiple points, and some of 
the input is genereted directly like:

const char constantstring[] = "some header stuff";
data[i] = constanststring[i] & 0xff;

So in runParser() you get part of the string with an ordering and the other 
part with the other.

On the other hand, I have the suspect that Stefan has qt misconfigured 
now...

-- 
Luciano Montanaro //
              \\ //
               \x/ www.cirulla.net




More information about the kfm-devel mailing list