--nextPart1314640.uf7CvPNWAH Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 10 March 2008 20:20:42 Ralf Habacker wrote: > Thiago Macieira schrieb: > > Ralf Habacker wrote: > >> But - now the main question - is anyone from the trolltech devs here w= ho > >> can ensure that such a patch would be accepted ? > > > > Yes. > > > > Everybody laughed at lunch when I explained the number of classes it had > > to go through just to do some string comparisons (on Unix, to look at t= he > > first character). > > > > Depending on the size of the patch, I'll push it to Qt 4.4. > > The patch is appended. It adds > static bool QFileInfo::isAbsolute(const QString &path); > static bool QFileInfo::isRelative(const QString &path); > > and fixes > static bool QDir::isAbsolutePath(const QString &path); > static bool QDir::isRelativePath(const QString &path); > > all the above mentioned methods are based on > static bool QFSFileEngine:isAbsolutePath(const QString &path); > static bool QFSFileEngine::isRelative(const QString &path); > > which makes the internal string compare functions accesable I have looked at the patch and it looks sane. At least, it didn't break any= =20 existing tests we have. HOWEVER, it introduces a possibly bad behaviour change: if you have: QFile("foo:filename.html"); using a dedicated file engine, only that file engine is capable of knowing= =20 whether the given filename is an absolute path or not. Note how there are n= o=20 slashes in the given filename (it's *not* a URL), but it still could be=20 considered an absolute path. So I don't think we can escape the creation of a file engine. The best I ca= n=20 do is go through the attempts to create, but in case of fallback to the=20 default file engine, not create it. I'll work on this a little more. =2D-=20 =C2=A0 Thiago Macieira =C2=A0- =C2=A0thiago (AT) macieira.info - thiago (AT= ) kde.org =C2=A0 =C2=A0 PGP/GPG: 0x6EF45358; fingerprint: =C2=A0 =C2=A0 E067 918B B660 DBD1 105C =C2=A0966C 33F5 F005 6EF4 5358 --nextPart1314640.uf7CvPNWAH Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iD8DBQBH1oK7M/XwBW70U1gRApa7AJ9NrxQjygU8dRCEJvdeePjr2qcQvQCfcqeV aOCl1uuSjXBGciVe+L55tGY= =AkWm -----END PGP SIGNATURE----- --nextPart1314640.uf7CvPNWAH--