以下成员源于类 QUrl 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
(obsolete)
void
|
addEncodedQueryItem (const QByteArray & key , const QByteArray & value ) |
(obsolete)
void
|
addQueryItem (const QString & key , const QString & value ) |
(obsolete)
QList<QByteArray>
|
allEncodedQueryItemValues (const QByteArray & key ) const |
(obsolete)
QStringList
|
allQueryItemValues (const QString & key ) const |
(obsolete)
QByteArray
|
encodedFragment () const |
(obsolete)
QByteArray
|
encodedHost () const |
(obsolete)
QByteArray
|
encodedPassword () const |
(obsolete)
QByteArray
|
encodedPath () const |
(obsolete)
QByteArray
|
encodedQuery () const |
(obsolete)
QByteArray
|
encodedQueryItemValue (const QByteArray & key ) const |
(obsolete)
QList<QPair<QByteArray, QByteArray>>
|
encodedQueryItems () const |
(obsolete)
QByteArray
|
encodedUserName () const |
(obsolete)
bool
|
hasEncodedQueryItem (const QByteArray & key ) const |
(obsolete)
bool
|
hasQueryItem (const QString & key ) const |
(obsolete)
QString
|
queryItemValue (const QString & key ) const |
(obsolete)
QList<QPair<QString, QString>>
|
queryItems () const |
(obsolete)
void
|
removeAllEncodedQueryItems (const QByteArray & key ) |
(obsolete)
void
|
removeAllQueryItems (const QString & key ) |
(obsolete)
void
|
removeEncodedQueryItem (const QByteArray & key ) |
(obsolete)
void
|
removeQueryItem (const QString & key ) |
(obsolete)
void
|
setEncodedFragment (const QByteArray & fragment ) |
(obsolete)
void
|
setEncodedHost (const QByteArray & host ) |
(obsolete)
void
|
setEncodedPassword (const QByteArray & password ) |
(obsolete)
void
|
setEncodedPath (const QByteArray & path ) |
(obsolete)
void
|
setEncodedQuery (const QByteArray & query ) |
(obsolete)
void
|
setEncodedQueryItems (const QList<QPair<QByteArray, QByteArray>> & query ) |
(obsolete)
void
|
setEncodedUrl (const QByteArray & encodedUrl , QUrl::ParsingMode parsingMode = TolerantMode) |
(obsolete)
void
|
setEncodedUserName (const QByteArray & userName ) |
(obsolete)
void
|
setQueryItems (const QList<QPair<QString, QString>> & query ) |
(obsolete)
QString
|
topLevelDomain (QUrl::ComponentFormattingOptions options = FullyDecoded) const |
(obsolete)
QString
|
fromPunycode (const QByteArray & pc ) |
(obsolete)
QByteArray
|
toPunycode (const QString & uc ) |
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Inserts the pair key = value into the query string of the URL.
该函数在 Qt 4.4 引入。
另请参阅 addQueryItem ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Inserts the pair key = value into the query string of the URL.
The key-value pair is encoded before it is added to the query. The pair is converted into separate strings internally. The key and value is first encoded into UTF-8 and then delimited by the character returned by queryValueDelimiter() . Each key-value pair is delimited by the character returned by queryPairDelimiter()
注意: This method does not encode spaces (ASCII 0x20) as plus (+) signs, like HTML forms do. If you need that kind of encoding, you must encode the value yourself and use QUrl::addEncodedQueryItem .
另请参阅 addEncodedQueryItem ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the a list of query string values whose key is equal to key from the URL.
使用 QUrlQuery .
该函数在 Qt 4.4 引入。
另请参阅 allQueryItemValues (), queryItemValue (),和 encodedQueryItemValue ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the a list of query string values whose key is equal to key from the URL.
注意: This method does not decode spaces plus (+) signs as spaces (ASCII 0x20), like HTML forms do. If you need that kind of decoding, you must use QUrl::allEncodedQueryItemValues and decode the data yourself.
使用 QUrlQuery .
另请参阅 queryItemValue ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the fragment of the URL if it is defined; otherwise an empty string is returned. The returned value will have its non-ASCII and other control characters percent-encoded, as in toEncoded ().
Use query( QUrl::FullyEncoded ).toLatin1().
该函数在 Qt 4.4 引入。
另请参阅 setEncodedFragment () 和 toEncoded ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the host part of the URL if it is defined; otherwise an empty string is returned.
Note: encodedHost() does not return percent-encoded hostnames. Instead, the ACE-encoded (bare ASCII in Punycode encoding) form will be returned for any non-ASCII hostname.
此函数相当于调用 QUrl::toAce () on the return value of host ().
Use host( QUrl::FullyEncoded ).toLatin1() or toAce ( host ()).
该函数在 Qt 4.4 引入。
另请参阅 setEncodedHost ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the password of the URL if it is defined; otherwise an empty string is returned. The returned value will have its non-ASCII and other control characters percent-encoded, as in toEncoded ().
Use password( QUrl::FullyEncoded ).toLatin1()
该函数在 Qt 4.4 引入。
另请参阅 setEncodedPassword () 和 toEncoded ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the path of the URL if it is defined; otherwise an empty string is returned. The returned value will have its non-ASCII and other control characters percent-encoded, as in toEncoded ().
Use path( QUrl::FullyEncoded ).toLatin1().
该函数在 Qt 4.4 引入。
另请参阅 setEncodedPath () 和 toEncoded ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the query string of the URL in percent encoded form.
Use query( QUrl::FullyEncoded ).toLatin1()
另请参阅 setEncodedQuery () 和 query ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the first query string value whose key is equal to key from the URL.
使用 QUrlQuery .
该函数在 Qt 4.4 引入。
另请参阅 queryItemValue () 和 allQueryItemValues ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the query string of the URL, as a map of encoded keys and values.
使用 QUrlQuery .
该函数在 Qt 4.4 引入。
另请参阅 setEncodedQueryItems (), setQueryItems (),和 setEncodedQuery ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the user name of the URL if it is defined; otherwise an empty string is returned. The returned value will have its non-ASCII and other control characters percent-encoded, as in toEncoded ().
使用 userName ( QUrl::FullyEncoded ).toLatin1()
该函数在 Qt 4.4 引入。
另请参阅 setEncodedUserName ().
[static]
QString
QUrl::
fromPunycode
(const
QByteArray
&
pc
)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the Punycode decoded representation of pc .
Punycode is a Unicode encoding used for internationalized domain names, as defined in RFC3492. If you want to convert a domain from its ASCII-compatible encoding to the Unicode representation, use fromAce ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
返回
true
if there is a query string pair whose key is equal to
key
from the URL.
使用 QUrlQuery .
该函数在 Qt 4.4 引入。
另请参阅 hasQueryItem ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
返回
true
if there is a query string pair whose key is equal to
key
from the URL.
使用 QUrlQuery .
另请参阅 hasEncodedQueryItem ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the first query string value whose key is equal to key from the URL.
注意: This method does not decode spaces plus (+) signs as spaces (ASCII 0x20), like HTML forms do. If you need that kind of decoding, you must use QUrl::encodedQueryItemValue and decode the data yourself.
使用 QUrlQuery .
另请参阅 allQueryItemValues ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the query string of the URL, as a map of keys and values.
注意: This method does not decode spaces plus (+) signs as spaces (ASCII 0x20), like HTML forms do. If you need that kind of decoding, you must use QUrl::encodedQueryItems and decode the data yourself.
使用 QUrlQuery .
另请参阅 setQueryItems () 和 setEncodedQuery ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Removes all the query string pairs whose key is equal to key from the URL.
使用 QUrlQuery .
该函数在 Qt 4.4 引入。
另请参阅 removeQueryItem ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Removes all the query string pairs whose key is equal to key from the URL.
使用 QUrlQuery .
另请参阅 removeQueryItem ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Removes the first query string pair whose key is equal to key from the URL.
使用 QUrlQuery .
该函数在 Qt 4.4 引入。
另请参阅 removeQueryItem () 和 removeAllQueryItems ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Removes the first query string pair whose key is equal to key from the URL.
使用 QUrlQuery .
另请参阅 removeAllQueryItems ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets the URL's fragment to the percent-encoded fragment . The fragment is the last part of the URL, represented by a '#' followed by a string of characters. It is typically used in HTTP for referring to a certain link or point on a page:
The fragment is sometimes also referred to as the URL "reference".
Passing an argument of QByteArray() (a null QByteArray ) will unset the fragment. Passing an argument of QByteArray ("") (an empty but not null QByteArray ) will set the fragment to an empty string (as if the original URL had a lone "#").
使用 setFragment (), which has the same behavior of null / empty.
该函数在 Qt 4.4 引入。
另请参阅 setFragment () 和 encodedFragment ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets the URL's host to the ACE- or percent-encoded host 。 host is part of the user info element in the authority of the URL, as described in setAuthority ().
使用 setHost ( QString::fromUtf8 (host)).
该函数在 Qt 4.4 引入。
另请参阅 setHost (), encodedHost (), setAuthority (),和 fromAce ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets the URL's password to the percent-encoded password 。 password is part of the user info element in the authority of the URL, as described in setUserInfo ().
使用 setPassword ( QString::fromUtf8 (password));
该函数在 Qt 4.4 引入。
另请参阅 setPassword (), encodedPassword (),和 setUserInfo ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets the URL's path to the percent-encoded path . The path is the part of the URL that comes after the authority but before the query string.
For non-hierarchical schemes, the path will be everything following the scheme declaration, as in the following example:
使用 setPath ( QString::fromUtf8 (path)).
该函数在 Qt 4.4 引入。
另请参阅 setPath (), encodedPath (),和 setUserInfo ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
将 URL 查询字符串设为 query . The string is inserted as-is, and no further encoding is performed when calling toEncoded ().
This function is useful if you need to pass a query string that does not fit into the key-value pattern, or that uses a different scheme for encoding special characters than what is suggested by QUrl .
Passing a value of QByteArray() to query (a null QByteArray ) unsets the query completely. However, passing a value of QByteArray ("") will set the query to an empty value, as if the original URL had a lone "?".
使用 setQuery , which has the same null / empty behavior.
另请参阅 encodedQuery () 和 hasQuery ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets the query string of the URL to the encoded version of query . The contents of query are converted to a string internally, each pair delimited by the character returned by queryPairDelimiter() , and the key and value are delimited by queryValueDelimiter() .
该函数在 Qt 4.4 引入。
另请参阅 encodedQueryItems () 和 setQueryItems ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Constructs a URL by parsing the contents of encodedUrl .
encodedUrl is assumed to be a URL string in percent encoded form, containing only ASCII characters.
The parsing mode parsingMode is used for parsing encodedUrl .
使用 setUrl ( QString::fromUtf8 (encodedUrl), parsingMode)
另请参阅 setUrl ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets the URL's user name to the percent-encoded userName 。 userName is part of the user info element in the authority of the URL, as described in setUserInfo ().
使用 setUserName ( QString::fromUtf8 ( userName ))
该函数在 Qt 4.4 引入。
另请参阅 setUserName (), encodedUserName (),和 setUserInfo ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets the query string of the URL to an encoded version of query . The contents of query are converted to a string internally, each pair delimited by the character returned by queryPairDelimiter() , and the key and value are delimited by queryValueDelimiter()
注意: This method does not encode spaces (ASCII 0x20) as plus (+) signs, like HTML forms do. If you need that kind of encoding, you must encode the value yourself and use QUrl::setEncodedQueryItems .
另请参阅 queryItems () 和 setEncodedQueryItems ().
[static]
QByteArray
QUrl::
toPunycode
(const
QString
&
uc
)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
返回 uc in Punycode encoding.
Punycode is a Unicode encoding used for internationalized domain names, as defined in RFC3492. If you want to convert a domain name from Unicode to its ASCII-compatible representation, use toAce ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
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.
foo.co.uk
and
foo.com
do not share a top-level domain
foo.co.uk
and
bar.co.uk
share the
.co.uk
domain, but the next label is different
www.foo.co.uk
and
ftp.foo.co.uk
share the same top-level domain and one more label, so they are considered part of the same site
若 options 包括 EncodeUnicode , the returned string will be in ASCII Compatible Encoding.
该函数在 Qt 4.8 引入。