summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-03-28 18:11:12 -0300
committerQt by Nokia <qt-info@nokia.com>2012-03-30 01:19:59 +0200
commit83526a9bdc4133e0bc574e0f9223234ea5afe40c (patch)
tree40a8dfbf6c05c6f6a9ec3da5ce9ecc3f4ea136e1 /src/corelib/io/qurl.h
parent66df11f4d109ca3d97fed8985d6bbc6dcf90733d (diff)
De-inline qHash(const QUrl&) and improve
Make it a friend and access the internals to have better performance. Change-Id: I3bbf0b0faa5363278b7b3871d6b6fb5f2225a5f4 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/io/qurl.h')
-rw-r--r--src/corelib/io/qurl.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index a118a9d468..5fcbbf0c0c 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -304,6 +304,7 @@ public:
static QByteArray toAce(const QString &);
static QStringList idnWhitelist();
static void setIdnWhitelist(const QStringList &);
+ friend Q_CORE_EXPORT uint qHash(const QUrl &url);
private:
QUrlPrivate *d;
@@ -314,11 +315,6 @@ public:
inline DataPtr &data_ptr() { return d; }
};
-inline uint qHash(const QUrl &url)
-{
- return qHash(url.toString());
-}
-
Q_DECLARE_TYPEINFO(QUrl, Q_MOVABLE_TYPE);
Q_DECLARE_SHARED(QUrl)
Q_DECLARE_OPERATORS_FOR_FLAGS(QUrl::ComponentFormattingOptions)