diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qurl.cpp | 7 | ||||
-rw-r--r-- | src/corelib/io/qurl.h | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 659552b72f..def4a1095f 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -415,7 +415,7 @@ #include "qhash.h" #include "qdir.h" // for QDir::fromNativeSeparators #include "qdatastream.h" -#if QT_CONFIG(topleveldomain) +#if QT_CONFIG(topleveldomain) // ### Qt6: Remove section #include "qtldurl_p.h" #endif #include "private/qipaddress_p.h" @@ -3149,10 +3149,13 @@ 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 @@ -3185,7 +3188,7 @@ QString QUrl::topLevelDomain(ComponentFormattingOptions options) const 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. diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index 94269e4369..eb7fb8087c 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -233,9 +233,11 @@ public: void setHost(const QString &host, ParsingMode mode = DecodedMode); QString host(ComponentFormattingOptions = FullyDecoded) const; +#if QT_DEPRECATED_SINCE(5, 15) #if QT_CONFIG(topleveldomain) - QString topLevelDomain(ComponentFormattingOptions options = FullyDecoded) const; + QT_DEPRECATED QString topLevelDomain(ComponentFormattingOptions options = FullyDecoded) const; #endif +#endif // QT_DEPRECATED_SINCE(5, 15) void setPort(int port); int port(int defaultPort = -1) const; |