'lightweight' QDir::isAbsolutePath replacement ?

Ralf Habacker ralf.habacker at freenet.de
Mon Mar 10 19:20:42 GMT 2008


Thiago Macieira schrieb:
> Ralf Habacker wrote:
>   
>> But - now the main question - is anyone from the trolltech devs here who
>> 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 the 
> 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

PS: I have not thoughed the non static related member methods

Regards
Ralf


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qt-corelib-isAbsolutePath.patch
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080310/2aa2f9a0/attachment.ksh>


More information about the kde-core-devel mailing list