summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qurl.cpp')
-rw-r--r--src/corelib/io/qurl.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 92ce5ab794..881365678f 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -192,7 +192,9 @@
#if defined QT3_SUPPORT
#include "qfileinfo.h"
#endif
-
+#ifndef QT_BOOTSTRAPPED
+#include "qtldurl_p.h"
+#endif
#if defined(Q_OS_WINCE_WM)
#pragma optimize("g", off)
#endif
@@ -5593,6 +5595,21 @@ bool QUrl::hasFragment() const
}
/*!
+ \since 4.8
+
+ Returns the TLD (Top-Level Domain) of the URL, (e.g. .co.uk, .net).
+ Note that the return value is prefixed with a '.' unless the
+ URL does not contain a valid TLD, in which case the function returns
+ an empty string.
+*/
+#ifndef QT_BOOTSTRAPPED
+QString QUrl::topLevelDomain() const
+{
+ return qTopLevelDomain(host());
+}
+#endif
+
+/*!
Returns the result of the merge of this URL with \a relative. This
URL is used as a base to convert \a relative to an absolute URL.