Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qurl_p.h File Reference

(70edabf98bf56e29296a2921db97a38f60cf896a)

#include <QtCore/private/qglobal_p.h>
#include "qurl.h"
Include dependency graph for qurl_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  AceLeadingDot { AllowLeadingDot , ForbidLeadingDot }
enum  AceOperation { ToAceOnly , NormalizeAce }

Functions

QT_BEGIN_NAMESPACE Q_AUTOTEST_EXPORT qsizetype qt_urlRecode (QString &appendTo, QStringView url, QUrl::ComponentFormattingOptions encoding, const ushort *tableModifications=nullptr)
qsizetype qt_encodeFromUser (QString &appendTo, const QString &input, const ushort *tableModifications)
QString Q_CORE_EXPORT qt_ACE_do (const QString &domain, AceOperation op, AceLeadingDot dot, QUrl::AceProcessingOptions options={})
Q_AUTOTEST_EXPORT void qt_punycodeEncoder (QStringView in, QString *output)
Q_AUTOTEST_EXPORT QString qt_punycodeDecoder (const QString &pc)

Enumeration Type Documentation

◆ AceLeadingDot

Enumerator
AllowLeadingDot 
ForbidLeadingDot 

Definition at line 33 of file qurl_p.h.

◆ AceOperation

Enumerator
ToAceOnly 
NormalizeAce 

Definition at line 34 of file qurl_p.h.

Function Documentation

◆ qt_ACE_do()

QString Q_CORE_EXPORT qt_ACE_do ( const QString & domain,
AceOperation op,
AceLeadingDot dot,
QUrl::AceProcessingOptions options = {} )

Definition at line 921 of file qurlidna.cpp.

◆ qt_encodeFromUser()

qsizetype qt_encodeFromUser ( QString & appendTo,
const QString & input,
const ushort * tableModifications )

Definition at line 664 of file qurlrecode.cpp.

References defaultActionTable, and EncodeCharacter.

◆ qt_punycodeDecoder()

Q_AUTOTEST_EXPORT QString qt_punycodeDecoder ( const QString & pc)
extern

Definition at line 172 of file qurlidna.cpp.

◆ qt_punycodeEncoder()

Q_AUTOTEST_EXPORT void qt_punycodeEncoder ( QStringView in,
QString * output )
extern

Definition at line 68 of file qurlidna.cpp.

References adapt(), appendEncode(), initial_bias, and initial_n.

Here is the call graph for this function:

◆ qt_urlRecode()

Q_AUTOTEST_EXPORT qsizetype qt_urlRecode ( QString & appendTo,
QStringView in,
QUrl::ComponentFormattingOptions encoding,
const ushort * tableModifications )
extern

Recodes the string from begin to end. If any transformations are done, append them to appendTo and return the number of characters added. If no transformations were required, return 0.

The encoding option modifies the default behaviour: \list

  • QUrl::DecodeReserved: if set, reserved characters will be decoded; if unset, reserved characters will be encoded
  • QUrl::EncodeSpaces: if set, spaces will be encoded to "%20"; if unset, they will be " "
  • QUrl::EncodeUnicode: if set, characters above U+0080 will be encoded to their UTF-8 percent-encoded form; if unset, they will be decoded to UTF-16
  • QUrl::FullyDecoded: if set, this function will decode all percent-encoded sequences, including that of the percent character. The resulting string will not be percent-encoded anymore. Use with caution! In this mode, the behaviour is undefined if the input string contains any percent-encoding sequences above %80. Also, the function will not correct bad % sequences. \endlist

Other flags are ignored (including QUrl::EncodeReserved).

The tableModifications argument can be used to supply extra modifications to the tables, to be applied after the flags above are handled. It consists of a sequence of 16-bit values, where the low 8 bits indicate the character in question and the high 8 bits are either EncodeCharacter, LeaveCharacter or DecodeCharacter.

This function corrects percent-encoded errors by interpreting every '' as meaning "%25" (all percents in the same content).

Definition at line 641 of file qurlrecode.cpp.