'lightweight' QDir::isAbsolutePath replacement ?

Thiago Macieira thiago at kde.org
Fri Mar 14 14:38:13 GMT 2008


On Friday 14 March 2008 14:56:16 Ralf Habacker wrote:
> bool QDir::isRelativePath(const QString &path)
> {
>     bool a = QFileInfo(path).isRelative();
>     bool b = QFileInfo::isRelative(path);
>     if (a != b)
>         qDebug() << path << a << b;
>     return a;
> }
>
[snip]
> it looks that the new implementation seems to assume that a path
> starting with '\' is a relative path.

Ah, I see! It's missing the conversion to Qt separators.


-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080314/9fb09ef4/attachment.sig>


More information about the kde-core-devel mailing list