summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets/code/src_corelib_io_qstorageinfo.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-02-14 16:16:56 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-05-12 01:51:20 +0200
commit707129fd5a7c6390fbdf4270119226df2a427fcd (patch)
tree3394b456eae374078330684d0523b7874ac630de /src/corelib/doc/snippets/code/src_corelib_io_qstorageinfo.cpp
parent2844631aa977fb1619ec3910090d1bdd4c7459c2 (diff)
Long live qHashMulti(Commutative)
Add a helper function so that we have a shortcut. Instead of writing: QHashCombine hash; seed = hash(seed, fieldA); seed = hash(seed, fieldB); // etc. return seed; one can now simply write: return qHashMulti(seed, fieldA, fieldB, fieldC); Port a few usages inside qtbase as a demonstration. [ChangeLog][QtCore][QHash] Added the qHashMulti and qHashMultiCommutative functions as convenience helpers to calculate a hash from multiple variables (typically, data members of a class). Change-Id: I881a9ad41168df20ceecc6588a94abe7ddc6a532 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/doc/snippets/code/src_corelib_io_qstorageinfo.cpp')
0 files changed, 0 insertions, 0 deletions