Move qurltlds_p.h out of src/network, and make it a .cpp file

The file was originally introduced as a header because the data was also
used by Qt WebKit. This is not needed anymore. Moving it into src/3rdparty
is also more in line with QUIP 4.

[ChangeLog][Third-Party Code] The Public Suffix List (PSL) data file got
moved from src/network/kernel/qurltlds_p.h to
src/3rdparty/libpsl/psl_data.cpp.

Change-Id: I3283cbbd72575032d8c7ebd333e81048d948c052
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Kai Köhne 2022-09-29 14:02:04 +02:00 committed by Kai Koehne
parent 44ac742f73
commit c9e19cf9d3
8 changed files with 38 additions and 36 deletions

View File

@ -1,14 +1,14 @@
The file qurltlds_p.h is generated from the Public Suffix
The file psl_data.cpp is generated from the Public Suffix
List (see [1] and [2]), by the program residing at
qtbase/src/3rdparty/libpsl/src/psl-make-dafsa in the Qt source tree.
src/psl-make-dafsa.
To regenerate the file, run the following command from qtbase tree:
src/3rdparty/libpsl/src/psl-make-dafsa public_suffix_list.dat src/network/kernel/qurltlds_p.h
src/3rdparty/libpsl/src/psl-make-dafsa public_suffix_list.dat src/3rdparty/libpsl/psl_data.cpp
src/3rdparty/libpsl/src/psl-make-dafsa --output-format=binary public_suffix_list.dat \
tests/auto/network/access/qnetworkcookiejar/testdata/publicsuffix/public_suffix_list.dafsa
Those arrays in qurltlds_p.h are derived from the Public
Those arrays in psl_data.cpp are derived from the Public
Suffix List ([2]), which was originally provided by
Jo Hermans <jo.hermans@gmail.com>.

View File

@ -1,3 +1,32 @@
[
{
"Id": "psl-data",
"Name": "The Public Suffix List",
"QDocModule": "qtnetwork",
"Description": "The Public Suffix List is an initiative of Mozilla,
but is maintained as a community resource. It is available for use in any software,
but was originally created to meet the needs of browser manufacturers.
It allows browsers to, for example:
- Avoid privacy-damaging \"supercookies\" being set for high-level domain name suffixes
- Highlight the most important part of a domain name in the user interface
- Accurately sort history entries by site",
"Files": "psl_data.cpp",
"QtUsage": "Used in Qt Network to avoid setting \"supercookies\" in the cookie jar
supported by Qt (by the QNetworkCookieJar class).",
"Homepage": "Consult https://github.com/publicsuffix/list for the sha1 but download from ...",
"Homepage": "http://publicsuffix.org/",
"Version": "d17a65633b0286833727ef21e897a22564695ef5, fetched on 2022-05-23",
"License": "Mozilla Public License 2.0",
"LicenseFile": "PSL-LICENSE.txt",
"LicenseId": "MPL-2.0",
"Copyright": "The list was originally provided by Jo Hermans <jo.hermans@gmail.com>.
It is now maintained on github (https://github.com/publicsuffix/list)."
},
{
"Id": "libpsl",
"Name": "libpsl - C library to handle the Public Suffix List",
@ -13,3 +42,4 @@ to lookup entries in it.",
"LicenseId": "BSD-3-Clause",
"Copyright": "Copyright 2014-2016 The Chromium Authors. All rights reserved."
}
]

View File

@ -163,8 +163,9 @@ qt_internal_extend_target(Network CONDITION NOT QT_FEATURE_system_zlib AND NOT n
qt_internal_extend_target(Network CONDITION QT_FEATURE_topleveldomain
SOURCES
kernel/qtldurl.cpp kernel/qtldurl_p.h
kernel/qurltlds_p.h
../3rdparty/libpsl/src/lookup_string_in_fixed_set.c
INCLUDE_DIRECTORIES
../3rdparty/libpsl
)
qt_internal_extend_target(Network CONDITION QT_FEATURE_dnslookup

View File

@ -1,28 +0,0 @@
{
"Id": "psl",
"Name": "The Public Suffix List",
"QDocModule": "qtnetwork",
"Description": "The Public Suffix List is an initiative of Mozilla,
but is maintained as a community resource. It is available for use in any software,
but was originally created to meet the needs of browser manufacturers.
It allows browsers to, for example:
- Avoid privacy-damaging \"supercookies\" being set for high-level domain name suffixes
- Highlight the most important part of a domain name in the user interface
- Accurately sort history entries by site",
"Files": "qurltlds_p.h",
"QtUsage": "Used in Qt Network to avoid setting \"supercookies\" in the cookie jar
supported by Qt (by the QNetworkCookieJar class).",
"Homepage": "Consult https://github.com/publicsuffix/list for the sha1 but download from ...",
"Homepage": "http://publicsuffix.org/",
"Version": "d17a65633b0286833727ef21e897a22564695ef5, fetched on 2022-05-23",
"License": "Mozilla Public License 2.0",
"LicenseFile": "PSL-LICENSE.txt",
"LicenseId": "MPL-2.0",
"Copyright": "The list was originally provided by Jo Hermans <jo.hermans@gmail.com>.
It is now maintained on github (https://github.com/publicsuffix/list)."
}

View File

@ -19,7 +19,7 @@
#endif
#if QT_CONFIG(publicsuffix_qt)
# include "qurltlds_p.h"
# include "psl_data.cpp"
#endif
// Defined in src/3rdparty/libpsl/src/lookup_string_in_fixed_set.c

View File

@ -75,8 +75,7 @@
@qpa_headers = ( qr/^qplatform/, qr/^qwindowsystem/ );
my @internal_zlib_headers = ( "crc32.h", "deflate.h", "gzguts.h", "inffast.h", "inffixed.h", "inflate.h", "inftrees.h", "trees.h", "zutil.h" );
my @zlib_headers = ( "zconf.h", "zlib.h" );
my @internal_qtnetwork_headers = ( "qurltlds_p.h" );
@ignore_headers = ( @internal_zlib_headers, @internal_qtnetwork_headers );
@ignore_headers = ( @internal_zlib_headers );
@ignore_for_include_check = ( "qsystemdetection.h", "qcompilerdetection.h", "qprocessordetection.h", @zlib_headers);
@ignore_for_qt_begin_namespace_check = ( "qt_windows.h", @zlib_headers);
%inject_headers = (