diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-08-02 15:51:52 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-20 21:59:21 +0200 |
commit | 373845dfd8acae0c941432c8cd615b77bcae0a2a (patch) | |
tree | d8d88bdd6657a18f55456bfe2ac5dfff682e76aa /src/corelib/io | |
parent | 291938aea6771a0ce4c11a164583a73c6eef026e (diff) |
Add Q_DECL_NOTHROW to some qHash functions
The hashing functions for QDateTime and QHostAddress did not get the
noexcept keyword because they might allocate memory. QDateTime doesn't
do it now, but it could in the future. QHostAddress does allocate
memory today.
Change-Id: Ia5f80942944bfc2b8c405306c467bfd88ef0e48c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qurl.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qurl.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 25006b14f7..3b49b82637 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3445,7 +3445,7 @@ QString QUrl::errorString() const \relates QHash \since 5.0 */ -uint qHash(const QUrl &url, uint seed) +uint qHash(const QUrl &url, uint seed) Q_DECL_NOTHROW { if (!url.d) return qHash(-1, seed); // the hash of an unset port (-1) diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index 475806e7e4..8055129e4b 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -321,7 +321,7 @@ public: static QByteArray toAce(const QString &); static QStringList idnWhitelist(); static void setIdnWhitelist(const QStringList &); - friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed = 0); + friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed = 0) Q_DECL_NOTHROW; private: QUrlPrivate *d; |