Struct qt_core::q_url::UserInputResolutionOption
source · pub struct UserInputResolutionOption(/* private fields */);
Expand description
The user input resolution options define how fromUserInput() should interpret strings that could either be a relative path or the short form of a HTTP URL. For instance file.pl
can be either a local file or the URL http://file.pl
.
C++ enum: QUrl::UserInputResolutionOption
.
The user input resolution options define how fromUserInput() should interpret strings that could either be a relative path or the short form of a HTTP URL. For instance file.pl
can be either a local file or the URL http://file.pl
.
This enum was introduced or modified in Qt 5.4.
The UserInputResolutionOptions type is a typedef for QFlags<UserInputResolutionOption>. It stores an OR combination of UserInputResolutionOption values.
See also fromUserInput().
Implementations§
source§impl UserInputResolutionOption
impl UserInputResolutionOption
sourcepub const DefaultResolution: UserInputResolutionOption = _
pub const DefaultResolution: UserInputResolutionOption = _
The default resolution mechanism is to check whether a local file exists, in the working directory given to fromUserInput, and only return a local path in that case. Otherwise a URL is assumed. (C++ enum variant: DefaultResolution = 0
)
sourcepub const AssumeLocalFile: UserInputResolutionOption = _
pub const AssumeLocalFile: UserInputResolutionOption = _
This option makes fromUserInput() always return a local path unless the input contains a scheme, such as http://file.pl
. This is useful for applications such as text editors, which are able to create the file if it doesn’t exist. (C++ enum variant: AssumeLocalFile = 1
)
Trait Implementations§
source§impl<T: Into<QFlags<UserInputResolutionOption>>> BitOr<T> for UserInputResolutionOption
impl<T: Into<QFlags<UserInputResolutionOption>>> BitOr<T> for UserInputResolutionOption
§type Output = QFlags<UserInputResolutionOption>
type Output = QFlags<UserInputResolutionOption>
|
operator.source§impl Clone for UserInputResolutionOption
impl Clone for UserInputResolutionOption
source§fn clone(&self) -> UserInputResolutionOption
fn clone(&self) -> UserInputResolutionOption
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UserInputResolutionOption
impl Debug for UserInputResolutionOption
source§impl From<UserInputResolutionOption> for QFlags<UserInputResolutionOption>
impl From<UserInputResolutionOption> for QFlags<UserInputResolutionOption>
source§fn from(value: UserInputResolutionOption) -> Self
fn from(value: UserInputResolutionOption) -> Self
source§impl From<UserInputResolutionOption> for c_int
impl From<UserInputResolutionOption> for c_int
source§fn from(value: UserInputResolutionOption) -> Self
fn from(value: UserInputResolutionOption) -> Self
source§impl From<i32> for UserInputResolutionOption
impl From<i32> for UserInputResolutionOption
source§impl PartialEq for UserInputResolutionOption
impl PartialEq for UserInputResolutionOption
source§fn eq(&self, other: &UserInputResolutionOption) -> bool
fn eq(&self, other: &UserInputResolutionOption) -> bool
self
and other
values to be equal, and is used
by ==
.