summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-09-29 14:02:04 +0200
committerKai Koehne <kai.koehne@qt.io>2022-10-01 06:24:51 +0000
commitc9e19cf9d318efc7c736c3adfac91f9161beaa42 (patch)
tree11fd33e556f8b28be1ae462e9a7a95736e971d2f
parent44ac742f730a5e8cac229067429eb2f5cb90105a (diff)
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>
-rw-r--r--src/3rdparty/libpsl/PSL-LICENSE.txt (renamed from src/network/kernel/PSL-LICENSE.txt)0
-rw-r--r--src/3rdparty/libpsl/README.txt (renamed from src/network/kernel/qurltlds_p.h.INFO)8
-rw-r--r--src/3rdparty/libpsl/psl_data.cpp (renamed from src/network/kernel/qurltlds_p.h)0
-rw-r--r--src/3rdparty/libpsl/qt_attribution.json30
-rw-r--r--src/network/CMakeLists.txt3
-rw-r--r--src/network/kernel/qt_attribution.json28
-rw-r--r--src/network/kernel/qtldurl.cpp2
-rw-r--r--sync.profile3
8 files changed, 38 insertions, 36 deletions
diff --git a/src/network/kernel/PSL-LICENSE.txt b/src/3rdparty/libpsl/PSL-LICENSE.txt
index d0a1fa1482..d0a1fa1482 100644
--- a/src/network/kernel/PSL-LICENSE.txt
+++ b/src/3rdparty/libpsl/PSL-LICENSE.txt
diff --git a/src/network/kernel/qurltlds_p.h.INFO b/src/3rdparty/libpsl/README.txt
index d6162a2a0d..5bbd0f57eb 100644
--- a/src/network/kernel/qurltlds_p.h.INFO
+++ b/src/3rdparty/libpsl/README.txt
@@ -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>.
diff --git a/src/network/kernel/qurltlds_p.h b/src/3rdparty/libpsl/psl_data.cpp
index 0639247e19..0639247e19 100644
--- a/src/network/kernel/qurltlds_p.h
+++ b/src/3rdparty/libpsl/psl_data.cpp
diff --git a/src/3rdparty/libpsl/qt_attribution.json b/src/3rdparty/libpsl/qt_attribution.json
index f2eddec00d..ba54c8107a 100644
--- a/src/3rdparty/libpsl/qt_attribution.json
+++ b/src/3rdparty/libpsl/qt_attribution.json
@@ -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."
}
+]
diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt
index 8920afa01e..48f0e737f0 100644
--- a/src/network/CMakeLists.txt
+++ b/src/network/CMakeLists.txt
@@ -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
diff --git a/src/network/kernel/qt_attribution.json b/src/network/kernel/qt_attribution.json
deleted file mode 100644
index 90151bb085..0000000000
--- a/src/network/kernel/qt_attribution.json
+++ /dev/null
@@ -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)."
-}
diff --git a/src/network/kernel/qtldurl.cpp b/src/network/kernel/qtldurl.cpp
index 06a7df50ba..7bda9845b9 100644
--- a/src/network/kernel/qtldurl.cpp
+++ b/src/network/kernel/qtldurl.cpp
@@ -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
diff --git a/sync.profile b/sync.profile
index 85fd18147c..119ab07246 100644
--- a/sync.profile
+++ b/sync.profile
@@ -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 = (