Skip to content

Add KArchive::writeData(QByteArrayView) overload, make virtual a do*() one

Using KArchive::doWriteData() for the virtual method makes the pattern consistent with prepareWriting & finishWriting. It also avoids the need to add "using KArchive::writeData" to subclasses reimplementing the virtual method, as now needed with the overload.

Open question:
currently the type used for size with the writeData() method is qint64, matching what is also seen with QIODevice. Does this make sense here for writing chunks of data? Or would we just remove reduce this to qsietype, given chunks of working memory might not be larger than what qsizetype (& malloc) can provide, or is there a chance? Answered.

Edited by Friedrich W. H. Kossebau

Merge request reports