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

List:       kde-core-devel
Subject:    Re: KTempFile->QTemporaryFile
From:       "Jaison Lee" <lee.jaison () gmail ! com>
Date:       2006-09-18 13:52:53
Message-ID: 2d720bd30609180652n4f89964dv400734fcde5d72f4 () mail ! gmail ! com
[Download RAW message or body]

> Do you think it makes sense to have a constructor that matches what we had in
> KDE3?
>
> KTempFile (QString filePrefix=QString::null, QString
> fileExtension=QString::null)

I don't feel VERY strongly about it, but I decided against something
like this for two reasons:

1) I don't want to confuse users of QTemporaryFile and KTempFile. I
don't want QTemporaryFile users to think that setting the file
template is EXACTLY the same as setting the prefix (it's not) and I
don't want KTempFile users thinking that they can make a
KTemporaryFile in the same way as a KTempFile and have it work EXACTLY
the same as before (they still have to call setAutoRemove(false) and
open() to maintain identical behavior).

2) There is definately a movement towards simpler constructors right
now, and most of this variety of KTempFile calls I've seen end up
being rather long because they do things like:

KTempFile temp(KStandardDirs::locateLocal("appdata",
fileinfo.basename()), fileinfo.extension());

That's an awful lot of info to parse. :)
[prev in list] [next in list] [prev in thread] [next in thread] 

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