Fix QUrl::topLevelDomain(QUrl::FullyDecoded)
qt_ACE_do(".co.uk") was returning an empty string because of the
leading dot. This has always caused issues in KDE code too, where ACE
normalization needs the dot removed, and re-added afterwards.
Change-Id: Id9fcea0333cf55c14d755a86d4bf33a50f194429
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
bb10
parent
539f90e971
commit
170469ef84
|
|
@ -2479,7 +2479,8 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
|
|||
if (labelLength == 0) {
|
||||
if (idx == domain.length())
|
||||
break;
|
||||
return QString(); // two delimiters in a row -- empty label not allowed
|
||||
if (idx > 0)
|
||||
return QString(); // two delimiters in a row -- empty label not allowed
|
||||
}
|
||||
|
||||
// RFC 3490 says, about the ToASCII operation:
|
||||
|
|
|
|||
|
|
@ -2863,7 +2863,8 @@ void tst_QUrl::effectiveTLDs()
|
|||
{
|
||||
QFETCH(QUrl, domain);
|
||||
QFETCH(QString, TLD);
|
||||
QCOMPARE(domain.topLevelDomain(), TLD);
|
||||
QCOMPARE(domain.topLevelDomain(QUrl::PrettyDecoded), TLD);
|
||||
QCOMPARE(domain.topLevelDomain(QUrl::FullyDecoded), TLD);
|
||||
}
|
||||
|
||||
void tst_QUrl::lowercasesScheme()
|
||||
|
|
|
|||
Loading…
Reference in New Issue