Bug 3673 - GW: Add QBuffer::setBuffer(QByteArray) support to KWQBuffer
Summary: GW: Add QBuffer::setBuffer(QByteArray) support to KWQBuffer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P3 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks: 3250
  Show dependency treegraph
 
Reported: 2005-06-23 02:56 PDT by Eric Seidel (no email)
Modified: 2005-06-24 14:20 PDT (History)
0 users

See Also:


Attachments
Adds setBuffer() support and a QByteArray based constructor (1.06 KB, patch)
2005-06-23 02:58 PDT, Eric Seidel (no email)
darin: review-
Details | Formatted Diff | Diff
Formatting oversights now fixed. (1.07 KB, patch)
2005-06-23 09:23 PDT, Eric Seidel (no email)
darin: review-
Details | Formatted Diff | Diff
Fixed QByteArray & (1.07 KB, patch)
2005-06-23 12:55 PDT, Eric Seidel (no email)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2005-06-23 02:56:26 PDT
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.
Comment 1 Eric Seidel (no email) 2005-06-23 02:58:21 PDT
Created attachment 2577 [details]
Adds setBuffer() support and a QByteArray based constructor
Comment 2 Darin Adler 2005-06-23 07:14:47 PDT
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.
Comment 3 Eric Seidel (no email) 2005-06-23 09:23:35 PDT
Created attachment 2589 [details]
Formatting oversights now fixed.
Comment 4 Darin Adler 2005-06-23 10:01:40 PDT
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.
Comment 5 Eric Seidel (no email) 2005-06-23 12:55:22 PDT
Created attachment 2606 [details]
Fixed QByteArray &
Comment 6 Darin Adler 2005-06-23 22:58:06 PDT
Comment on attachment 2606 [details]
Fixed QByteArray &

r=me