KTar + KTempFile + QFilePrivate::openExternalFile

Sascha Cunz sascha.cunz at tiscali.de
Sat Sep 17 09:53:25 BST 2005


Hi Nicolas,

> > KTar then furhter assumes, that the retuned QFile has to be closed, which
> > is not posible according to Qt3.3 and Qt4.0 docs. However, KTar calls
> > QFile::close, then later KTar::KTarPrivate::fillTempFile where the QFile
> > is closed again (why ever?). No it opens the file for write-only. This is
> > where Qt barks, because the QFile has no fileName() attached to it.
>
> Does this mean that you have the same problem with KDE 3.5.x with Qt 3.3.x
> too? (I have never seen such a problem.)

No, actually not. This "problem" is kdelibs4 specific (because behaviour of Qt 
changed). I never noticed a KTar or KTempFile problem in KDE 3.x.

Though, Qt3 docs says too, that calling QFile::close() after calling 
QFile::open(FILE*, OpenMode) does nothing but flush the file.

All i wanted to say is, that the comment in KTar that says "File has to be 
closed to be used for KArchive::setDevice(QIODevice*)" is plain wrong. 
Because it ain't closed according to Qt-Docs.

Cheers Sascha




More information about the kde-core-devel mailing list