KTempFile->QTemporaryFile

Benjamin Meyer ben at meyerhome.net
Mon Sep 18 09:44:15 BST 2006


On Sunday 17 September 2006 19:04, Jaison Lee wrote:
> OK, I've attached a candidate KTemporaryFile class. It should be
> sufficient to start porting over KTempFile calls. I'm purposefully not
> going to describe how it works here because I want to make sure the
> apidox are descriptive enough. Please look it over if you are
> interested and if you see anything alarming let me now as soon as
> possible; I'd like to try and hit the Monday window so I can start
> porting calls.
>
> Remaining questions include:
> 1) Is it worth retaining KTempFile as K3TempFile or should we just get
> rid of it? How long is the K3 stuff supposed to be around, anyway?
> 2) Should KTempDir be renamed to KTemporaryDir for consistency sake?
>
> And since I know *someone* is going to notice and ask about it if I
> don't clarify things here: the lack of getters for the
> setPrefix()/setSuffix() calls is by design and not by mistake. Given
> the following example:
>
> KTemporaryFile temp;
> temp.setPrefix("myfile");
>
> there would be confusion as to whether a call to prefix() should
> return "myfile" or "/tmp/kde-user/myfile". For this reason if the
> programmer wishes to interrogate the template he should call
> fileTemplate() and parse things on his own.

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)

-Benjamin Meyer




More information about the kde-core-devel mailing list