<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/qt5/qtbase.git/tests/auto/corelib/tools, branch dev</title>
<subtitle>code.qt.io: qt/qtbase.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/'/>
<entry>
<title>QVarLengthArray/QList: make assign() return a reference to *this</title>
<updated>2023-05-17T04:44:45+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2023-05-11T12:17:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=8712e35aec2c072fe709364eaa69bb8928c5cacc'/>
<id>8712e35aec2c072fe709364eaa69bb8928c5cacc</id>
<content type='text'>
While std::vector::assign() returns void, std::basic_string::assign()
returns std::basic_string&amp;. In Qt, we want to be consistent between
{QVLA,QList,QString,QByteArray}::assign(), and returning *this is the
more general solution, so do that.

Task-number: QTBUG-106196
Task-number: QTBUG-106200
Change-Id: I2689b4af032ab6fb3f8fbcb4d825d5201ea5abeb
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While std::vector::assign() returns void, std::basic_string::assign()
returns std::basic_string&amp;. In Qt, we want to be consistent between
{QVLA,QList,QString,QByteArray}::assign(), and returning *this is the
more general solution, so do that.

Task-number: QTBUG-106196
Task-number: QTBUG-106200
Change-Id: I2689b4af032ab6fb3f8fbcb4d825d5201ea5abeb
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QList: re-use the prepend buffer, if any, on assign()</title>
<updated>2023-05-17T04:44:39+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2023-05-10T16:09:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=782ccc6de5950ff1f6d3eeaaeacc7af4bc97a84f'/>
<id>782ccc6de5950ff1f6d3eeaaeacc7af4bc97a84f</id>
<content type='text'>
Task-number: QTBUG-106196
Change-Id: I62d8610529cab528ae1b114d29707133b4fc28dc
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Task-number: QTBUG-106196
Change-Id: I62d8610529cab528ae1b114d29707133b4fc28dc
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QList: add STL-style assign()</title>
<updated>2023-05-16T18:09:39+00:00</updated>
<author>
<name>Dennis Oberst</name>
<email>dennis.oberst@qt.io</email>
</author>
<published>2023-04-03T15:16:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=bbbe5f45c4d354ef977d4e09459ef5ae4d6db0da'/>
<id>bbbe5f45c4d354ef977d4e09459ef5ae4d6db0da</id>
<content type='text'>
Implemented assign() methods for QList to align with the criteria of
std::vector, addressing the previously missing functionality.

Reference:
https://en.cppreference.com/w/cpp/container/vector/assign

[ChangeLog][QtCore][QList] Added assign().

Fixes: QTBUG-106196
Change-Id: I5df8689c020dafde68d2cd7d09c769744fa8f137
Reviewed-by: Marc Mutz &lt;marc.mutz@qt.io&gt;
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implemented assign() methods for QList to align with the criteria of
std::vector, addressing the previously missing functionality.

Reference:
https://en.cppreference.com/w/cpp/container/vector/assign

[ChangeLog][QtCore][QList] Added assign().

Fixes: QTBUG-106196
Change-Id: I5df8689c020dafde68d2cd7d09c769744fa8f137
Reviewed-by: Marc Mutz &lt;marc.mutz@qt.io&gt;
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tst_ContainerApiSymmetry: fix spacing of template &lt;typename</title>
<updated>2023-05-16T18:09:39+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2023-05-16T08:27:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=d8bdb66e82b0a248d4bbc9f3898f3d8b61620dbd'/>
<id>d8bdb66e82b0a248d4bbc9f3898f3d8b61620dbd</id>
<content type='text'>
This file, like the majority of qtbase, uses a space between template
and the opening of the template argument list. Add it.

Change-Id: I927cb2b1b9620ae108e913343d995373493e8981
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This file, like the majority of qtbase, uses a space between template
and the opening of the template argument list. Add it.

Change-Id: I927cb2b1b9620ae108e913343d995373493e8981
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Darwin: Remove QMacAutoReleasePool heap allocation detection</title>
<updated>2023-05-15T13:51:00+00:00</updated>
<author>
<name>Tor Arne Vestbø</name>
<email>tor.arne.vestbo@qt.io</email>
</author>
<published>2023-05-09T14:17:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=e95f03f989b73bddb52a54fed6a89428de151b09'/>
<id>e95f03f989b73bddb52a54fed6a89428de151b09</id>
<content type='text'>
This is handled by the Objective-C runtime nowadays, where it will
abort if the situation is detected, with the option to break on
objc_autoreleasePoolInvalid to debug the situation.

Pick-to: 6.5
Change-Id: Idf2c4aacc77e41a3deebf270303f4f13cfb0819b
Reviewed-by: Timur Pocheptsov &lt;timur.pocheptsov@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is handled by the Objective-C runtime nowadays, where it will
abort if the situation is detected, with the option to break on
objc_autoreleasePoolInvalid to debug the situation.

Pick-to: 6.5
Change-Id: Idf2c4aacc77e41a3deebf270303f4f13cfb0819b
Reviewed-by: Timur Pocheptsov &lt;timur.pocheptsov@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up phrasing of --help-all and other help options</title>
<updated>2023-05-15T12:02:43+00:00</updated>
<author>
<name>Edward Welbourne</name>
<email>edward.welbourne@qt.io</email>
</author>
<published>2023-05-03T12:39:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=526ce669ed41e3285fb13a1e3f394d7722db3ab3'/>
<id>526ce669ed41e3285fb13a1e3f394d7722db3ab3</id>
<content type='text'>
The options included by --help-all, although they are "specific to
Qt", are "specific" to all Qt applications, so - in the present
context, of QCommandLineParser - not specific at all. It's the options
described by -h that are specific, to the present command; the Qt
options are generic (in the present context).

So rework the help string for --help-all itself and the documentation
of the function. It had, in any case, an overly-complex first line,
that descended into too much detail. Updated test to match.

Pick-to: 6.5
Task-number: QTBUG-111228
Change-Id: I06da0af41be60e6e1b7616984001ddb9ca33aad6
Reviewed-by: Marc Mutz &lt;marc.mutz@qt.io&gt;
Reviewed-by: David Faure &lt;david.faure@kdab.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The options included by --help-all, although they are "specific to
Qt", are "specific" to all Qt applications, so - in the present
context, of QCommandLineParser - not specific at all. It's the options
described by -h that are specific, to the present command; the Qt
options are generic (in the present context).

So rework the help string for --help-all itself and the documentation
of the function. It had, in any case, an overly-complex first line,
that descended into too much detail. Updated test to match.

Pick-to: 6.5
Task-number: QTBUG-111228
Change-Id: I06da0af41be60e6e1b7616984001ddb9ca33aad6
Reviewed-by: Marc Mutz &lt;marc.mutz@qt.io&gt;
Reviewed-by: David Faure &lt;david.faure@kdab.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tst_ContainerApiSymmetry: make assign_impl() robust w.r.t. overallocation</title>
<updated>2023-05-13T14:58:36+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2023-05-10T19:23:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=3b0536bbe8d6782f79e1bcc2b4f1925547c14c0b'/>
<id>3b0536bbe8d6782f79e1bcc2b4f1925547c14c0b</id>
<content type='text'>
The parameter passed to reserve() is just a hint. The container
implementation is free to choose a larger capacity, and some do
(e.g. QList in prepend optimization mode).

Fix the test by querying the container for its post-make&lt;&gt;()
capacity() and taking a larger-than-expected initial capacity() into
account when later re-checking the capacity().

Change-Id: Id8f26f14e8df9d685ca2387ec4a52d74fea7cb9d
Reviewed-by: Ivan Solovev &lt;ivan.solovev@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The parameter passed to reserve() is just a hint. The container
implementation is free to choose a larger capacity, and some do
(e.g. QList in prepend optimization mode).

Fix the test by querying the container for its post-make&lt;&gt;()
capacity() and taking a larger-than-expected initial capacity() into
account when later re-checking the capacity().

Change-Id: Id8f26f14e8df9d685ca2387ec4a52d74fea7cb9d
Reviewed-by: Ivan Solovev &lt;ivan.solovev@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tst_ContainerApiSymmetry: make a comment more precise</title>
<updated>2023-05-13T14:58:27+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2023-05-10T19:17:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=fb58df3260c1c919814810ecbced4f9db6caf9df'/>
<id>fb58df3260c1c919814810ecbced4f9db6caf9df</id>
<content type='text'>
It took me a sec to figure out the relation between the comment and
the code line following it. Make it easier for the next guy and add a
bit more infos.

Amends 7cbdc8abbda12488f51317313347bbc220b42fe0.

Change-Id: I4ff2d9a52aef643a92339df32cc86f686a689a9a
Reviewed-by: Dennis Oberst &lt;dennis.oberst@qt.io&gt;
Reviewed-by: Ivan Solovev &lt;ivan.solovev@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It took me a sec to figure out the relation between the comment and
the code line following it. Make it easier for the next guy and add a
bit more infos.

Amends 7cbdc8abbda12488f51317313347bbc220b42fe0.

Change-Id: I4ff2d9a52aef643a92339df32cc86f686a689a9a
Reviewed-by: Dennis Oberst &lt;dennis.oberst@qt.io&gt;
Reviewed-by: Ivan Solovev &lt;ivan.solovev@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tst_ContainerApiSymmetry: follow file's style for assign() tests</title>
<updated>2023-05-13T14:58:19+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2023-05-10T18:29:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=4eea3f857c3f1022c39b35dab04fbdee55ca7b2d'/>
<id>4eea3f857c3f1022c39b35dab04fbdee55ca7b2d</id>
<content type='text'>
We use a single line per test slot everywhere else, ignoring even
line-length limitations, to keep the function names aligned for easier
parsing.

Amends 7cbdc8abbda12488f51317313347bbc220b42fe0.

Change-Id: Iaf2941aae88392d407d688fc4a7537fcdc0a5851
Reviewed-by: Dennis Oberst &lt;dennis.oberst@qt.io&gt;
Reviewed-by: Ivan Solovev &lt;ivan.solovev@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We use a single line per test slot everywhere else, ignoring even
line-length limitations, to keep the function names aligned for easier
parsing.

Amends 7cbdc8abbda12488f51317313347bbc220b42fe0.

Change-Id: Iaf2941aae88392d407d688fc4a7537fcdc0a5851
Reviewed-by: Dennis Oberst &lt;dennis.oberst@qt.io&gt;
Reviewed-by: Ivan Solovev &lt;ivan.solovev@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tst_ContainerApiSymmetry: fix mutable lambda anti-pattern</title>
<updated>2023-05-13T14:58:10+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2023-05-10T18:07:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/qt5/qtbase.git/commit/?id=edc953948c814c0729d9e22ac903343d4cead0cc'/>
<id>edc953948c814c0729d9e22ac903343d4cead0cc</id>
<content type='text'>
STL algorithms, in general, don't specify how often the function
objects passed to them are copied during the run of the
algorithm.

While generate_n is above any reasonable suspicion of copying the
function object after the first invocation, passing a mutable lambda
containing the counter is still an anti-pattern we don't want people
to copy.

Fix in the usual way, by keeping the counter external to the lambda.

As a drive-by, replace post- with pre-increment.

Amends dc091e74431acbe66ae7921ba82d3eb34ae8cc55.

Pick-to: 6.5 6.2
Change-Id: I9c44e769fd41e5f7157179a2be4c3534424cf913
Reviewed-by: Ivan Solovev &lt;ivan.solovev@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
STL algorithms, in general, don't specify how often the function
objects passed to them are copied during the run of the
algorithm.

While generate_n is above any reasonable suspicion of copying the
function object after the first invocation, passing a mutable lambda
containing the counter is still an anti-pattern we don't want people
to copy.

Fix in the usual way, by keeping the counter external to the lambda.

As a drive-by, replace post- with pre-increment.

Amends dc091e74431acbe66ae7921ba82d3eb34ae8cc55.

Pick-to: 6.5 6.2
Change-Id: I9c44e769fd41e5f7157179a2be4c3534424cf913
Reviewed-by: Ivan Solovev &lt;ivan.solovev@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
