src/corelib/io/qurl.cpp File Reference

#include "qplatformdefs.h"
#include "qurl.h"
#include "private/qunicodetables_p.h"
#include "qatomic.h"
#include "qbytearray.h"
#include "qlist.h"
#include "qregexp.h"
#include "qstring.h"
#include "qstringlist.h"
#include "qstack.h"
#include "qvarlengtharray.h"
#include "qdebug.h"

Include dependency graph for qurl.cpp:

Go to the source code of this file.

Classes

struct  ErrorInfo
class  QUrlPrivate
struct  NameprepCaseFoldingEntry
class  QIdnWhitelist

Defines

#define Q_MAXINT   ((uint)((uint)(-1)>>1))
#define QURL_SETFLAG(a, b)   { (a) |= (b); }
#define QURL_UNSETFLAG(a, b)   { (a) &= ~(b); }
#define QURL_HASFLAG(a, b)   (((a) & (b)) == (b))
#define qToLower(ch)   (((ch|32) >= 'a' && (ch|32) <= 'z') ? (ch|32) : ch)

Functions

Q_CORE_EXPORT int qsnprintf (char *str, size_t n, const char *fmt,...)
static bool QT_FASTCALL _char (char **ptr, char expected, ErrorInfo *errorInfo)
static bool QT_FASTCALL _HEXDIG (char **ptr, char *dig, ErrorInfo *errorInfo)
static bool QT_FASTCALL _pctEncoded (char **ptr, char pct[], ErrorInfo *errorInfo)
static bool QT_FASTCALL _subDelims (char **ptr, char *c, ErrorInfo *errorInfo)
static bool QT_FASTCALL _ALPHA_ (char **ptr, char *c)
static bool QT_FASTCALL _DIGIT_ (char **ptr, char *c)
static bool QT_FASTCALL _unreserved (char **ptr, char *c, ErrorInfo *errorInfo)
static bool QT_FASTCALL _scheme (char **ptr, QByteArray *scheme)
static bool QT_FASTCALL _IPvFuture (char **ptr, QByteArray *host, ErrorInfo *errorInfo)
static bool QT_FASTCALL _h16 (char **ptr, QByteArray *c, ErrorInfo *errorInfo)
static bool QT_FASTCALL _decOctet (char **ptr, QByteArray *octet, ErrorInfo *errorInfo)
static bool QT_FASTCALL _IPv4Address (char **ptr, QByteArray *c, ErrorInfo *errorInfo)
static bool QT_FASTCALL _ls32 (char **ptr, QByteArray *c, ErrorInfo *errorInfo)
static bool QT_FASTCALL _IPv6Address (char **ptr, QByteArray *host, ErrorInfo *errorInfo)
static bool QT_FASTCALL _IPLiteral (char **ptr, QByteArray *host, ErrorInfo *errorInfo)
static bool QT_FASTCALL _regName (char **ptr, QByteArray *host, ErrorInfo *errorInfo)
static bool QT_FASTCALL _host (char **ptr, QByteArray *host, ErrorInfo *errorInfo)
static bool QT_FASTCALL _userInfo (char **ptr, QByteArray *userInfo, ErrorInfo *errorInfo)
static bool QT_FASTCALL _port (char **ptr, int *port)
static bool QT_FASTCALL _authority (char **ptr, QByteArray *userInfo, QByteArray *host, int *port, ErrorInfo *errorInfo)
static bool QT_FASTCALL _pchar (char **ptr, char pc[], ErrorInfo *errorInfo)
static bool QT_FASTCALL _segment (char **ptr, QByteArray *segment, ErrorInfo *errorInfo)
static bool QT_FASTCALL _segmentNZ (char **ptr, QByteArray *segment, ErrorInfo *errorInfo)
static bool QT_FASTCALL _pathAbEmpty (char **ptr, QByteArray *path, ErrorInfo *errorInfo)
static bool QT_FASTCALL _pathAbs (char **ptr, QByteArray *path, ErrorInfo *errorInfo)
static bool QT_FASTCALL _pathRootless (char **ptr, QByteArray *path, ErrorInfo *errorInfo)
static bool QT_FASTCALL _pathEmpty (char **, QByteArray *path, ErrorInfo *)
static bool QT_FASTCALL _hierPart (char **ptr, QByteArray *userInfo, QByteArray *host, int *port, QByteArray *path, ErrorInfo *errorInfo)
static bool QT_FASTCALL _query (char **ptr, QByteArray *query, ErrorInfo *errorInfo)
static bool QT_FASTCALL _fragment (char **ptr, QByteArray *fragment, ErrorInfo *errorInfo)
static bool isMappedToNothing (const QChar &ch)
static bool operator< (int one, const NameprepCaseFoldingEntry &other)
static bool operator< (const NameprepCaseFoldingEntry &one, int other)
static QString mappedToLowerCase (const QString &str)
static QString strippedOfProhibitedOutput (const QString &source)
static bool isBidirectionalRorAL (const QChar &c)
static bool isBidirectionalL (const QChar &ch)
QString Q_AUTOTEST_EXPORT qt_nameprep (const QString &source)
static bool qt_is_idn_enabled (const QStringList &labels)
static QString qt_from_ACE (const QString &domain)
static bool isHex (char c)
bool q_strchr (const char str[], char chr)
static char toHex (char c)
static uint adapt (uint delta, uint numpoints, bool firsttime)
static char encodeDigit (uint digit)
QDebug operator<< (QDebug d, const QUrl &url)

Variables

static const uint base = 36
static const uint tmin = 1
static const uint tmax = 26
static const uint skew = 38
static const uint damp = 700
static const uint initial_bias = 72
static const uint initial_n = 128
static const NameprepCaseFoldingEntry NameprepCaseFolding []
static const char hexnumbers [] = "0123456789ABCDEF"


Define Documentation

#define Q_MAXINT   ((uint)((uint)(-1)>>1))

Definition at line 168 of file qurl.cpp.

Referenced by QUrl::fromPunycode(), and QUrl::toPunycode().

#define qToLower ( ch   )     (((ch|32) >= 'a' && (ch|32) <= 'z') ? (ch|32) : ch)

Definition at line 3489 of file qurl.cpp.

Referenced by QString::arg(), QUrlPrivate::normalized(), QString::setNum(), QByteArray::setNum(), QLocale::toString(), and QString::vsprintf().

#define QURL_HASFLAG ( a,
 )     (((a) & (b)) == (b))

Definition at line 179 of file qurl.cpp.

Referenced by QUrl::addQueryItem(), QUrl::allQueryItemValues(), QUrl::authority(), QUrl::encodedQuery(), QUrl::fragment(), QUrl::hasFragment(), QUrl::hasQuery(), QUrl::hasQueryItem(), QUrl::host(), QUrl::isEmpty(), QUrl::isParentOf(), QUrl::isRelative(), QUrl::isValid(), QUrlPrivate::normalized(), QUrl::operator<(), QUrl::operator==(), QUrl::password(), QUrl::path(), QUrl::port(), QUrl::queryItems(), QUrl::queryItemValue(), QUrl::removeAllQueryItems(), QUrl::removeQueryItem(), QUrl::resolved(), QUrl::scheme(), QUrl::setAuthority(), QUrl::setEncodedQuery(), QUrl::setFragment(), QUrl::setHost(), QUrl::setPassword(), QUrl::setPath(), QUrl::setPort(), QUrl::setQueryItems(), QUrl::setScheme(), QUrl::setUserInfo(), QUrl::setUserName(), QUrlPrivate::toEncoded(), QUrl::toLocalFile(), QUrl::toString(), QUrl::userInfo(), and QUrl::userName().

#define QURL_SETFLAG ( a,
 )     { (a) |= (b); }

Definition at line 177 of file qurl.cpp.

Referenced by QUrlPrivate::normalized(), and QUrlPrivate::parse().

#define QURL_UNSETFLAG ( a,
 )     { (a) &= ~(b); }

Definition at line 178 of file qurl.cpp.

Referenced by QUrlPrivate::clear(), QUrl::setAuthority(), QUrl::setEncodedQuery(), QUrl::setFragment(), QUrl::setHost(), QUrl::setPassword(), QUrl::setPath(), QUrl::setPort(), QUrl::setScheme(), QUrl::setUserInfo(), and QUrl::setUserName().


Function Documentation

static bool QT_FASTCALL _ALPHA_ ( char **  ptr,
char *  c 
) [static]

Definition at line 341 of file qurl.cpp.

Referenced by _unreserved().

00342 {
00343     char ch = **ptr;
00344     if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {
00345         *c = ch;
00346         ++(*ptr);
00347         return true;
00348     }
00349 
00350     return false;
00351 }

static bool QT_FASTCALL _authority ( char **  ptr,
QByteArray userInfo,
QByteArray host,
int *  port,
ErrorInfo errorInfo 
) [static]

Definition at line 789 of file qurl.cpp.

References _host(), _port(), _userInfo(), and QByteArray::clear().

Referenced by _hierPart().

00790 {
00791     char *ptrBackup = *ptr;
00792     if (_userInfo(ptr, userInfo, errorInfo)) {
00793         if (*((*ptr)++) != '@') {
00794             *ptr = ptrBackup;
00795             userInfo->clear();
00796             // fall through
00797         }
00798     }
00799 
00800     if (!_host(ptr, host, errorInfo)) {
00801         *ptr = ptrBackup;
00802         return false;
00803     }
00804 
00805     char *ptrBackup2 = *ptr;
00806     if (*((*ptr)++) != ':') {
00807         *ptr = ptrBackup2;
00808         return true;
00809     }
00810 
00811     if (!_port(ptr, port)) {
00812         *ptr = ptrBackup2;
00813         return false;
00814     }
00815 
00816     return true;
00817 }

Here is the call graph for this function:

static bool QT_FASTCALL _char ( char **  ptr,
char  expected,
ErrorInfo errorInfo 
) [static]

Definition at line 260 of file qurl.cpp.

References ErrorInfo::setParams().

Referenced by _IPLiteral(), _IPv6Address(), _ls32(), _pctEncoded(), and _userInfo().

00261 {
00262     if (*((*ptr)) == expected) {
00263         ++(*ptr);
00264         return true;
00265     }
00266 
00267     errorInfo->setParams(*ptr, "", QLatin1Char(expected), QLatin1Char(*((*ptr))));
00268     return false;
00269 }

Here is the call graph for this function:

static bool QT_FASTCALL _decOctet ( char **  ptr,
QByteArray octet,
ErrorInfo errorInfo 
) [static]

Definition at line 474 of file qurl.cpp.

References ErrorInfo::setParams().

Referenced by _IPv4Address().

00475 {
00476     char c1 = **ptr;
00477 
00478     if (c1 < '0' || c1 > '9') {
00479         errorInfo->setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "expected decimal digit (0-9)"),
00480                              QLatin1Char('\0'), QLatin1Char(c1));
00481         return false;
00482     }
00483 
00484     *octet += c1;
00485 
00486     ++(*ptr);
00487 
00488     if (c1 == '0')
00489         return true;
00490 
00491     char c2 = **ptr;
00492 
00493     if (c2 < '0' || c2 > '9')
00494         return true;
00495 
00496     *octet += c2;
00497 
00498     ++(*ptr);
00499 
00500     char c3 = **ptr;
00501     if (c3 < '0' || c3 > '9')
00502         return true;
00503 
00504     *octet += c3;
00505 
00506     // If there is a three digit number larger than 255, reject the
00507     // whole token.
00508     if (c1 >= '2' && c2 >= '5' && c3 > '5') {
00509         errorInfo->setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "digit number larger than 255"),
00510                              QLatin1Char('\0'), QLatin1Char('\0'));
00511         return false;
00512     }
00513 
00514     ++(*ptr);
00515 
00516     return true;
00517 }

Here is the call graph for this function:

static bool QT_FASTCALL _DIGIT_ ( char **  ptr,
char *  c 
) [static]

Definition at line 353 of file qurl.cpp.

Referenced by _unreserved().

00354 {
00355     char ch = **ptr;
00356     if (ch >= '0' && ch <= '9') {
00357         *c = ch;
00358         ++(*ptr);
00359         return true;
00360     }
00361 
00362     return false;
00363 }

static bool QT_FASTCALL _fragment ( char **  ptr,
QByteArray fragment,
ErrorInfo errorInfo 
) [static]

Definition at line 1029 of file qurl.cpp.

References _pchar().

Referenced by QUrlPrivate::parse().

01030 {
01031     for (;;) {
01032         char tmp[4];
01033         if (_pchar(ptr, tmp, errorInfo)) {
01034             *fragment += tmp;
01035         } else {
01036             char *ptrBackup = *ptr;
01037             char ch = *((*ptr)++);
01038 
01039             // exception: allow several '#' characters within a
01040             // fragment.
01041             if (ch == '/' || ch == '?' || ch == '#')
01042                 *fragment += ch;
01043             else {
01044                 *ptr = ptrBackup;
01045                 break;
01046             }
01047         }
01048     }
01049 
01050     return true;
01051 }

Here is the call graph for this function:

static bool QT_FASTCALL _h16 ( char **  ptr,
QByteArray c,
ErrorInfo errorInfo 
) [static]

Definition at line 453 of file qurl.cpp.

References _HEXDIG(), c, and i.

Referenced by _IPv6Address(), and _ls32().

00454 {
00455     char ch;
00456     if (!_HEXDIG(ptr, &ch, errorInfo))
00457         return false;
00458     *c += ch;
00459 
00460     for (int i = 0; i < 3; ++i) {
00461         if (!_HEXDIG(ptr, &ch, errorInfo))
00462             break;
00463         *c += ch;
00464     }
00465 
00466     return true;
00467 }

Here is the call graph for this function:

static bool QT_FASTCALL _HEXDIG ( char **  ptr,
char *  dig,
ErrorInfo errorInfo 
) [static]

Definition at line 271 of file qurl.cpp.

References ErrorInfo::setParams().

Referenced by _h16(), _IPvFuture(), and _pctEncoded().

00272 {
00273     char ch = **ptr;
00274     if ((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') || (ch >= 'A' && ch <= 'F')) {
00275         *dig = ch;
00276         ++(*ptr);
00277         return true;
00278     }
00279 
00280     errorInfo->setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "expected hexdigit number (0-9, a-f, A-F)"),
00281                          QLatin1Char('\0'), QLatin1Char(ch));
00282     return false;
00283 }

Here is the call graph for this function:

static bool QT_FASTCALL _hierPart ( char **  ptr,
QByteArray userInfo,
QByteArray host,
int *  port,
QByteArray path,
ErrorInfo errorInfo 
) [static]

Definition at line 991 of file qurl.cpp.

References _authority(), _pathAbEmpty(), _pathAbs(), _pathEmpty(), _pathRootless(), and path.

Referenced by QUrlPrivate::parse().

00993 {
00994     char *ptrBackup = *ptr;
00995     if (*((*ptr)++) == '/' && *((*ptr)++) == '/') {
00996         if (!_authority(ptr, userInfo, host, port, errorInfo)) { *ptr = ptrBackup; return false; }
00997         if (!_pathAbEmpty(ptr, path, errorInfo)) { *ptr = ptrBackup; return false; }
00998         return true;
00999     } else {
01000         *ptr = ptrBackup;
01001         return (_pathAbs(ptr, path, errorInfo) || _pathRootless(ptr, path, errorInfo)
01002                 || _pathEmpty(ptr, path, errorInfo));
01003     }
01004 }

Here is the call graph for this function:

static bool QT_FASTCALL _host ( char **  ptr,
QByteArray host,
ErrorInfo errorInfo 
) [static]

Definition at line 736 of file qurl.cpp.

References _IPLiteral(), _IPv4Address(), and _regName().

Referenced by _authority().

00737 {
00738     return (_IPLiteral(ptr, host, errorInfo) || _IPv4Address(ptr, host, errorInfo) || _regName(ptr, host, errorInfo));
00739 }

Here is the call graph for this function:

static bool QT_FASTCALL _IPLiteral ( char **  ptr,
QByteArray host,
ErrorInfo errorInfo 
) [static]

Definition at line 694 of file qurl.cpp.

References _char(), _IPv6Address(), and _IPvFuture().

Referenced by _host().

00695 {
00696     char *ptrBackup = *ptr;
00697     if (!_char(ptr, '[', errorInfo))
00698         return false;
00699 
00700     *host += '[';
00701 
00702     if (!_IPv6Address(ptr, host, errorInfo) && !_IPvFuture(ptr, host, errorInfo)) {
00703         *ptr = ptrBackup;
00704         return false;
00705     }
00706 
00707     if (!_char(ptr, ']', errorInfo)) {
00708         *ptr = ptrBackup;
00709         return false;
00710     }
00711 
00712     *host += ']';
00713 
00714     return true;
00715 }

Here is the call graph for this function:

static bool QT_FASTCALL _IPv4Address ( char **  ptr,
QByteArray c,
ErrorInfo errorInfo 
) [static]

Definition at line 520 of file qurl.cpp.

References _decOctet(), c, i, QByteArray::reserve(), and ErrorInfo::setParams().

Referenced by _host(), and _ls32().

00521 {
00522     char *ptrBackup = *ptr;
00523     QByteArray tmp1; tmp1.reserve(32);
00524 
00525     if (!_decOctet(ptr, &tmp1, errorInfo)) {
00526         *ptr = ptrBackup;
00527         return false;
00528     }
00529 
00530     for (int i = 0; i < 3; ++i) {
00531         char ch = *((*ptr)++);
00532         if (ch != '.') {
00533             *ptr = ptrBackup;
00534             errorInfo->setParams(*ptr, "", QLatin1Char('.'), QLatin1Char(ch));
00535             return false;
00536         }
00537 
00538         tmp1 += '.';
00539 
00540         if (!_decOctet(ptr, &tmp1, errorInfo)) {
00541             *ptr = ptrBackup;
00542             return false;
00543         }
00544     }
00545 
00546     *c += tmp1;
00547 
00548     return true;
00549 }

Here is the call graph for this function:

static bool QT_FASTCALL _IPv6Address ( char **  ptr,
QByteArray host,
ErrorInfo errorInfo 
) [static]

Definition at line 578 of file qurl.cpp.

References _char(), _h16(), _ls32(), ErrorInfo::setParams(), and QByteArray::truncate().

Referenced by _IPLiteral().

00579 {
00580     char *ptrBackup = *ptr;
00581 
00582     QByteArray tmp;
00583 
00584     // count of (h16 ":") to the left of and including ::
00585     int leftHexColons = 0;
00586     // count of (h16 ":") to the right of ::
00587     int rightHexColons = 0;
00588 
00589     // first count the number of (h16 ":") on the left of ::
00590     while (_h16(ptr, &tmp, errorInfo)) {
00591 
00592         // an h16 not followed by a colon is considered an
00593         // error.
00594         if (!_char(ptr, ':', errorInfo)) {
00595             *ptr = ptrBackup;
00596             return false;
00597         }
00598         tmp += ':';
00599         ++leftHexColons;
00600 
00601         // check for case 1, the only time when there can be no ::
00602         if (leftHexColons == 6 && _ls32(ptr, &tmp, errorInfo)) {
00603             *host += tmp;
00604             return true;
00605         }
00606     }
00607 
00608     // check for case 2 where the address starts with a :
00609     if (leftHexColons == 0 && _char(ptr, ':', errorInfo))
00610         tmp += ':';
00611 
00612 
00613     // check for the second colon in ::
00614     if (!_char(ptr, ':', errorInfo)) {
00615         *ptr = ptrBackup;
00616         return false;
00617     }
00618     tmp += ':';
00619 
00620     int canBeCase = -1;
00621     bool ls32WasRead = false;
00622 
00623     QByteArray tmp2;
00624     char *tmpBackup = *ptr;
00625 
00626     // count the number of (h16 ":") on the right of ::
00627     for (;;) {
00628         tmpBackup = *ptr;
00629         if (!_h16(ptr, &tmp2, errorInfo)) {
00630             if (!_ls32(ptr, &tmp, errorInfo)) {
00631                 if (rightHexColons != 0) {
00632                     *ptr = ptrBackup;
00633                     errorInfo->setParams(*ptr, QT_TRANSLATE_NOOP(QUrl,
00634                                          "too many colons (\':\'))"),
00635                                          QLatin1Char('\0'), QLatin1Char('\0'));
00636                     return false;
00637                 }
00638 
00639                 // the address ended with :: (case 9)
00640                 // only valid if 1 <= leftHexColons <= 7
00641                 canBeCase = 9;
00642             } else {
00643                 ls32WasRead = true;
00644             }
00645             break;
00646         }
00647         ++rightHexColons;
00648         if (!_char(ptr, ':', errorInfo)) {
00649             // no colon could mean that what was read as an h16
00650             // was in fact the first part of an ls32. we backtrack
00651             // and retry.
00652             char *pb = *ptr;
00653             *ptr = tmpBackup;
00654             if (_ls32(ptr, &tmp, errorInfo)) {
00655                 ls32WasRead = true;
00656                 --rightHexColons;
00657             } else {
00658                 *ptr = pb;
00659                 // address ends with only 1 h16 after :: (case 8)
00660                 if (rightHexColons == 1)
00661                     canBeCase = 8;
00662                 tmp += tmp2;
00663             }
00664             break;
00665         }
00666         tmp += tmp2 + ':';
00667         tmp2.truncate(0);
00668     }
00669 
00670     // determine which case it is based on the number of rightHexColons
00671     if (canBeCase == -1) {
00672 
00673         // check if a ls32 was read. If it wasn't and rightHexColons >= 2 then the
00674         // last 2 HexColons are in fact a ls32
00675         if (!ls32WasRead && rightHexColons >= 2)
00676             rightHexColons -= 2;
00677 
00678         canBeCase = 7 - rightHexColons;
00679     }
00680 
00681     // based on the case we need to check that the number of leftHexColons is valid
00682     if (leftHexColons > (canBeCase - 2)) {
00683         *ptr = ptrBackup;
00684         errorInfo->setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "too many colons (\':\')"),
00685                              QLatin1Char('\0'), QLatin1Char('\0'));
00686         return false;
00687     }
00688 
00689     *host += tmp;
00690     return true;
00691 }

Here is the call graph for this function:

static bool QT_FASTCALL _IPvFuture ( char **  ptr,
QByteArray host,
ErrorInfo errorInfo 
) [static]

Definition at line 408 of file qurl.cpp.

References _HEXDIG(), _subDelims(), _unreserved(), and ErrorInfo::setParams().

Referenced by _IPLiteral().

00409 {
00410     char *ptrBackup = *ptr;
00411     char ch = *((*ptr)++);
00412     if (ch != 'v') {
00413         *ptr = ptrBackup;
00414         errorInfo->setParams(*ptr, "", QLatin1Char('v'), QLatin1Char(ch));
00415         return false;
00416     }
00417 
00418     *host += ch;
00419 
00420     if (!_HEXDIG(ptr, &ch, errorInfo)) {
00421         *ptr = ptrBackup;
00422         return false;
00423     }
00424 
00425     *host += ch;
00426 
00427     while (_HEXDIG(ptr, &ch, errorInfo))
00428         *host += ch;
00429 
00430     char c = *((*ptr)++);
00431     if (c != '.') {
00432         *ptr = ptrBackup;
00433         errorInfo->setParams(*ptr, "", QLatin1Char('.'), QLatin1Char(c));
00434         return false;
00435     }
00436 
00437     if (!_unreserved(ptr, &ch, errorInfo) && !_subDelims(ptr, &ch, errorInfo) && (ch = *((*ptr)++)) != ':') {
00438         *ptr = ptrBackup;
00439         errorInfo->setParams(*ptr, "", QLatin1Char(':'), QLatin1Char(ch));
00440         return false;
00441     }
00442 
00443     *host += ch;
00444 
00445     while (_unreserved(ptr, &ch, errorInfo) || _subDelims(ptr, &ch, errorInfo) || (ch = *((*ptr)++)) == ':')
00446         *host += ch;
00447 
00448     return true;
00449 }

Here is the call graph for this function:

static bool QT_FASTCALL _ls32 ( char **  ptr,
QByteArray c,
ErrorInfo errorInfo 
) [static]

Definition at line 553 of file qurl.cpp.

References _char(), _h16(), _IPv4Address(), and c.

Referenced by _IPv6Address().

00554 {
00555     char *ptrBackup = *ptr;
00556     QByteArray tmp1;
00557     QByteArray tmp2;
00558     if (_h16(ptr, &tmp1, errorInfo) && _char(ptr, ':', errorInfo) && _h16(ptr, &tmp2, errorInfo)) {
00559         *c += tmp1;
00560         *c += ':';
00561         *c += tmp2;
00562         return true;
00563     }
00564 
00565     *ptr = ptrBackup;
00566     return _IPv4Address(ptr, c, errorInfo);
00567 }

Here is the call graph for this function:

static bool QT_FASTCALL _pathAbEmpty ( char **  ptr,
QByteArray path,
ErrorInfo errorInfo 
) [static]

Definition at line 885 of file qurl.cpp.

References _pchar(), and path.

Referenced by _hierPart().

00886 {
00887     for (;;) {
00888         char *ptrBackup = *ptr;
00889         if (*((*ptr)++) != '/') {
00890             *ptr = ptrBackup;
00891             break;
00892         }
00893 
00894         *path += '/';
00895 
00896         char pctTmp[4];
00897         if (_pchar(ptr, pctTmp, errorInfo)) {
00898             *path += pctTmp;
00899             while (_pchar(ptr, pctTmp, errorInfo))
00900                 *path += pctTmp;
00901         }
00902     }
00903 
00904     return true;
00905 }

Here is the call graph for this function:

static bool QT_FASTCALL _pathAbs ( char **  ptr,
QByteArray path,
ErrorInfo errorInfo 
) [static]

Definition at line 908 of file qurl.cpp.

References _segment(), _segmentNZ(), path, and ErrorInfo::setParams().

Referenced by _hierPart().

00909 {
00910     char *ptrBackup = *ptr;
00911     char ch = *((*ptr)++);
00912     if (ch != '/') {
00913         *ptr = ptrBackup;
00914         errorInfo->setParams(*ptr, "", QLatin1Char('/'), QLatin1Char(ch));
00915         return false;
00916     }
00917 
00918     *path += '/';
00919 
00920     // we might be able to unnest this to gain some performance.
00921     QByteArray tmp;
00922     if (!_segmentNZ(ptr, &tmp, errorInfo))
00923         return true;
00924 
00925     *path += tmp;
00926 
00927     for (;;) {
00928         char *ptrBackup2 = *ptr;
00929         if (*((*ptr)++) != '/') {
00930             *ptr = ptrBackup2;
00931             break;
00932         }
00933 
00934         // we might be able to unnest this to gain some
00935         // performance.
00936         QByteArray segment;
00937         if (!_segment(ptr, &segment, errorInfo)) {
00938             *ptr = ptrBackup2;
00939             break;
00940         }
00941 
00942         *path += '/';
00943         *path += segment;
00944     }
00945 
00946     return true;
00947 }

Here is the call graph for this function:

static bool QT_FASTCALL _pathEmpty ( char **  ,
QByteArray path,
ErrorInfo  
) [static]

Definition at line 981 of file qurl.cpp.

References path.

Referenced by _hierPart().

00982 {
00983     path->truncate(0);
00984     return true;
00985 }

static bool QT_FASTCALL _pathRootless ( char **  ptr,
QByteArray path,
ErrorInfo errorInfo 
) [static]

Definition at line 950 of file qurl.cpp.

References _segment(), _segmentNZ(), and path.

Referenced by _hierPart().

00951 {
00952     // we might be able to unnest this to gain some performance.
00953     QByteArray segment;
00954     if (!_segmentNZ(ptr, &segment, errorInfo))
00955         return false;
00956 
00957     *path += segment;
00958 
00959     for (;;) {
00960         char *ptrBackup2 = *ptr;
00961         if (*((*ptr)++) != '/') {
00962             *ptr = ptrBackup2;
00963             break;
00964         }
00965 
00966         // we might be able to unnest this to gain some performance.
00967         QByteArray segment;
00968         if (!_segment(ptr, &segment, errorInfo)) {
00969             *ptr = ptrBackup2;
00970             break;
00971         }
00972 
00973         *path += '/';
00974         *path += segment;
00975     }
00976 
00977     return true;
00978 }

Here is the call graph for this function:

static bool QT_FASTCALL _pchar ( char **  ptr,
char  pc[],
ErrorInfo errorInfo 
) [static]

Definition at line 820 of file qurl.cpp.

References _pctEncoded(), and ErrorInfo::setParams().

Referenced by _fragment(), _pathAbEmpty(), _query(), _segment(), and _segmentNZ().

00821 {
00822     char c = *(*ptr);
00823 
00824     switch (c) {
00825     case '!': case '$': case '&': case '\'': case '(': case ')': case '*':
00826     case '+': case ',': case ';': case '=': case ':': case '@':
00827     case '-': case '.': case '_': case '~':
00828         pc[0] = c;
00829         pc[1] = '\0';
00830         ++(*ptr);
00831         return true;
00832     default:
00833         break;
00834     };
00835 
00836     if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) {
00837         pc[0] = c;
00838         pc[1] = '\0';
00839         ++(*ptr);
00840         return true;
00841     }
00842 
00843     if (_pctEncoded(ptr, pc, errorInfo))
00844         return true;
00845 
00846     errorInfo->setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "expected pchar (unreserved / pct-encoded"
00847                          "/ sub-delims / \":\" / \"@\""), QLatin1Char('\0'), QLatin1Char(c));
00848     return false;
00849 }

Here is the call graph for this function:

static bool QT_FASTCALL _pctEncoded ( char **  ptr,
char  pct[],
ErrorInfo errorInfo 
) [static]

Definition at line 286 of file qurl.cpp.

References _char(), and _HEXDIG().

Referenced by _pchar(), _regName(), and _userInfo().

00287 {
00288     char *ptrBackup = *ptr;
00289     if (!_char(ptr, '%', errorInfo)) return false;
00290 
00291     char hex1, hex2;
00292     if (!_HEXDIG(ptr, &hex1, errorInfo)) { *ptr = ptrBackup; return false; }
00293     if (!_HEXDIG(ptr, &hex2, errorInfo)) { *ptr = ptrBackup; return false; }
00294 
00295     pct[0] = '%';
00296     pct[1] = hex1;
00297     pct[2] = hex2;
00298     pct[3] = '\0';
00299 
00300     return true;
00301 }

Here is the call graph for this function:

static bool QT_FASTCALL _port ( char **  ptr,
int *  port 
) [static]

Definition at line 764 of file qurl.cpp.

Referenced by _authority().

00765 {
00766     bool first = true;
00767 
00768     for (;;) {
00769         char *ptrBackup = *ptr;
00770         char ch = *((*ptr)++);
00771         if (ch < '0' || ch > '9') {
00772             *ptr = ptrBackup;
00773             break;
00774         }
00775 
00776         if (first) {
00777             first = false;
00778             *port = 0;
00779         }
00780 
00781         *port *= 10;
00782         *port += ch - '0';
00783     }
00784 
00785     return true;
00786 }

static bool QT_FASTCALL _query ( char **  ptr,
QByteArray query,
ErrorInfo errorInfo 
) [static]

Definition at line 1007 of file qurl.cpp.

References _pchar().

Referenced by QUrlPrivate::parse().

01008 {
01009     for (;;) {
01010         char tmp[4];
01011         if (_pchar(ptr, tmp, errorInfo)) {
01012             *query += tmp;
01013         } else {
01014             char *ptrBackup = *ptr;
01015             char ch = *((*ptr)++);
01016             if (ch == '/' || ch == '?')
01017                 *query += ch;
01018             else {
01019                 *ptr = ptrBackup;
01020                 break;
01021             }
01022         }
01023     }
01024 
01025     return true;
01026 }

Here is the call graph for this function:

static bool QT_FASTCALL _regName ( char **  ptr,
QByteArray host,
ErrorInfo errorInfo 
) [static]

Definition at line 718 of file qurl.cpp.

References _pctEncoded(), _subDelims(), and _unreserved().

Referenced by _host().

00719 {
00720     char pctTmp[4];
00721     for (;;) {
00722         char ch;
00723         if (!_unreserved(ptr, &ch, errorInfo) && !_subDelims(ptr, &ch, errorInfo)) {
00724             if (!_pctEncoded(ptr, pctTmp, errorInfo))
00725                 break;
00726             *host += pctTmp;
00727         } else {
00728             *host += ch;
00729         }
00730     }
00731 
00732     return true;
00733 }

Here is the call graph for this function:

static bool QT_FASTCALL _scheme ( char **  ptr,
QByteArray scheme 
) [static]

Definition at line 386 of file qurl.cpp.

Referenced by QUrlPrivate::parse().

00387 {
00388     bool first = true;
00389 
00390     for (;;) {
00391         char ch = **ptr;
00392         if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {
00393             *scheme += ch;
00394         } else if (!first && ((ch >= '0' && ch <= '9') || ch == '+' || ch == '-' || ch == '.')) {
00395             *scheme += ch;
00396         } else {
00397             break;
00398         }
00399 
00400         ++(*ptr);
00401         first = false;
00402     }
00403 
00404     return true;
00405 }

static bool QT_FASTCALL _segment ( char **  ptr,
QByteArray segment,
ErrorInfo errorInfo 
) [static]

Definition at line 852 of file qurl.cpp.

References _pchar().

Referenced by _pathAbs(), and _pathRootless().

00853 {
00854     for (;;) {
00855         char pctTmp[4];
00856         if (!_pchar(ptr, pctTmp, errorInfo))
00857             break;
00858 
00859         *segment += pctTmp;
00860     }
00861 
00862     return true;
00863 }

Here is the call graph for this function:

static bool QT_FASTCALL _segmentNZ ( char **  ptr,
QByteArray segment,
ErrorInfo errorInfo 
) [static]

Definition at line 866 of file qurl.cpp.

References _pchar().

Referenced by _pathAbs(), and _pathRootless().

00867 {
00868     char pctTmp[4];
00869     if (!_pchar(ptr, pctTmp, errorInfo))
00870         return false;
00871 
00872     *segment += pctTmp;
00873 
00874     for (;;) {
00875         if (!_pchar(ptr, pctTmp, errorInfo))
00876             break;
00877 
00878         *segment += pctTmp;
00879     }
00880 
00881     return true;
00882 }

Here is the call graph for this function:

static bool QT_FASTCALL _subDelims ( char **  ptr,
char *  c,
ErrorInfo errorInfo 
) [static]

Definition at line 322 of file qurl.cpp.

References ErrorInfo::setParams().

Referenced by _IPvFuture(), _regName(), and _userInfo().

00323 {
00324     char ch = **ptr;
00325     switch (ch) {
00326     case '!': case '$': case '&': case '\'':
00327     case '(': case ')': case '*': case '+':
00328     case ',': case ';': case '=':
00329         *c = ch;
00330         ++(*ptr);
00331         return true;
00332     default:
00333         errorInfo->setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "expected sub-delimiter ")
00334                              + QString("(\"!\", \"$\", \"&\", \"\'\", \"(\", \")\",")
00335                              + QString("\"*\", \"+\", \",\", \";\", \"=\")"),
00336                              QLatin1Char('\0'), QLatin1Char(ch));
00337         return false;
00338     }
00339 }

Here is the call graph for this function:

static bool QT_FASTCALL _unreserved ( char **  ptr,
char *  c,
ErrorInfo errorInfo 
) [static]

Definition at line 366 of file qurl.cpp.

References _ALPHA_(), _DIGIT_(), and ErrorInfo::setParams().

Referenced by _IPvFuture(), _regName(), and _userInfo().

00367 {
00368     if (_ALPHA_(ptr, c) || _DIGIT_(ptr, c))
00369         return true;
00370 
00371     char ch = **ptr;
00372     switch (ch) {
00373     case '-': case '.': case '_': case '~':
00374         *c = ch;
00375         ++(*ptr);
00376         return true;
00377     default:
00378         errorInfo->setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "expected unreserved (alpha, digit,")
00379                              + QString("\'=\', \'.\', \'_\', \'~\'"),
00380                              QLatin1Char('\0'), QLatin1Char(ch));
00381         return false;
00382     }
00383 }

Here is the call graph for this function:

static bool QT_FASTCALL _userInfo ( char **  ptr,
QByteArray userInfo,
ErrorInfo errorInfo 
) [static]

Definition at line 742 of file qurl.cpp.

References _char(), _pctEncoded(), _subDelims(), and _unreserved().

Referenced by _authority().

00743 {
00744     for (;;) {
00745         char ch;
00746         if (_unreserved(ptr, &ch, errorInfo) || _subDelims(ptr, &ch, errorInfo)) {
00747             *userInfo += ch;
00748         } else {
00749             char pctTmp[4];
00750             if (_pctEncoded(ptr, pctTmp, errorInfo)) {
00751                 *userInfo += pctTmp;
00752             } else if (_char(ptr, ':', errorInfo)) {
00753                 *userInfo += ':';
00754             } else {
00755                 break;
00756             }
00757         }
00758     }
00759 
00760     return true;
00761 }

Here is the call graph for this function:

static uint adapt ( uint  delta,
uint  numpoints,
bool  firsttime 
) [inline, static]

Definition at line 4766 of file qurl.cpp.

References base, damp, skew, tmax, and tmin.

Referenced by QUrl::fromPunycode(), and QUrl::toPunycode().

04767 {
04768     delta /= (firsttime ? damp : 2);
04769     delta += (delta / numpoints);
04770 
04771     uint k = 0;
04772     for (; delta > ((base - tmin) * tmax) / 2; k += base)
04773         delta /= (base - tmin);
04774 
04775     return k + (((base - tmin + 1) * delta) / (delta + skew));
04776 }

static char encodeDigit ( uint  digit  )  [inline, static]

Definition at line 4778 of file qurl.cpp.

Referenced by QUrl::toPunycode().

04779 {
04780   return digit + 22 + 75 * (digit < 26);
04781 }

static bool isBidirectionalL ( const QChar ch  )  [static]

Definition at line 2568 of file qurl.cpp.

References QChar::unicode().

Referenced by qt_nameprep().

02569 {
02570     ushort uc = ch.unicode();
02571     return (uc >= 0x0041 && uc <= 0x005A)
02572           || (uc >= 0x0061 && uc <= 0x007A)
02573           || uc == 0x00AA
02574           || uc == 0x00B5
02575           || uc == 0x00BA
02576           || (uc >= 0x00C0 && uc <= 0x00D6)
02577           || (uc >= 0x00D8 && uc <= 0x00F6)
02578           || (uc >= 0x00F8 && uc <= 0x0220)
02579           || (uc >= 0x0222 && uc <= 0x0233)
02580           || (uc >= 0x0250 && uc <= 0x02AD)
02581           || (uc >= 0x02B0 && uc <= 0x02B8)
02582           || (uc >= 0x02BB && uc <= 0x02C1)
02583           || (uc >= 0x02D0 && uc <= 0x02D1)
02584           || (uc >= 0x02E0 && uc <= 0x02E4)
02585           || uc == 0x02EE
02586           || uc == 0x037A
02587           || uc == 0x0386
02588           || (uc >= 0x0388 && uc <= 0x038A)
02589           || uc == 0x038C
02590           || (uc >= 0x038E && uc <= 0x03A1)
02591           || (uc >= 0x03A3 && uc <= 0x03CE)
02592           || (uc >= 0x03D0 && uc <= 0x03F5)
02593           || (uc >= 0x0400 && uc <= 0x0482)
02594           || (uc >= 0x048A && uc <= 0x04CE)
02595           || (uc >= 0x04D0 && uc <= 0x04F5)
02596           || (uc >= 0x04F8 && uc <= 0x04F9)
02597           || (uc >= 0x0500 && uc <= 0x050F)
02598           || (uc >= 0x0531 && uc <= 0x0556)
02599           || (uc >= 0x0559 && uc <= 0x055F)
02600           || (uc >= 0x0561 && uc <= 0x0587)
02601           || uc == 0x0589
02602           || uc == 0x0903
02603           || (uc >= 0x0905 && uc <= 0x0939)
02604           || (uc >= 0x093D && uc <= 0x0940)
02605           || (uc >= 0x0949 && uc <= 0x094C)
02606           || uc == 0x0950
02607           || (uc >= 0x0958 && uc <= 0x0961)
02608           || (uc >= 0x0964 && uc <= 0x0970)
02609           || (uc >= 0x0982 && uc <= 0x0983)
02610           || (uc >= 0x0985 && uc <= 0x098C)
02611           || (uc >= 0x098F && uc <= 0x0990)
02612           || (uc >= 0x0993 && uc <= 0x09A8)
02613           || (uc >= 0x09AA && uc <= 0x09B0)
02614           || uc == 0x09B2
02615           || (uc >= 0x09B6 && uc <= 0x09B9)
02616           || (uc >= 0x09BE && uc <= 0x09C0)
02617           || (uc >= 0x09C7 && uc <= 0x09C8)
02618           || (uc >= 0x09CB && uc <= 0x09CC)
02619           || uc == 0x09D7
02620           || (uc >= 0x09DC && uc <= 0x09DD)
02621           || (uc >= 0x09DF && uc <= 0x09E1)
02622           || (uc >= 0x09E6 && uc <= 0x09F1)
02623           || (uc >= 0x09F4 && uc <= 0x09FA)
02624           || (uc >= 0x0A05 && uc <= 0x0A0A)
02625           || (uc >= 0x0A0F && uc <= 0x0A10)
02626           || (uc >= 0x0A13 && uc <= 0x0A28)
02627           || (uc >= 0x0A2A && uc <= 0x0A30)
02628           || (uc >= 0x0A32 && uc <= 0x0A33)
02629           || (uc >= 0x0A35 && uc <= 0x0A36)
02630           || (uc >= 0x0A38 && uc <= 0x0A39)
02631           || (uc >= 0x0A3E && uc <= 0x0A40)
02632           || (uc >= 0x0A59 && uc <= 0x0A5C)
02633           || uc == 0x0A5E
02634           || (uc >= 0x0A66 && uc <= 0x0A6F)
02635           || (uc >= 0x0A72 && uc <= 0x0A74)
02636           || uc == 0x0A83
02637           || (uc >= 0x0A85 && uc <= 0x0A8B)
02638           || uc == 0x0A8D
02639           || (uc >= 0x0A8F && uc <= 0x0A91)
02640           || (uc >= 0x0A93 && uc <= 0x0AA8)
02641           || (uc >= 0x0AAA && uc <= 0x0AB0)
02642           || (uc >= 0x0AB2 && uc <= 0x0AB3)
02643           || (uc >= 0x0AB5 && uc <= 0x0AB9)
02644           || (uc >= 0x0ABD && uc <= 0x0AC0)
02645           || uc == 0x0AC9
02646           || (uc >= 0x0ACB && uc <= 0x0ACC)
02647           || uc == 0x0AD0
02648           || uc == 0x0AE0
02649           || (uc >= 0x0AE6 && uc <= 0x0AEF)
02650           || (uc >= 0x0B02 && uc <= 0x0B03)
02651           || (uc >= 0x0B05 && uc <= 0x0B0C)
02652           || (uc >= 0x0B0F && uc <= 0x0B10)
02653           || (uc >= 0x0B13 && uc <= 0x0B28)
02654           || (uc >= 0x0B2A && uc <= 0x0B30)
02655           || (uc >= 0x0B32 && uc <= 0x0B33)
02656           || (uc >= 0x0B36 && uc <= 0x0B39)
02657           || (uc >= 0x0B3D && uc <= 0x0B3E)
02658           || uc == 0x0B40
02659           || (uc >= 0x0B47 && uc <= 0x0B48)
02660           || (uc >= 0x0B4B && uc <= 0x0B4C)
02661           || uc == 0x0B57
02662           || (uc >= 0x0B5C && uc <= 0x0B5D)
02663           || (uc >= 0x0B5F && uc <= 0x0B61)
02664           || (uc >= 0x0B66 && uc <= 0x0B70)
02665           || uc == 0x0B83
02666           || (uc >= 0x0B85 && uc <= 0x0B8A)
02667           || (uc >= 0x0B8E && uc <= 0x0B90)
02668           || (uc >= 0x0B92 && uc <= 0x0B95)
02669           || (uc >= 0x0B99 && uc <= 0x0B9A)
02670           || uc == 0x0B9C
02671           || (uc >= 0x0B9E && uc <= 0x0B9F)
02672           || (uc >= 0x0BA3 && uc <= 0x0BA4)
02673           || (uc >= 0x0BA8 && uc <= 0x0BAA)
02674           || (uc >= 0x0BAE && uc <= 0x0BB5)
02675           || (uc >= 0x0BB7 && uc <= 0x0BB9)
02676           || (uc >= 0x0BBE && uc <= 0x0BBF)
02677           || (uc >= 0x0BC1 && uc <= 0x0BC2)
02678           || (uc >= 0x0BC6 && uc <= 0x0BC8)
02679           || (uc >= 0x0BCA && uc <= 0x0BCC)
02680           || uc == 0x0BD7
02681           || (uc >= 0x0BE7 && uc <= 0x0BF2)
02682           || (uc >= 0x0C01 && uc <= 0x0C03)
02683           || (uc >= 0x0C05 && uc <= 0x0C0C)
02684           || (uc >= 0x0C0E && uc <= 0x0C10)
02685           || (uc >= 0x0C12 && uc <= 0x0C28)
02686           || (uc >= 0x0C2A && uc <= 0x0C33)
02687           || (uc >= 0x0C35 && uc <= 0x0C39)
02688           || (uc >= 0x0C41 && uc <= 0x0C44)
02689           || (uc >= 0x0C60 && uc <= 0x0C61)
02690           || (uc >= 0x0C66 && uc <= 0x0C6F)
02691           || (uc >= 0x0C82 && uc <= 0x0C83)
02692           || (uc >= 0x0C85 && uc <= 0x0C8C)
02693           || (uc >= 0x0C8E && uc <= 0x0C90)
02694           || (uc >= 0x0C92 && uc <= 0x0CA8)
02695           || (uc >= 0x0CAA && uc <= 0x0CB3)
02696           || (uc >= 0x0CB5 && uc <= 0x0CB9)
02697           || uc == 0x0CBE
02698           || (uc >= 0x0CC0 && uc <= 0x0CC4)
02699           || (uc >= 0x0CC7 && uc <= 0x0CC8)
02700           || (uc >= 0x0CCA && uc <= 0x0CCB)
02701           || (uc >= 0x0CD5 && uc <= 0x0CD6)
02702           || uc == 0x0CDE
02703           || (uc >= 0x0CE0 && uc <= 0x0CE1)
02704           || (uc >= 0x0CE6 && uc <= 0x0CEF)
02705           || (uc >= 0x0D02 && uc <= 0x0D03)
02706           || (uc >= 0x0D05 && uc <= 0x0D0C)
02707           || (uc >= 0x0D0E && uc <= 0x0D10)
02708           || (uc >= 0x0D12 && uc <= 0x0D28)
02709           || (uc >= 0x0D2A && uc <= 0x0D39)
02710           || (uc >= 0x0D3E && uc <= 0x0D40)
02711           || (uc >= 0x0D46 && uc <= 0x0D48)
02712           || (uc >= 0x0D4A && uc <= 0x0D4C)
02713           || uc == 0x0D57
02714           || (uc >= 0x0D60 && uc <= 0x0D61)
02715           || (uc >= 0x0D66 && uc <= 0x0D6F)
02716           || (uc >= 0x0D82 && uc <= 0x0D83)
02717           || (uc >= 0x0D85 && uc <= 0x0D96)
02718           || (uc >= 0x0D9A && uc <= 0x0DB1)
02719           || (uc >= 0x0DB3 && uc <= 0x0DBB)
02720           || uc == 0x0DBD
02721           || (uc >= 0x0DC0 && uc <= 0x0DC6)
02722           || (uc >= 0x0DCF && uc <= 0x0DD1)
02723           || (uc >= 0x0DD8 && uc <= 0x0DDF)
02724           || (uc >= 0x0DF2 && uc <= 0x0DF4)
02725           || (uc >= 0x0E01 && uc <= 0x0E30)
02726           || (uc >= 0x0E32 && uc <= 0x0E33)
02727           || (uc >= 0x0E40 && uc <= 0x0E46)
02728           || (uc >= 0x0E4F && uc <= 0x0E5B)
02729           || (uc >= 0x0E81 && uc <= 0x0E82)
02730           || uc == 0x0E84
02731           || (uc >= 0x0E87 && uc <= 0x0E88)
02732           || uc == 0x0E8A
02733           || uc == 0x0E8D
02734           || (uc >= 0x0E94 && uc <= 0x0E97)
02735           || (uc >= 0x0E99 && uc <= 0x0E9F)
02736           || (uc >= 0x0EA1 && uc <= 0x0EA3)
02737           || uc == 0x0EA5
02738           || uc == 0x0EA7
02739           || (uc >= 0x0EAA && uc <= 0x0EAB)
02740           || (uc >= 0x0EAD && uc <= 0x0EB0)
02741           || (uc >= 0x0EB2 && uc <= 0x0EB3)
02742           || uc == 0x0EBD
02743           || (uc >= 0x0EC0 && uc <= 0x0EC4)
02744           || uc == 0x0EC6
02745           || (uc >= 0x0ED0 && uc <= 0x0ED9)
02746           || (uc >= 0x0EDC && uc <= 0x0EDD)
02747           || (uc >= 0x0F00 && uc <= 0x0F17)
02748           || (uc >= 0x0F1A && uc <= 0x0F34)
02749           || uc == 0x0F36
02750           || uc == 0x0F38
02751           || (uc >= 0x0F3E && uc <= 0x0F47)
02752           || (uc >= 0x0F49 && uc <= 0x0F6A)
02753           || uc == 0x0F7F
02754           || uc == 0x0F85
02755           || (uc >= 0x0F88 && uc <= 0x0F8B)
02756           || (uc >= 0x0FBE && uc <= 0x0FC5)
02757           || (uc >= 0x0FC7 && uc <= 0x0FCC)
02758           || uc == 0x0FCF
02759           || (uc >= 0x1000 && uc <= 0x1021)
02760           || (uc >= 0x1023 && uc <= 0x1027)
02761           || (uc >= 0x1029 && uc <= 0x102A)
02762           || uc == 0x102C
02763           || uc == 0x1031
02764           || uc == 0x1038
02765           || (uc >= 0x1040 && uc <= 0x1057)
02766           || (uc >= 0x10A0 && uc <= 0x10C5)
02767           || (uc >= 0x10D0 && uc <= 0x10F8)
02768           || uc == 0x10FB
02769           || (uc >= 0x1100 && uc <= 0x1159)
02770           || (uc >= 0x115F && uc <= 0x11A2)
02771           || (uc >= 0x11A8 && uc <= 0x11F9)
02772           || (uc >= 0x1200 && uc <= 0x1206)
02773           || (uc >= 0x1208 && uc <= 0x1246)
02774           || uc == 0x1248
02775           || (uc >= 0x124A && uc <= 0x124D)
02776           || (uc >= 0x1250 && uc <= 0x1256)
02777           || uc == 0x1258
02778           || (uc >= 0x125A && uc <= 0x125D)
02779           || (uc >= 0x1260 && uc <= 0x1286)
02780           || uc == 0x1288
02781           || (uc >= 0x128A && uc <= 0x128D)
02782           || (uc >= 0x1290 && uc <= 0x12AE)
02783           || uc == 0x12B0
02784           || (uc >= 0x12B2 && uc <= 0x12B5)
02785           || (uc >= 0x12B8 && uc <= 0x12BE)
02786           || uc == 0x12C0
02787           || (uc >= 0x12C2 && uc <= 0x12C5)
02788           || (uc >= 0x12C8 && uc <= 0x12CE)
02789           || (uc >= 0x12D0 && uc <= 0x12D6)
02790           || (uc >= 0x12D8 && uc <= 0x12EE)
02791           || (uc >= 0x12F0 && uc <= 0x130E)
02792           || uc == 0x1310
02793           || (uc >= 0x1312 && uc <= 0x1315)
02794           || (uc >= 0x1318 && uc <= 0x131E)
02795           || (uc >= 0x1320 && uc <= 0x1346)
02796           || (uc >= 0x1348 && uc <= 0x135A)
02797           || (uc >= 0x1361 && uc <= 0x137C)
02798           || (uc >= 0x13A0 && uc <= 0x13F4)
02799           || (uc >= 0x1401 && uc <= 0x1676)
02800           || (uc >= 0x1681 && uc <= 0x169A)
02801           || (uc >= 0x16A0 && uc <= 0x16F0)
02802           || (uc >= 0x1700 && uc <= 0x170C)
02803           || (uc >= 0x170E && uc <= 0x1711)
02804           || (uc >= 0x1720 && uc <= 0x1731)
02805           || (uc >= 0x1735 && uc <= 0x1736)
02806           || (uc >= 0x1740 && uc <= 0x1751)
02807           || (uc >= 0x1760 && uc <= 0x176C)
02808           || (uc >= 0x176E && uc <= 0x1770)
02809           || (uc >= 0x1780 && uc <= 0x17B6)
02810           || (uc >= 0x17BE && uc <= 0x17C5)
02811           || (uc >= 0x17C7 && uc <= 0x17C8)
02812           || (uc >= 0x17D4 && uc <= 0x17DA)
02813           || uc == 0x17DC
02814           || (uc >= 0x17E0 && uc <= 0x17E9)
02815           || (uc >= 0x1810 && uc <= 0x1819)
02816           || (uc >= 0x1820 && uc <= 0x1877)
02817           || (uc >= 0x1880 && uc <= 0x18A8)
02818           || (uc >= 0x1E00 && uc <= 0x1E9B)
02819           || (uc >= 0x1EA0 && uc <= 0x1EF9)
02820           || (uc >= 0x1F00 && uc <= 0x1F15)
02821           || (uc >= 0x1F18 && uc <= 0x1F1D)
02822           || (uc >= 0x1F20 && uc <= 0x1F45)
02823           || (uc >= 0x1F48 && uc <= 0x1F4D)
02824           || (uc >= 0x1F50 && uc <= 0x1F57)
02825           || uc == 0x1F59
02826           || uc == 0x1F5B
02827           || uc == 0x1F5D
02828           || (uc >= 0x1F5F && uc <= 0x1F7D)
02829           || (uc >= 0x1F80 && uc <= 0x1FB4)
02830           || (uc >= 0x1FB6 && uc <= 0x1FBC)
02831           || uc == 0x1FBE
02832           || (uc >= 0x1FC2 && uc <= 0x1FC4)
02833           || (uc >= 0x1FC6 && uc <= 0x1FCC)
02834           || (uc >= 0x1FD0 && uc <= 0x1FD3)
02835           || (uc >= 0x1FD6 && uc <= 0x1FDB)
02836           || (uc >= 0x1FE0 && uc <= 0x1FEC)
02837           || (uc >= 0x1FF2 && uc <= 0x1FF4)
02838           || (uc >= 0x1FF6 && uc <= 0x1FFC)
02839           || uc == 0x200E
02840           || uc == 0x2071
02841           || uc == 0x207F
02842           || uc == 0x2102
02843           || uc == 0x2107
02844           || (uc >= 0x210A && uc <= 0x2113)
02845           || uc == 0x2115
02846           || (uc >= 0x2119 && uc <= 0x211D)
02847           || uc == 0x2124
02848           || uc == 0x2126
02849           || uc == 0x2128
02850           || (uc >= 0x212A && uc <= 0x212D)
02851           || (uc >= 0x212F && uc <= 0x2131)
02852           || (uc >= 0x2133 && uc <= 0x2139)
02853           || (uc >= 0x213D && uc <= 0x213F)
02854           || (uc >= 0x2145 && uc <= 0x2149)
02855           || (uc >= 0x2160 && uc <= 0x2183)
02856           || (uc >= 0x2336 && uc <= 0x237A)
02857           || uc == 0x2395
02858           || (uc >= 0x249C && uc <= 0x24E9)
02859           || (uc >= 0x3005 && uc <= 0x3007)
02860           || (uc >= 0x3021 && uc <= 0x3029)
02861           || (uc >= 0x3031 && uc <= 0x3035)
02862           || (uc >= 0x3038 && uc <= 0x303C)
02863           || (uc >= 0x3041 && uc <= 0x3096)
02864           || (uc >= 0x309D && uc <= 0x309F)
02865           || (uc >= 0x30A1 && uc <= 0x30FA)
02866           || (uc >= 0x30FC && uc <= 0x30FF)
02867           || (uc >= 0x3105 && uc <= 0x312C)
02868           || (uc >= 0x3131 && uc <= 0x318E)
02869           || (uc >= 0x3190 && uc <= 0x31B7)
02870           || (uc >= 0x31F0 && uc <= 0x321C)
02871           || (uc >= 0x3220 && uc <= 0x3243)
02872           || (uc >= 0x3260 && uc <= 0x327B)
02873           || (uc >= 0x327F && uc <= 0x32B0)
02874           || (uc >= 0x32C0 && uc <= 0x32CB)
02875           || (uc >= 0x32D0 && uc <= 0x32FE)
02876           || (uc >= 0x3300 && uc <= 0x3376)
02877           || (uc >= 0x337B && uc <= 0x33DD)
02878           || (uc >= 0x33E0 && uc <= 0x33FE)
02879           || (uc >= 0x3400 && uc <= 0x4DB5)
02880           || (uc >= 0x4E00 && uc <= 0x9FA5)
02881           || (uc >= 0xA000 && uc <= 0xA48C)
02882           || (uc >= 0xAC00 && uc <= 0xD7A3)
02883           || (uc >= 0xD800 && uc <= 0xFA2D)
02884           || (uc >= 0xFA30 && uc <= 0xFA6A)
02885           || (uc >= 0xFB00 && uc <= 0xFB06)
02886           || (uc >= 0xFB13 && uc <= 0xFB17)
02887           || (uc >= 0xFF21 && uc <= 0xFF3A)
02888           || (uc >= 0xFF41 && uc <= 0xFF5A)
02889           || (uc >= 0xFF66 && uc <= 0xFFBE)
02890           || (uc >= 0xFFC2 && uc <= 0xFFC7)
02891           || (uc >= 0xFFCA && uc <= 0xFFCF)
02892           || (uc >= 0xFFD2 && uc <= 0xFFD7)
02893           || (uc >= 0xFFDA && uc <= 0xFFDC)
02894           /* ### Add NAMEPREP support for surrogates
02895           || (uc >= 0x10300 && uc <= 0x1031E)
02896           || (uc >= 0x10320 && uc <= 0x10323)
02897           || (uc >= 0x10330 && uc <= 0x1034A)
02898           || (uc >= 0x10400 && uc <= 0x10425)
02899           || (uc >= 0x10428 && uc <= 0x1044D)
02900           || (uc >= 0x1D000 && uc <= 0x1D0F5)
02901           || (uc >= 0x1D100 && uc <= 0x1D126)
02902           || (uc >= 0x1D12A && uc <= 0x1D166)
02903           || (uc >= 0x1D16A && uc <= 0x1D172)
02904           || (uc >= 0x1D183 && uc <= 0x1D184)
02905           || (uc >= 0x1D18C && uc <= 0x1D1A9)
02906           || (uc >= 0x1D1AE && uc <= 0x1D1DD)
02907           || (uc >= 0x1D400 && uc <= 0x1D454)
02908           || (uc >= 0x1D456 && uc <= 0x1D49C)
02909           || (uc >= 0x1D49E && uc <= 0x1D49F)
02910           || uc == 0x1D4A2
02911           || (uc >= 0x1D4A5 && uc <= 0x1D4A6)
02912           || (uc >= 0x1D4A9 && uc <= 0x1D4AC)
02913           || (uc >= 0x1D4AE && uc <= 0x1D4B9)
02914           || uc == 0x1D4BB
02915           || (uc >= 0x1D4BD && uc <= 0x1D4C0)
02916           || (uc >= 0x1D4C2 && uc <= 0x1D4C3)
02917           || (uc >= 0x1D4C5 && uc <= 0x1D505)
02918           || (uc >= 0x1D507 && uc <= 0x1D50A)
02919           || (uc >= 0x1D50D && uc <= 0x1D514)
02920           || (uc >= 0x1D516 && uc <= 0x1D51C)
02921           || (uc >= 0x1D51E && uc <= 0x1D539)
02922           || (uc >= 0x1D53B && uc <= 0x1D53E)
02923           || (uc >= 0x1D540 && uc <= 0x1D544)
02924           || uc == 0x1D546
02925           || (uc >= 0x1D54A && uc <= 0x1D550)
02926           || (uc >= 0x1D552 && uc <= 0x1D6A3)
02927           || (uc >= 0x1D6A8 && uc <= 0x1D7C9)
02928           || (uc >= 0x20000 && uc <= 0x2A6D6)
02929           || (uc >= 0x2F800 && uc <= 0x2FA1D)
02930           || (uc >= 0xF0000 && uc <= 0xFFFFD)
02931           || (uc >= 0x100000 && uc <= 0x10FFFD)*/;
02932 }

Here is the call graph for this function:

static bool isBidirectionalRorAL ( const QChar c  )  [static]

Definition at line 2529 of file qurl.cpp.

References c.

Referenced by qt_nameprep().

02530 {
02531     ushort uc = c.unicode();
02532     return uc == 0x05BE
02533         || uc == 0x05C0
02534         || uc == 0x05C3
02535         || (uc >= 0x05D0 && uc <= 0x05EA)
02536         || (uc >= 0x05F0 && uc <= 0x05F4)
02537         || uc == 0x061B
02538         || uc == 0x061F
02539         || (uc >= 0x0621 && uc <= 0x063A)
02540         || (uc >= 0x0640 && uc <= 0x064A)
02541         || (uc >= 0x066D && uc <= 0x066F)
02542         || (uc >= 0x0671 && uc <= 0x06D5)
02543         || uc == 0x06DD
02544         || (uc >= 0x06E5 && uc <= 0x06E6)
02545         || (uc >= 0x06FA && uc <= 0x06FE)
02546         || (uc >= 0x0700 && uc <= 0x070D)
02547         || uc == 0x0710
02548         || (uc >= 0x0712 && uc <= 0x072C)
02549         || (uc >= 0x0780 && uc <= 0x07A5)
02550         || uc == 0x07B1
02551         || uc == 0x200F
02552         || uc == 0xFB1D
02553         || (uc >= 0xFB1F && uc <= 0xFB28)
02554         || (uc >= 0xFB2A && uc <= 0xFB36)
02555         || (uc >= 0xFB38 && uc <= 0xFB3C)
02556         || uc == 0xFB3E
02557         || (uc >= 0xFB40 && uc <= 0xFB41)
02558         || (uc >= 0xFB43 && uc <= 0xFB44)
02559         || (uc >= 0xFB46 && uc <= 0xFBB1)
02560         || (uc >= 0xFBD3 && uc <= 0xFD3D)
02561         || (uc >= 0xFD50 && uc <= 0xFD8F)
02562         || (uc >= 0xFD92 && uc <= 0xFDC7)
02563         || (uc >= 0xFDF0 && uc <= 0xFDFC)
02564         || (uc >= 0xFE70 && uc <= 0xFE74)
02565         || (uc >= 0xFE76 && uc <= 0xFEFC);
02566 }

static bool isHex ( char  c  )  [inline, static]

Definition at line 3751 of file qurl.cpp.

Referenced by QUrl::setEncodedUrl().

03752 {
03753     c |= 0x20;
03754     return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f');
03755 }

static bool isMappedToNothing ( const QChar ch  )  [static]

Definition at line 1053 of file qurl.cpp.

References QChar::unicode().

Referenced by qt_nameprep().

01054 {
01055     switch (ch.unicode()) {
01056     case 0x00AD: case 0x034F: case 0x1806: case 0x180B: case 0x180C: case 0x180D:
01057     case 0x200B: case 0x200C: case 0x200D: case 0x2060: case 0xFE00: case 0xFE01:
01058     case 0xFE02: case 0xFE03: case 0xFE04: case 0xFE05: case 0xFE06: case 0xFE07:
01059     case 0xFE08: case 0xFE09: case 0xFE0A: case 0xFE0B: case 0xFE0C: case 0xFE0D:
01060     case 0xFE0E: case 0xFE0F: case 0xFEFF:
01061         return true;
01062     default:
01063         return false;
01064     }
01065 }

Here is the call graph for this function:

static QString mappedToLowerCase ( const QString str  )  [static]

Definition at line 2451 of file qurl.cpp.

References QString::at(), i, j, N, NameprepCaseFolding, qBinaryFind(), QString::size(), and QChar::unicode().

Referenced by qt_nameprep().

02452 {
02453     int N = sizeof(NameprepCaseFolding) / sizeof(NameprepCaseFolding[0]);
02454 
02455     QString tmp;
02456     for (int i = 0; i < str.size(); ++i) {
02457         const NameprepCaseFoldingEntry *entry = qBinaryFind(NameprepCaseFolding,
02458                                                             NameprepCaseFolding + N,
02459                                                             str.at(i).unicode());
02460         if ((entry - NameprepCaseFolding) != N) {
02461             for (int j = 1; j < 5 && entry->mapping[j]; ++j)
02462                 tmp += QChar(entry->mapping[j]);
02463         } else {
02464             tmp += str.at(i);
02465         }
02466     }
02467     return tmp;
02468 }

Here is the call graph for this function:

static bool operator< ( const NameprepCaseFoldingEntry one,
int  other 
) [inline, static]

Definition at line 1074 of file qurl.cpp.

References NameprepCaseFoldingEntry::mapping.

01075 { return one.mapping[0] < other; }

static bool operator< ( int  one,
const NameprepCaseFoldingEntry other 
) [inline, static]

Definition at line 1071 of file qurl.cpp.

References NameprepCaseFoldingEntry::mapping.

01072 { return one < other.mapping[0]; }

QDebug operator<< ( QDebug  d,
const QUrl url 
)

Definition at line 5398 of file qurl.cpp.

05399 {
05400     d.maybeSpace() << "QUrl(" << url.toString() << ")";
05401     return d.space();
05402 }

bool q_strchr ( const char  str[],
char  chr 
) [inline]

Definition at line 4670 of file qurl.cpp.

Referenced by QUrl::toPercentEncoding().

04671 {
04672     if (!str) return false;
04673 
04674     const char *ptr = str;
04675     char c;
04676     while ((c = *ptr++))
04677         if (c == chr)
04678             return true;
04679     return false;
04680 }

Q_CORE_EXPORT int qsnprintf ( char *  str,
size_t  n,
const char *  fmt,
  ... 
) [related]

Referenced by QDomElement::setAttribute(), and QUrl::setEncodedUrl().

static QString qt_from_ACE ( const QString domain  )  [static]

Definition at line 3012 of file qurl.cpp.

References QList< T >::at(), QUrl::fromPunycode(), i, QList< T >::isEmpty(), QStringList::join(), qt_is_idn_enabled(), qt_nameprep(), QList< T >::size(), QString::SkipEmptyParts, and QString::split().

Referenced by QUrl::fromAce(), and QUrlPrivate::parse().

03013 {
03014     QStringList labels = domain.split(QLatin1Char('.'), QString::SkipEmptyParts);
03015     if (!labels.isEmpty() && qt_is_idn_enabled(labels)) {
03016         for (int i = 0; i < labels.size(); ++i) {
03017             // Nameprep the host. If the labels in the hostname are Punycode
03018             // encoded, we decode them immediately, then nameprep them.
03019             QString label = labels.at(i);
03020             if (label.startsWith(QLatin1String("xn--")))
03021                 labels[i] = qt_nameprep(QUrl::fromPunycode(label.toLatin1()));
03022             else
03023                 labels[i] = qt_nameprep(label);
03024         }
03025         return labels.join(QLatin1String("."));
03026     } else {
03027         return qt_nameprep(domain);
03028     }    
03029 }

Here is the call graph for this function:

static bool qt_is_idn_enabled ( const QStringList labels  )  [static]

Definition at line 3005 of file qurl.cpp.

Referenced by qt_from_ACE().

03006 {
03007     const QString &tld = labels.last();
03008 
03009     return idnWhitelist()->contains(tld);
03010 }

QString Q_AUTOTEST_EXPORT qt_nameprep ( const QString source  ) 

Definition at line 2934 of file qurl.cpp.

References QString::at(), QString::clear(), i, isBidirectionalL(), isBidirectionalRorAL(), QString::isEmpty(), isMappedToNothing(), j, mappedToLowerCase(), QString::NormalizationForm_KC, QUnicodeTables::normalize(), QString::size(), strippedOfProhibitedOutput(), and QChar::Unicode_3_2.

Referenced by qt_from_ACE(), QUrl::setHost(), and QUrl::toAce().

02935 {
02936     // Characters commonly mapped to nothing are simply removed
02937     // (Table B.1)
02938     QString mapped;
02939     for (int i = 0; i < source.size(); ++i) {
02940         if (!isMappedToNothing(source.at(i)))
02941             mapped += source.at(i);
02942     }
02943 
02944     // Map to lowercase (Table B.2)
02945     mapped = mappedToLowerCase(mapped);
02946 
02947     // Normalize to Unicode 3.2 form KC
02948     mapped = QUnicodeTables::normalize(mapped,
02949                                        QString::NormalizationForm_KC,
02950                                        QChar::Unicode_3_2);
02951 
02952     // Strip prohibited output
02953     mapped = strippedOfProhibitedOutput(mapped);
02954 
02955     // Check for valid bidirectional characters
02956     bool containsLCat = false;
02957     bool containsRandALCat = false;
02958     for (int j = 0; j < mapped.size() && (!containsLCat || !containsRandALCat); ++j) {
02959         if (isBidirectionalRorAL(mapped.at(j)))
02960             containsRandALCat = true;
02961         if (isBidirectionalL(mapped.at(j)))
02962             containsLCat = true;
02963     }
02964     if (!mapped.isEmpty() && containsRandALCat) {
02965         if (containsLCat) {
02966             mapped.clear();
02967         } else {
02968             if (!isBidirectionalRorAL(mapped.at(0))
02969                 || !isBidirectionalRorAL(mapped.at(mapped.size() - 1))) {
02970                 mapped.clear();
02971             }
02972         }
02973     }
02974 
02975     return mapped;
02976 }

Here is the call graph for this function:

static QString strippedOfProhibitedOutput ( const QString source  )  [static]

Definition at line 2470 of file qurl.cpp.

References QString::at(), i, QString::size(), and QChar::unicode().

Referenced by qt_nameprep().

02471 {
02472     QString tmp;
02473     for (int i = 0; i < source.size(); ++i) {
02474         ushort uc = source.at(i).unicode();
02475         if (!((uc >= 0x0080 && uc <= 0x009F)
02476             || uc == 0x00A0
02477             || uc == 0x0340
02478             || uc == 0x0341
02479             || uc == 0x06DD
02480             || uc == 0x070F
02481             || uc == 0x1680
02482             || uc == 0x180E
02483             || (uc >= 0x2000 && uc <= 0x200B)
02484             || uc == 0x200C
02485             || uc == 0x200D
02486             || uc == 0x200E
02487             || uc == 0x200F
02488             || (uc >= 0x2028 && uc <= 0x202F)
02489             || uc == 0x205F
02490             || (uc >= 0x2060 && uc <= 0x2063)
02491             || uc == 0x206A
02492             || (uc >= 0x206A && uc <= 0x206F)
02493             || (uc >= 0x2FF0 && uc <= 0x2FFB)
02494             || uc == 0x3000
02495             || (uc >= 0xD800 && uc <= 0xDFFF)
02496             || (uc >= 0xE000 && uc <= 0xF8FF)
02497             || (uc >= 0xFDD0 && uc <= 0xFDEF)
02498             || uc == 0xFEFF
02499             || (uc >= 0xFFF9 && uc <= 0xFFFC)
02500             || (uc >= 0xFFFA && (uc <= 0xFFFE || uc == 0xFFFF))
02501               /* ### Add NAMEPREP support for surrogates
02502             || uc == 0xE0001
02503             || (uc >= 0x2FFFE && uc <= 0x2FFFF)
02504             || (uc >= 0x1D173 && uc <= 0x1D17A)
02505             || (uc >= 0x1FFFE && uc <= 0x1FFFF)
02506             || (uc >= 0x3FFFE && uc <= 0x3FFFF)
02507             || (uc >= 0x4FFFE && uc <= 0x4FFFF)
02508             || (uc >= 0x5FFFE && uc <= 0x5FFFF)
02509             || (uc >= 0x6FFFE && uc <= 0x6FFFF)
02510             || (uc >= 0x7FFFE && uc <= 0x7FFFF)
02511             || (uc >= 0x8FFFE && uc <= 0x8FFFF)
02512             || (uc >= 0x9FFFE && uc <= 0x9FFFF)
02513             || (uc >= 0xAFFFE && uc <= 0xAFFFF)
02514             || (uc >= 0xBFFFE && uc <= 0xBFFFF)
02515             || (uc >= 0xCFFFE && uc <= 0xCFFFF)
02516             || (uc >= 0xDFFFE && uc <= 0xDFFFF)
02517             || (uc >= 0xE0020 && uc <= 0xE007F)
02518             || (uc >= 0xEFFFE && uc <= 0xEFFFF)
02519             || (uc >= 0xF0000 && uc <= 0xFFFFD)
02520             || (uc >= 0xFFFFE && uc <= 0xFFFFF)
02521             || (uc >= 0x100000 && uc <= 0x10FFFD)
02522             || (uc >= 0x10FFFE && uc <= 0x10FFFF)*/)) {
02523             tmp += source.at(i);
02524         }
02525     }
02526     return tmp;
02527 }

Here is the call graph for this function:

static char toHex ( char  c  )  [inline, static]

Definition at line 4683 of file qurl.cpp.

Referenced by QPdfBaseEnginePrivate::drawTextItem(), and QUrl::toPercentEncoding().

04684 {
04685     return hexnumbers[c & 0xf];
04686 }


Variable Documentation

const uint base = 36 [static]

Definition at line 169 of file qurl.cpp.

Referenced by adapt(), QPdf::ascii85Encode(), QIsciiCodec::convertFromUnicode(), convertPath(), QIsciiCodec::convertToUnicode(), QGLWidget::fontDisplayListBase(), QUrl::fromPunycode(), QTextStreamPrivate::getNumber(), hebrew_shape(), indic_shape_syllable(), myanmar_shape_syllable(), Spacer::paintEvent(), Q3TextEdit::paper(), QTextHtmlParser::parseEntity(), Q3TextDocument::parseHTMLSpecialChar(), qDBusGenerateMetaObjectXml(), qt_set_x11_resources(), QStyleSheetStyle::setBaseStyle(), QCleanlooksStyle::standardPalette(), TsHandler::startElement(), QFontEngineXLFD::stringToCMap(), QUrl::toPunycode(), Driver::unique(), Q3TextFormatCollection::updateDefaultFormat(), Spacer::updateMask(), and QString::vsprintf().

const uint damp = 700 [static]

Definition at line 173 of file qurl.cpp.

Referenced by adapt().

const char hexnumbers[] = "0123456789ABCDEF" [static]

Definition at line 4682 of file qurl.cpp.

const uint initial_bias = 72 [static]

Definition at line 174 of file qurl.cpp.

Referenced by QUrl::fromPunycode(), and QUrl::toPunycode().

const uint initial_n = 128 [static]

Definition at line 175 of file qurl.cpp.

Referenced by QUrl::fromPunycode(), and QUrl::toPunycode().

const NameprepCaseFoldingEntry NameprepCaseFolding[] [static]

Definition at line 1077 of file qurl.cpp.

Referenced by mappedToLowerCase().

const uint skew = 38 [static]

Definition at line 172 of file qurl.cpp.

Referenced by adapt().

const uint tmax = 26 [static]

Definition at line 171 of file qurl.cpp.

Referenced by adapt(), QUrl::fromPunycode(), and QUrl::toPunycode().

const uint tmin = 1 [static]

Definition at line 170 of file qurl.cpp.

Referenced by adapt(), QUrl::fromPunycode(), and QUrl::toPunycode().


Generated on Thu Mar 15 12:37:49 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1