44 #include <QtCore/qbytearray.h>
45 #include <QtCore/qobjectdefs.h>
46 #include <QtCore/qstring.h>
47 #include <QtCore/qlist.h>
48 #include <QtCore/qpair.h>
49 #include <QtCore/qglobal.h>
51 #if defined(Q_OS_DARWIN) || defined(Q_QDOC)
63 template <
typename E1,
typename E2>
92 constexpr
inline operator int()
const {
return i; }
118 constexpr
inline bool testFlag(E1
f)
const {
return (
i &
f) ==
f && (
f != 0 ||
i == int(
f)); }
119 constexpr
inline bool testFlag(E2
f)
const {
return (
i &
f) ==
f && (
f != 0 ||
i == int(
f)); }
122 template<
typename E1,
typename E2>
184 #ifdef QT_NO_URL_CAST_FROM_STRING
191 {
other.d =
nullptr; }
198 QString url(FormattingOptions options = FormattingOptions(PrettyDecoded))
const;
199 QString toString(FormattingOptions options = FormattingOptions(PrettyDecoded))
const;
200 QString toDisplayString(FormattingOptions options = FormattingOptions(PrettyDecoded))
const;
201 [[nodiscard]]
QUrl adjusted(FormattingOptions options)
const;
203 QByteArray toEncoded(FormattingOptions options = FullyEncoded)
const;
213 UserInputResolutionOptions options = DefaultResolution);
215 bool isValid()
const;
218 bool isEmpty()
const;
224 void setAuthority(
const QString &authority, ParsingMode
mode = TolerantMode);
225 QString authority(ComponentFormattingOptions options = PrettyDecoded)
const;
227 void setUserInfo(
const QString &userInfo, ParsingMode
mode = TolerantMode);
228 QString userInfo(ComponentFormattingOptions options = PrettyDecoded)
const;
230 void setUserName(
const QString &userName, ParsingMode
mode = DecodedMode);
231 QString userName(ComponentFormattingOptions options = FullyDecoded)
const;
237 QString host(ComponentFormattingOptions = FullyDecoded)
const;
240 int port(
int defaultPort = -1)
const;
243 QString path(ComponentFormattingOptions options = FullyDecoded)
const;
244 QString fileName(ComponentFormattingOptions options = FullyDecoded)
const;
246 bool hasQuery()
const;
249 QString query(ComponentFormattingOptions = PrettyDecoded)
const;
251 bool hasFragment()
const;
252 QString fragment(ComponentFormattingOptions options = PrettyDecoded)
const;
253 void setFragment(
const QString &fragment, ParsingMode
mode = TolerantMode);
255 [[nodiscard]]
QUrl resolved(
const QUrl &relative)
const;
257 bool isRelative()
const;
258 bool isParentOf(
const QUrl &
url)
const;
260 bool isLocalFile()
const;
261 static QUrl fromLocalFile(
const QString &localfile);
265 bool isDetached()
const;
271 bool matches(
const QUrl &
url, FormattingOptions options)
const;
277 #if defined(Q_OS_DARWIN) || defined(Q_QDOC)
278 static QUrl fromCFURL(CFURLRef
url);
285 IgnoreIDNWhitelist = 0x1,
286 AceTransitionalProcessing = 0x2,
290 #if QT_CORE_REMOVED_SINCE(6, 3)
294 static QString fromAce(
const QByteArray &domain, AceProcessingOptions options = {});
295 static QByteArray toAce(
const QString &domain, AceProcessingOptions options = {});
298 static QStringList toStringList(
const QList<QUrl> &uris, FormattingOptions options = FormattingOptions(PrettyDecoded));
302 friend Q_CORE_EXPORT
size_t qHash(
const QUrl &
url,
size_t seed) noexcept;
348 #ifndef QT_NO_DATASTREAM
353 #ifndef QT_NO_DEBUG_STREAM
small capitals from c petite p scientific i
[1]
QBitArray operator|(const QBitArray &a1, const QBitArray &a2)
The QByteArray class provides an array of bytes.
The QDataStream class provides serialization of binary data to a QIODevice.
operator>>(QDataStream &ds, qfloat16 &f)
operator<<(QDataStream &ds, qfloat16 f)
The QDebug class provides an output stream for debugging information.
bool operator<(const QElapsedTimer &lhs, const QElapsedTimer &rhs) noexcept
The QFlag class is a helper data type for QFlags.
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
template< typename Enum > bool operator!=(Enum lhs, QFlags< Enum > rhs)
template< typename Enum > size_t qHash(QFlags< Enum > flags, size_t seed=0) noexcept
template< typename Enum > bool operator==(Enum lhs, QFlags< Enum > rhs)
The QString class provides a Unicode character string.
The QStringList class provides a list of strings.
The QUrl class provides a convenient interface for working with URLs.
void swap(QUrl &other) noexcept
friend Q_CORE_EXPORT size_t qHash(const QUrl &url, size_t seed) noexcept
QUrl(QUrl &&other) noexcept
UserInputResolutionOption
QUrlTwoFlags< UrlFormattingOption, ComponentFormattingOption > FormattingOptions
QUrl(const QString &url, ParsingMode parsingMode)
ComponentFormattingOption
The QUrlQuery class provides a way to manipulate a key-value pairs in a URL's query.
QUrlTwoFlags & operator|=(QFlags< E2 > mask)
constexpr QUrlTwoFlags(E2 f)
constexpr QUrlTwoFlags operator&(uint mask) const
QUrlTwoFlags & operator^=(E2 f)
constexpr QUrlTwoFlags operator^(E2 f) const
constexpr bool testFlag(E2 f) const
constexpr QUrlTwoFlags operator^(QUrlTwoFlags f) const
constexpr QUrlTwoFlags(QFlags< E1 > f)
QUrlTwoFlags & operator&=(QFlags< E1 > mask)
constexpr QUrlTwoFlags operator&(int mask) const
constexpr QUrlTwoFlags operator&(E1 f) const
QUrlTwoFlags & operator&=(int mask)
constexpr QUrlTwoFlags operator|(QUrlTwoFlags f) const
QUrlTwoFlags & operator|=(E2 f)
constexpr QUrlTwoFlags operator&(E2 f) const
constexpr bool operator!() const
constexpr QUrlTwoFlags operator|(E2 f) const
QUrlTwoFlags & operator&=(QFlags< E2 > mask)
QUrlTwoFlags & operator^=(E1 f)
QUrlTwoFlags & operator|=(QUrlTwoFlags f)
QUrlTwoFlags & operator&=(uint mask)
constexpr bool testFlag(E1 f) const
QUrlTwoFlags & operator^=(QUrlTwoFlags f)
constexpr QUrlTwoFlags operator|(E1 f) const
constexpr QUrlTwoFlags(E1 f)
QUrlTwoFlags & operator|=(QFlags< E1 > mask)
QUrlTwoFlags & operator|=(E1 f)
constexpr QUrlTwoFlags operator^(E1 f) const
QUrlTwoFlags & operator^=(QFlags< E1 > mask)
QUrlTwoFlags & operator^=(QFlags< E2 > mask)
constexpr QUrlTwoFlags(QFlag f)
constexpr QUrlTwoFlags operator~() const
constexpr QUrlTwoFlags(QFlags< E2 > f)
auto it unsigned count const
#define Q_DECL_NS_RETURNS_AUTORELEASED
#define Q_DECL_CF_RETURNS_RETAINED
Q_FORWARD_DECLARE_OBJC_CLASS(NSObject)
Q_FORWARD_DECLARE_CF_TYPE(CTFontDescriptor)
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
#define QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(Class)
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLsizei const GLchar *const * path
#define Q_DECLARE_SHARED(TYPE)
QUrl::FormattingOptions & operator|=(QUrl::FormattingOptions &i, QUrl::ComponentFormattingOptions f)
QUrl url("http://www.example.com/List of holidays.xml")
[0]
qDebug()<< QUrl("file copy setQuery(copy.query(QUrl::FullyDecoded), QUrl::DecodedMode)
http setHost("qt-project.org")
[2]
request setUrl(QUrl("http://qt-project.org"))
proxy setPassword("password")
T1_FIELD_DICT_PRIVATE password