Go to file
Thiago Macieira c1780165ee QJsonValueConstRef: optimize to{Int,Integer,Bool,Double,String}()
The CBOR-based implementation from Qt 5.15 simply created a QJsonValue and
then called the equivalent function on that result. For integrals and
double where the QJsonValue matched the asked type, the cost was minimal
anyway. For the other types and when the type didn't match, this
resulted in up/down the reference counter in QCborContainerPrivate and
an out-of-line call to the destructor.

This improves the performance for code like:

  for (QJsonValue v : array) {
      if (v.toString() == x) {
          doSomething();
      }
  }

This change propagates the inadviseable behavior of allowing a
dereference of the end() reference in concrete() to concreteType() (and
unit-tests it) but does not do the same for the toXxx() functions. Doing
that causes a dereference of QList's end() iterator, which is UB
(asserts false in debug mode).

Change-Id: I89446ea06b5742efb194fffd16bb3beccd1098e4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-02-15 17:00:04 -08:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin Provide a qtpaths wrapper script when cross-building Qt 2021-11-08 13:41:03 +01:00
cmake CMake: Introduce QT_ADDITIONAL_HOST_PACKAGES_PREFIX_PATH 2022-02-15 14:48:20 +01:00
coin Clean up QNX platform configs and improve testrunner scripts 2022-02-14 12:56:06 +01:00
config.tests CMake: remove unused config.tests (atomicfptr, avx512 and stl) 2022-02-15 09:20:34 -03:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc qglobal: add a way to selectively export in Qt 6 XOR Qt 7 2022-02-09 10:49:37 -08:00
examples qtextstream.h: streamline includes 2022-02-10 04:34:13 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec Fix various configure time warnings about missing QT_BEGIN_NAMESPACE 2021-11-01 17:17:29 +02:00
mkspecs Update MSVC qmake mkspecs to make -std:c++20 available for VS2019 16.11+ 2022-02-11 22:05:20 +00:00
qmake QLibraryInfo: remove load-time variable 2022-02-05 11:57:34 -08:00
src QJsonValueConstRef: optimize to{Int,Integer,Bool,Double,String}() 2022-02-15 17:00:04 -08:00
tests QJsonValueConcreteRef: optimize concrete() 2022-02-15 17:00:04 -08:00
util Clean up QNX platform configs and improve testrunner scripts 2022-02-14 12:56:06 +01:00
.cmake.conf Bump version to 6.4.0 2022-01-31 17:20:06 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Assume qhelpgenerator in libexec instead of bin 2021-11-08 19:27:32 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt Use REALPATH based check for symbolic links on Windows 2022-01-07 14:31:38 +01:00
conanfile.py Use common install functionality 2022-02-04 19:19:19 +02:00
config_help.txt configure: Introduce -submodules option 2022-02-03 21:21:29 +01:00
configure Remove unsupported, host-related options from configure shell script 2021-08-05 02:44:27 +02:00
configure.bat configure: Fix -redo when configure line contained equal sign(s) 2022-02-15 08:08:48 +00:00
configure.cmake GHS compiler doesn't support signaling NaNs for double 2022-02-09 16:33:46 +02:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
LICENSE.FDL Remove trailing whitespace in LICENSE.FDL 2021-11-26 18:28:49 +01:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update latest qt license agreement 2021-12-02 14:16:49 +00:00
qt_cmdline.cmake CMake: Add support building Qt with the 'mold' linker 2022-01-20 19:01:27 +01:00
sync.profile Implement generating of a module cpp export header 2021-06-24 20:40:49 +02:00