9 #if QT_VERSION < 0x060000
15 static QString fromUrlEncoding(
const QByteArray &enc);
16 static QByteArray toUrlEncoding(
const QString &input,
const QByteArray &exclude =
"-._");
17 static QList<QPair<QString, QString>> fromFormUrlEncoded(
const QByteArray &enc);
19 static QString htmlEscape(
int n);
20 static QString htmlEscape(uint n);
21 static QString htmlEscape(
long n);
22 static QString htmlEscape(ulong n);
23 static QString htmlEscape(qlonglong n);
24 static QString htmlEscape(qulonglong n);
25 static QString htmlEscape(
double n);
29 static QString jsonEscape(
const QString &input);
30 static QString jsonEscape(
const char *input);
31 static QString jsonEscape(
const QByteArray &input);
32 static QString jsonEscape(
const QVariant &input);
33 static QByteArray toMimeEncoded(
const QString &input,
const QByteArray &encoding =
"UTF-8");
34 #if QT_VERSION < 0x060000
35 static QByteArray toMimeEncoded(
const QString &input, QTextCodec *codec);
39 static QString fromMimeEncoded(
const QByteArray &mime);
40 static QByteArray getResponseReasonPhrase(
int statusCode);
41 static QString trimmedQuotes(
const QString &
string);
42 static QByteArray timeZone();
43 static QByteArray toHttpDateTimeString(
const QDateTime &dateTime);
44 static QDateTime fromHttpDateTimeString(
const QByteArray &localTime);
46 static QDateTime fromHttpDateTimeUTCString(
const QByteArray &utc);
47 static QByteArray getUTCTimeString();
61 return QString::number(n);
69 return QString::number(n);
77 return QString::number(n);
85 return QString::number(n);
93 return QString::number(n);
101 return QString::number(n);
109 return QString::number(n);
118 QString s =
string.trimmed();
119 if (s.length() > 1) {
120 if ((s.startsWith(
'"') && s.endsWith(
'"'))
121 || (s.startsWith(
'\'') && s.endsWith(
'\''))) {
122 return s.mid(1, s.length() - 2);
The THttpUtility class contains utility functions.
Definition: thttputility.h:13
static QString trimmedQuotes(const QString &string)
Returns a string that has quotes removed from the start and the end.
Definition: thttputility.h:116
static QString htmlEscape(const QString &input, Tf::EscapeFlag flag=Tf::Quotes)
Returns a converted copy of input.
Definition: thttputility.cpp:140
@ Encoding
Definition: tfnamespace.h:86
EscapeFlag
Definition: tfnamespace.h:127
@ Quotes
Definition: tfnamespace.h:129
#define T_CORE_EXPORT
Definition: tdeclexport.h:28
#define T_DISABLE_COPY(Class)
Definition: tdeclexport.h:37
#define T_DISABLE_MOVE(Class)
Definition: tdeclexport.h:41