[Development] Proposal: adding Q_DECL_NOEXCEPT to many methods

Giuseppe D'Angelo dangelog at gmail.com
Fri Aug 3 18:13:03 CEST 2012


On 3 August 2012 08:58, Konrad Rosenbaum <konrad at silmor.de> wrote:
>
> For QDateTime this potentially involves heavy calculations. The upside of this
> is that this guarantees unchanged hashes even if the internal representation
> of QDateTime changes. How hard is the requirement to create the same hash over
> several versions of Qt?

This was actually a source of nasty bugs all over the place when I
changed the qHash(QString) implementation for Qt 5.0. (For instance,
rcc used to store it in the binary resource files...).

Therefore, I clearly documented that it's not guaranteed that qHash
will stay the same:

http://doc-snapshot.qt-project.org/5.0/qhash.html#the-qhash-hashing-function

"Note that the implementation of the qHash() overloads offered by Qt
may change at any time. You must not rely on the fact that qHash()
will give the same results (for the same inputs) across different Qt
versions."

-- 
Giuseppe D'Angelo



More information about the Development mailing list