Candidate commit: "white-space: pre"
Leo Savernik
l.savernik at aon.at
Mon Dec 27 20:21:00 GMT 2004
Am Montag, 27. Dezember 2004 20:22 schrieb Allan Sandfeld Jensen:
> On Monday 27 December 2004 20:05, Leo Savernik wrote:
> > Am Montag, 27. Dezember 2004 19:27 schrieb Allan Sandfeld Jensen:
> > > Hi everybody and "glædelig jul"
> >
> > You're Swedish? I've always thought you were an US inhabitant.
>
> That is two wrong guesses; I am danish :) (also the Æ should have clued you
> in, since the swedish was too cheap to modify the imported german
> typewriters and mostly ditched æ,ø and å two centuries ago to german
> umlauts)
D'oh, I'd better stop guessing now ;-)
>
[...]
> > > int wordStart, int wordEnd)
> > > {
> > > if (wordEnd <= wordStart) return 0;
> > >
> > > - QConstString s(str + pos + wordStart, wordEnd - wordStart);
> > > - return fm.width(s.string());
> > > + //QConstString s(str + pos + wordStart, wordEnd - wordStart);
> > > + const QString s = str.mid(pos + wordStart, wordEnd - wordStart);
> > > + return fm.width(s);
> >
> > Can you elaborate on that change, please?
>
> The point is that I've added a cleaning run in the beginning of drawText.
> Unfortunatly the function is very unconsistent and uses both the QChar*
> str, the QString qstr and various QConstStrings. Since I've only cleaned
> qstr, I've modified all of the function to more consistent and _only_ work
> with qstr and substrings of it.
But there's still no need to change the helper functions. As the strings
aren't modified in between, it's still safe to pass a pointer to the
string-data. So please leave the helper functions untouched.
mfg
Leo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20041227/0426a2c9/attachment.sig>
More information about the kfm-devel
mailing list