Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.5.1
-
None
-
d7b34583926e3bd751120a4b827cd5ba6667dea3
Description
If you build a QHash on quint64 keys, e.g. QHash<quint64, QString> and use the
debug version of Qt, you'll run into a Run-Time Check Failure:
"Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of
data. If this was intentional, you should mask the source of the cast with the
appropriate bitmask. For example:
char c = (i & 0xFF);
Changing the code in this way will not affect the quality of the resulting
optimized code."
This happens in the function 'uint qHash(quint64 key)' in qhash.h.
To reproduce the error, simply compile the enclosed C++ file using the
command line "cl -Zi -RTCcsu test.cpp"