About KArchive::data()

Szombathelyi György gyurco at freemail.hu
Mon Nov 5 20:51:17 GMT 2007


Hello,

I've got some problem about KArchive::data() method:
If the file is rather large, this method tries to return the whole file in one 
QByteArray. That could easily fill all the available memory, trash the disk 
till the system runs out of swap space. I suggest changing it to "QByteArray 
KArchive::data(qint64 size)", where size means the chunk size which should be 
returned. The caller should call data(size) till the returned 
QByteArray.isEmpty().
Opinions?

Regards,
György




More information about the kde-core-devel mailing list