Jaison Lee lee.jaison at gmail.com
Mon Sep 18 14:52:53 BST 2006

> 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. :)

More information about the kde-core-devel mailing list