summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-02-12 14:09:29 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-02-20 21:41:54 +0100
commit4f076db3d2e2e27cc56029fe878056ee79def56f (patch)
tree739432aca7f3f63929f16b6bc56943bea26e8182 /src/corelib/io/qurl.cpp
parentba50d27e7624cdfe90124b393576020de7608332 (diff)
Remove QUrl::topLevelDomain
And move the actual implementation from corelib/io to network/kernel sub-module. Fixes: QTBUG-80308 Change-Id: I554b05bae3552c68e1e1a405c169366ee19120b2 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/io/qurl.cpp')
-rw-r--r--src/corelib/io/qurl.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 1beeb7b2a2..b6ddcce27c 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -415,9 +415,6 @@
#include "qhash.h"
#include "qdir.h" // for QDir::fromNativeSeparators
#include "qdatastream.h"
-#if QT_CONFIG(topleveldomain) // ### Qt6: Remove section
-#include "qtldurl_p.h"
-#endif
#include "private/qipaddress_p.h"
#include "qurlquery.h"
#include "private/qdir_p.h"
@@ -3149,46 +3146,6 @@ bool QUrl::hasFragment() const
return d->hasFragment();
}
-#if QT_DEPRECATED_SINCE(5, 15)
-#if QT_CONFIG(topleveldomain)
-/*!
- \since 4.8
-
- \deprecated
-
- 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.
-
- Note that this function considers a TLD to be any domain that allows users
- to register subdomains under, including many home, dynamic DNS websites and
- blogging providers. This is useful for determining whether two websites
- belong to the same infrastructure and communication should be allowed, such
- as browser cookies: two domains should be considered part of the same
- website if they share at least one label in addition to the value
- returned by this function.
-
- \list
- \li \c{foo.co.uk} and \c{foo.com} do not share a top-level domain
- \li \c{foo.co.uk} and \c{bar.co.uk} share the \c{.co.uk} domain, but the next label is different
- \li \c{www.foo.co.uk} and \c{ftp.foo.co.uk} share the same top-level domain and one more label,
- so they are considered part of the same site
- \endlist
-
- If \a options includes EncodeUnicode, the returned string will be in
- ASCII Compatible Encoding.
-*/
-QString QUrl::topLevelDomain(ComponentFormattingOptions options) const
-{
- QString tld = qTopLevelDomain(host());
- if (options & EncodeUnicode) {
- return qt_ACE_do(tld, ToAceOnly, AllowLeadingDot);
- }
- return tld;
-}
-#endif
-#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
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.