Add a almost trivial benchmark for QString::number(int).
Change-Id: Ice67eaf28e8d7b235fd5ec5e0b87b3b9053ae61e
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QString::toUpper() now insists we use its return, so the benchmark
won't compile unless we do so. Also document the helper macro used by
the tests, to explain why it's even there at all.
Change-Id: I830f121d92867bcd09277ecdeb1c764413b34fa6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Modify special case locations to use the new API as well.
Clean up some stale .prev files that are not needed anymore.
Clean up some project files that are not used anymore.
Task-number: QTBUG-86815
Change-Id: I9947da921f98686023c6bb053dfcc101851276b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Export some private functions from QUtf8 to resolve
undefined symbols in Qt5Compat after moving QStringRef.
Task-number: QTBUG-84437
Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Breaks the build if any global header has
using P = SomeType;
statement, and unnecessary to do so before the headers are included.
Change-Id: I3b8cc705bf662f768b8895e4b3ec1428ab39ef27
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Replacement methods do now exist in QRegExp, or
for QRegularExpression when porting to it.
Remove all autotests associated with the old methods.
Change-Id: I3ff1e0da4b53adb64d5a48a30aecd8b960f5e633
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Conflicts:
examples/opengl/doc/src/cube.qdoc
src/corelib/global/qlibraryinfo.cpp
src/corelib/text/qbytearray_p.h
src/corelib/text/qlocale_data_p.h
src/corelib/time/qhijricalendar_data_p.h
src/corelib/time/qjalalicalendar_data_p.h
src/corelib/time/qromancalendar_data_p.h
src/network/ssl/qsslcertificate.h
src/widgets/doc/src/graphicsview.qdoc
src/widgets/widgets/qcombobox.cpp
src/widgets/widgets/qcombobox.h
tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
tests/manual/diaglib/debugproxystyle.cpp
tests/manual/diaglib/qwidgetdump.cpp
tests/manual/diaglib/qwindowdump.cpp
tests/manual/diaglib/textdump.cpp
util/locale_database/cldr2qlocalexml.py
util/locale_database/qlocalexml.py
util/locale_database/qlocalexml2cpp.py
Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.
Updated CMakeLists.txt in each of
tests/auto/corelib/serialization/qcborstreamreader/
tests/auto/corelib/serialization/qcborvalue/
tests/auto/gui/kernel/
and generated new ones in each of
tests/auto/gui/kernel/qaddpostroutine/
tests/auto/gui/kernel/qhighdpiscaling/
tests/libfuzzer/corelib/text/qregularexpression/optimize/
tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
tests/libfuzzer/gui/text/qtextdocument/sethtml/
tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.
Changed target name in
tests/auto/gui/kernel/qaction/qaction.pro
tests/auto/gui/kernel/qaction/qactiongroup.pro
tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake
Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.
Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
This leads to "make benchmark" actually running the benchmark, which
would be nice, I think. Purged various CONFIG += release or -= debug
lines from the same configurations; those surely only configure how
the test code is compiled, which is more or less pointless; it's the
code under test whose debug/release state matters, and I don't suppose
that's affected by the build config of the test code.
In the process, reduce diversity of the ordering of lines within these
*.pro files and purge some dangling space.
Change-Id: Ia9f9f0ca4c096262de928806bdfa6ea3b9e7b9ba
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
If available, use a C++17 std::pmr::unordered_set with a monotonic
buffer resource and a 256-byte stack buffer to avoid the per-element
allocations of QSet.
Results on my machine:
RESULT : tst_QStringList::removeDuplicates():"empty":
- 0.00014 msecs per iteration (total: 74, iterations: 524288)
+ 0.000031 msecs per iteration (total: 66, iterations: 2097152)
RESULT : tst_QStringList::removeDuplicates():"short-dup-0.00":
- 0.00043 msecs per iteration (total: 57, iterations: 131072)
+ 0.00013 msecs per iteration (total: 69, iterations: 524288)
RESULT : tst_QStringList::removeDuplicates():"short-dup-0.50":
- 0.00049 msecs per iteration (total: 65, iterations: 131072)
+ 0.00032 msecs per iteration (total: 85, iterations: 262144)
RESULT : tst_QStringList::removeDuplicates():"short-dup-0.66":
- 0.00057 msecs per iteration (total: 75, iterations: 131072)
+ 0.00039 msecs per iteration (total: 52, iterations: 131072)
RESULT : tst_QStringList::removeDuplicates():"short-dup-0.75":
- 0.00064 msecs per iteration (total: 85, iterations: 131072)
+ 0.00048 msecs per iteration (total: 63, iterations: 131072)
RESULT : tst_QStringList::removeDuplicates():"long-dup-0.00":
- 0.083 msecs per iteration (total: 85, iterations: 1024)
+ 0.039 msecs per iteration (total: 80, iterations: 2048)
RESULT : tst_QStringList::removeDuplicates():"long-dup-0.50":
- 0.11 msecs per iteration (total: 58, iterations: 512)
+ 0.078 msecs per iteration (total: 80, iterations: 1024)
RESULT : tst_QStringList::removeDuplicates():"long-dup-0.66":
- 0.13 msecs per iteration (total: 70, iterations: 512)
+ 0.10 msecs per iteration (total: 53, iterations: 512)
RESULT : tst_QStringList::removeDuplicates():"long-dup-0.75":
- 0.16 msecs per iteration (total: 86, iterations: 512)
+ 0.13 msecs per iteration (total: 69, iterations: 512)
When interpreting the data, take into account that each iteration
contains _also_ a deep copy of the QStringList d/t the detach from
'input'.
The pattern is used elsewhere in Qt, so I've put the class that
implements the seen set into a private header file and used in some
other places I found.
Change-Id: I1f71a82008a16d5a3818f91f290ade21d837805e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit re-applies commit f8efe8e0c9,
which was lost in the recent tools → text changes.
Change-Id: I03ce35fcb89840e5607776d67578fb75b66f6eb2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>