summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.cpp
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-06-17 13:54:16 +0200
committerDavid Boddie <david.boddie@nokia.com>2011-06-17 13:54:16 +0200
commit2b39081bf101e53a70ff056d527dc3dfb8208bf0 (patch)
treea8e57489e18dbdd620b8880eda5c8e2d77049a07 /src/corelib/io/qurl.cpp
parent5e1112ec04dcef671700e326186ca56b790f7e08 (diff)
parentc390312f8fbea14ac4df0c5185ca814054f448d8 (diff)
Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qt
Conflicts: doc/src/declarative/righttoleft.qdoc examples/draganddrop/fridgemagnets/main.cpp examples/script/context2d/main.cpp
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.