tst_qnetworkcookiejar: fix build for without topleveldomain

The test fails in a few cases due to the simplistic internal
implementation of TLD-checking, but it's still useful to run the tests.

Change-Id: Idafaed13506fbac2e67b1d2ba72da2f0c4e2904c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Mårten Nordheim 2018-08-21 12:43:10 +02:00
parent d9e2bd5388
commit 01a359b53c
1 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,9 @@
#include <QtNetwork/QNetworkCookieJar>
#include <QtNetwork/QNetworkCookie>
#include <QtNetwork/QNetworkRequest>
#if QT_CONFIG(topleveldomain)
#include "private/qtldurl_p.h"
#endif
class tst_QNetworkCookieJar: public QObject
{
@ -47,7 +49,7 @@ private slots:
void setCookiesFromUrl();
void cookiesForUrl_data();
void cookiesForUrl();
#ifdef QT_BUILD_INTERNAL
#if defined(QT_BUILD_INTERNAL) && QT_CONFIG(topleveldomain)
void effectiveTLDs_data();
void effectiveTLDs();
#endif
@ -398,7 +400,7 @@ void tst_QNetworkCookieJar::cookiesForUrl()
}
// This test requires private API.
#ifdef QT_BUILD_INTERNAL
#if defined(QT_BUILD_INTERNAL) && QT_CONFIG(topleveldomain)
void tst_QNetworkCookieJar::effectiveTLDs_data()
{
QTest::addColumn<QString>("domain");