com.trolltech.qt.core
Class QUrl.ParsingMode
java.lang.Object
java.lang.Enum
com.trolltech.qt.core.QUrl.ParsingMode
- All Implemented Interfaces:
- QtEnumerator, java.io.Serializable, java.lang.Comparable
- Enclosing class:
- QUrl
public static final class QUrl.ParsingMode
- extends java.lang.Enum
- implements QtEnumerator
The parsing mode controls the way QUrl
parses strings. In TolerantMode
, the parser corrects the following invalid input:
- Spaces and "%20": If an encoded URL contains a space, this will be replaced with "%20". If a decoded URL contains "%20", this will be replaced with a single space before the URL is parsed.
- Single "%" characters: Any occurrences of a percent character "%" not followed by exactly two hexadecimal characters (e.g., "13% coverage.html") will be replaced by "%25".
- Non-US-ASCII characters: An encoded URL should only contain US-ASCII characters. In
TolerantMode
, characters outside this range are automatically percent-encoded. - Any occurrence of "[", "]", "{" or "}" following the host part of the URL is percent-encoded.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
TolerantMode
public static final QUrl.ParsingMode TolerantMode
QUrl
will try to correct some common errors in URLs. This mode is useful when processing URLs entered by users.
StrictMode
public static final QUrl.ParsingMode StrictMode
- Only valid URLs are accepted. This mode is useful for general URL validation.
values
public static QUrl.ParsingMode[] values()
valueOf
public static QUrl.ParsingMode valueOf(java.lang.String name)
value
public int value()
- This function should return an integer value for the enum values of the enumeration that implements this interface.
- Specified by:
value
in interface QtEnumerator
resolve
public static QUrl.ParsingMode resolve(int value)
- Returns the ParsingMode constant with the specified int.