QUrl::topLevelDomain() - deprecate in 5.15
And remove in Qt 6 (with private API remaining). [ChangeLog][Deprecation Notice] QUrl::topLevelDomain() was deprecated in 5.15 and will be removed in 6.0 Task-number: QTBUG-80308 Change-Id: Ie053c9c8813274c971e2d6fc442dd6ce716fadf1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
a20dbcf7c7
commit
c9b8ebc223
@ -415,7 +415,7 @@
|
|||||||
#include "qhash.h"
|
#include "qhash.h"
|
||||||
#include "qdir.h" // for QDir::fromNativeSeparators
|
#include "qdir.h" // for QDir::fromNativeSeparators
|
||||||
#include "qdatastream.h"
|
#include "qdatastream.h"
|
||||||
#if QT_CONFIG(topleveldomain)
|
#if QT_CONFIG(topleveldomain) // ### Qt6: Remove section
|
||||||
#include "qtldurl_p.h"
|
#include "qtldurl_p.h"
|
||||||
#endif
|
#endif
|
||||||
#include "private/qipaddress_p.h"
|
#include "private/qipaddress_p.h"
|
||||||
@ -3149,10 +3149,13 @@ bool QUrl::hasFragment() const
|
|||||||
return d->hasFragment();
|
return d->hasFragment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_DEPRECATED_SINCE(5, 15)
|
||||||
#if QT_CONFIG(topleveldomain)
|
#if QT_CONFIG(topleveldomain)
|
||||||
/*!
|
/*!
|
||||||
\since 4.8
|
\since 4.8
|
||||||
|
|
||||||
|
\deprecated
|
||||||
|
|
||||||
Returns the TLD (Top-Level Domain) of the URL, (e.g. .co.uk, .net).
|
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
|
Note that the return value is prefixed with a '.' unless the
|
||||||
URL does not contain a valid TLD, in which case the function returns
|
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;
|
return tld;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif // QT_DEPRECATED_SINCE(5, 15)
|
||||||
/*!
|
/*!
|
||||||
Returns the result of the merge of this URL with \a relative. This
|
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.
|
URL is used as a base to convert \a relative to an absolute URL.
|
||||||
|
@ -233,9 +233,11 @@ public:
|
|||||||
|
|
||||||
void setHost(const QString &host, ParsingMode mode = DecodedMode);
|
void setHost(const QString &host, ParsingMode mode = DecodedMode);
|
||||||
QString host(ComponentFormattingOptions = FullyDecoded) const;
|
QString host(ComponentFormattingOptions = FullyDecoded) const;
|
||||||
|
#if QT_DEPRECATED_SINCE(5, 15)
|
||||||
#if QT_CONFIG(topleveldomain)
|
#if QT_CONFIG(topleveldomain)
|
||||||
QString topLevelDomain(ComponentFormattingOptions options = FullyDecoded) const;
|
QT_DEPRECATED QString topLevelDomain(ComponentFormattingOptions options = FullyDecoded) const;
|
||||||
#endif
|
#endif
|
||||||
|
#endif // QT_DEPRECATED_SINCE(5, 15)
|
||||||
|
|
||||||
void setPort(int port);
|
void setPort(int port);
|
||||||
int port(int defaultPort = -1) const;
|
int port(int defaultPort = -1) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user