summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qurl.h6
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h5
-rw-r--r--src/network/kernel/qhostaddress.h6
3 files changed, 14 insertions, 3 deletions
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index de4ce754fb..cf208bf71e 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -114,6 +114,10 @@ public:
template<typename E1, typename E2>
class QTypeInfo<QUrlTwoFlags<E1, E2> > : public QTypeInfoMerger<QUrlTwoFlags<E1, E2>, E1, E2> {};
+class QUrl;
+// qHash is a friend, but we can't use default arguments for friends (§8.3.6.4)
+Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed = 0) Q_DECL_NOTHROW;
+
class Q_CORE_EXPORT QUrl
{
public:
@@ -324,7 +328,7 @@ public:
static QList<QUrl> fromStringList(const QStringList &uris, ParsingMode mode = TolerantMode);
static void setIdnWhitelist(const QStringList &);
- friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed = 0) Q_DECL_NOTHROW;
+ friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed) Q_DECL_NOTHROW;
private:
QUrlPrivate *d;
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index 215ccce44d..f3bf2c1019 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -98,6 +98,9 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, const QModelIndex &);
class QPersistentModelIndexData;
+// qHash is a friend, but we can't use default arguments for friends (§8.3.6.4)
+uint qHash(const QPersistentModelIndex &index, uint seed = 0);
+
class Q_CORE_EXPORT QPersistentModelIndex
{
public:
@@ -128,7 +131,7 @@ public:
bool isValid() const;
private:
QPersistentModelIndexData *d;
- friend uint qHash(const QPersistentModelIndex &, uint seed = 0);
+ friend uint qHash(const QPersistentModelIndex &, uint seed);
#ifndef QT_NO_DEBUG_STREAM
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QPersistentModelIndex &);
#endif
diff --git a/src/network/kernel/qhostaddress.h b/src/network/kernel/qhostaddress.h
index 77a2ec4105..49032850be 100644
--- a/src/network/kernel/qhostaddress.h
+++ b/src/network/kernel/qhostaddress.h
@@ -64,6 +64,10 @@ public:
typedef QIPv6Address Q_IPV6ADDR;
+class QHostAddress;
+// qHash is a friend, but we can't use default arguments for friends (§8.3.6.4)
+Q_NETWORK_EXPORT uint qHash(const QHostAddress &key, uint seed = 0);
+
class Q_NETWORK_EXPORT QHostAddress
{
public:
@@ -121,7 +125,7 @@ public:
static QPair<QHostAddress, int> parseSubnet(const QString &subnet);
- friend Q_NETWORK_EXPORT uint qHash(const QHostAddress &key, uint seed = 0);
+ friend Q_NETWORK_EXPORT uint qHash(const QHostAddress &key, uint seed);
protected:
QScopedPointer<QHostAddressPrivate> d;
};