Adds QBuffer::setBuffer(QByteArray) support to KWQBuffer also adds QBuffer(QByteArray) constructor. The only thing I'm not sure about in this patch is the "open" state after setBuffer. However, I'm also pretty sure that it doesn't matter... at least for this minimalist implementation of QBuffer. Again code has been tested locally and does not affect the rest of WebKit.
Created attachment 2577 [details] Adds setBuffer() support and a QByteArray based constructor
Comment on attachment 2577 [details] Adds setBuffer() support and a QByteArray based constructor Formatting of QBuffer::setBuffer does not match our coding guidelines. The "{" should be on the line after the declaration, not on the same line. Also, the "if (isOpen()) return false;" should be broken into two lines rather than together on one. Other than the coding guidelines issue, this looks great.
Created attachment 2589 [details] Formatting oversights now fixed.
Comment on attachment 2589 [details] Formatting oversights now fixed. The parameter to the QBuffer constructor should be QByteArray, not QByteArray &, to match Qt. If it's going to be a reference, then I suggest that we make it const QByteArray & and do the same with the parameter to setBuffer. Otherwise, looks good.
Created attachment 2606 [details] Fixed QByteArray &
Comment on attachment 2606 [details] Fixed QByteArray & r=me