[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: 'lightweight' QDir::isAbsolutePath replacement ?
From:       Ralf Habacker <ralf.habacker () freenet ! de>
Date:       2008-03-17 11:08:16
Message-ID: 47DE5120.1090704 () freenet ! de
[Download RAW message or body]

Thiago Macieira schrieb:
> 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.
>
>
>   
Wasn't this case covered by your test case ?
I used  the following pattern

    QStringList isAbsolutePattern;
    isAbsolutePattern << "" << "/" << "\\" << "C:/fdfdf" << "c:\\dfdffd" 
<< "/edrfdfdf" << "\\dfdfdfdf" << "\\\\dfdfdfdf";
    QStringList isRelativePattern;
    isRelativePattern << "sdsd" << "Cssss" << "." ;


Ralf


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic