Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
6.4.0
-
None
-
Linux e5-2620v2 6.0.1-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 13 Oct 2022 18:58:49 +0000 x86_64 GNU/Linux
Description
We currently have this constructor:
QByteArray(qsizetype size, char ch) |
This does 2 things: sets an initial size and initializes using ch. This violates the principle of orthogonality, which stipulates a function should do only 1 thing. Therefore I propose an additional constructor:
QByteArray(qsizetype size) |
that would set an initial size, but perform no initialization.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-107686 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
438697,3 | Doc: document QString and QByteArray's Qt::Initialization ctors | dev | qt/qtbase | Status: NEW | +2 | 0 |