Go to file
Marc Mutz bd84e8d63e QHash/QMap: don't return const from value(), key()
... it breaks move semantics.

We can change these, since they're templates and a short survey shows
that no-one in Qt was crazy enough to inherit an exported class from
QHash or QMap.

Otherwise this would be BiC on MSVC, which encodes the return type.

There's also no safety benefit here, as none of the overloads returns
by reference, so users cannot expect map.value(key).mutate() to have
an effect on the element in the container.

In this, key() and value() differ from op[], which also returns const,
but whose overload returns a reference. op[] is therefore not proposed
here.

[ChangeLog][QtCore][QHash/QMultiHash/QMap/QMultiMap] The value() and
key() member functions now return T (was: const T), enabling move
semantics on their return values.

Change-Id: I0e5f53f9834caad458e3bde27f1daacbb4bac71b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-05 13:24:32 +01:00
bin Add initial support for CMake "Ninja Multi-Config" generator 2020-01-27 11:47:57 +00:00
cmake CMake: Port the 'debug_and_release' feature 2020-03-05 07:48:06 +01:00
coin coin: remove contact person for cmake issues 2020-02-13 20:14:12 +01:00
config.tests Add initial support for cross-building to iOS 2019-12-03 13:35:59 +00:00
dist Add 5.14.0 changelog entry about MinGW 2020-02-18 18:34:50 +01:00
doc Merge remote-tracking branch 'origin/5.15' into dev 2020-03-04 14:39:18 +00:00
examples Merge remote-tracking branch 'origin/5.15' into dev 2020-03-04 14:39:18 +00:00
lib
mkspecs Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-04 19:10:37 +00:00
qmake Merge remote-tracking branch 'origin/5.15' into dev 2020-03-03 14:13:02 +01:00
src QHash/QMap: don't return const from value(), key() 2020-03-05 13:24:32 +01:00
tests Add support for attaching continuations to QFuture 2020-03-05 13:24:32 +01:00
util configurejson2cmake: Fix non-inline compile tests 2020-03-05 07:48:20 +01:00
.gitattributes
.gitignore Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake 2019-07-11 17:17:51 +02:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag
CMakeLists.txt Regenerate rest of qtbase 2020-02-04 18:50:48 +00:00
config_help.txt Merge remote-tracking branch 'origin/5.15' into dev 2020-02-26 18:39:21 +01:00
configure Use C++17 for qmake and force the build of everything with C++17 2020-02-08 09:49:07 +01:00
configure.bat Don't compile qmake in c++11 mode 2020-02-03 17:43:30 +01:00
configure.cmake CMake: Port the 'force_debug_info' feature 2020-03-05 07:48:11 +01:00
configure.json Merge remote-tracking branch 'origin/5.15' into dev 2020-02-26 18:39:21 +01:00
configure.pri Android: Increase minimum API level to Android-23 / Android 6 2020-03-04 08:28:04 +01:00
dependencies.yaml Re-add dependencies.yaml so repos outside qt5 can be built with Coin 2019-09-19 17:07:36 +00:00
header.BSD Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.FDL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL-EXCEPT Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3-COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-NOGPL2 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-ONLY Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.MIT qsimd: add support for new x86 CPU features 2018-05-05 06:20:07 +00:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL
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.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile Move QOpenGLWidget from QtOpenGL to its own module 2020-02-18 09:22:51 +01:00