summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Remove more unused qreadwritelock.h includesMarc Mutz2022-05-171-1/+0
| | | | | | Pick-to: 6.3 6.2 Change-Id: I4962c1abcc58d36500a56ccca680f6f36c3b5d89 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1646-1755/+99
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtNetwork: includemocsMarc Mutz2022-04-282-0/+4
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: Ie027419956d98c971429f2b4c7ae6f8f56c094f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtNetwork: replace remaining uses of QLatin1String by QLatin1StringViewSona Kurazyan2022-04-213-4/+4
| | | | | | | Task-number: QTBUG-98434 Change-Id: I0bb9d534ee42ccbf7d353e251ef58901a86923b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-219-35/+50
| | | | | | Task-number: QTBUG-98434 Change-Id: Ic235b92377203f7a1429ae7fd784c4a1fa893e9f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-216-19/+19
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I121f87214b77aeab1dfd3e62dc5adaa6255cc0e0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Replace uses of _qs with _s in sources and examplesSona Kurazyan2022-04-191-1/+3
| | | | | | Task-number: QTBUG-101408 Change-Id: I48360ba3b23965cd3d90ac243c100a0656a4cde8 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtNetwork: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [2/2]: ↵Marc Mutz2022-04-062-1/+3
| | | | | | | | | | | | | | | private API It's one of our best tools to improve compile times. Can't backport to Qt 6.2 because the macros don't exist there. Pick-to: 6.3 Task-number: QTBUG-102206 Change-Id: Ic8f3870d8eec6211c4be506dc67717cc4e0ff7d6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtNetwork: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [1/2]: ↵Marc Mutz2022-04-058-5/+14
| | | | | | | | | | | | | | public API It's one of our best tools to improve compile times. Can't backport to Qt 6.3 or 6.2 because this change introduces new exported symbols. Task-number: QTBUG-102206 Change-Id: I6bfa532be34ca847d3b9034d16c94efed3d602c3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Doc: QNetworkProxyFactory: Mention libproxy in systemProxyForQueryHu Jialun2022-04-011-0/+5
| | | | | | | | | | | | | | Documentation of QNetworkProxyFactory::systemProxyForQuery does not include the libproxy integration, and may be misleading by hinting that desktop environment integrations on other systems are unsupported. Add this piece of information to the documentation to avoid misunderstanding. Pick-to: 6.3 6.2 Change-Id: Id3f14d4a617c25576cb1bd57a494ea77c882635d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QNetworkInformation: Deprecate vague load functionsMårten Nordheim2022-03-312-5/+31
| | | | | | | And replace them with more descriptive versions Change-Id: I3d5256072a5bbe0919a08b800877aa9b6a305a0b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Short live Q_CONSTINIT!Marc Mutz2022-03-262-2/+2
| | | | | | | | | | | | | | | | | | It expands to the first available of - constinit (C++20) - [[clang::require_constant_initialization]] (Clang) - __constinit (GCC >= 10) Use it around the code (on and near static QBasicAtomic; this patch makes no attempt to find all statics in qtbase). [ChangeLog][QtCore][QtGlobal] Added macro Q_CONSTINIT. Fixes: QTBUG-100484 Change-Id: I11e0363a7acb3464476859d12ec7f94319d82be7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add missing includes for some of our _win.cpp filesMårten Nordheim2022-03-181-0/+2
| | | | | Change-Id: I74067f5d50bea6fbc16576c26bf84f91e449e497 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtNetwork: compile-optimize inline swap functionsMarc Mutz2022-03-175-11/+11
| | | | | | | | | | | | | | | | | | Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers - std::swap() for swapping scalars In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Pick-to: 6.3 6.2 Task-number: QTBUG-97601 Change-Id: I26586da1f158fe6b18314abd8cf9bb040bc9cad1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QHostInfo/Unix: Fix resolv never unloadingMårten Nordheim2022-03-091-1/+0
| | | | | | | | Due to some unfortunate shadowing Pick-to: 6.3 6.2 5.15 Change-Id: Ib2660516f9ba9974c84a043bd2677b7890fc76f9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QPublicSuffixDatabase: don't go thru QString for debug outputMarc Mutz2022-03-071-1/+1
| | | | | | | | | | | | | The data is guaranteed to be in US-ASCII (result of toHex()), so there's no need to jump through ASCII → UTF-16 → UTF-8 hoops. Found by Clang and QT_ASCII_CAST_WARN. Amends 16b614f2e1ae4ed145f57b256fb27c04ee07e506. Change-Id: Ib6789af9fb90952ecbe805e182b0639e1d0704b1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Network: Use system publicsuffix database copy when availableIevgenii Meshcheriakov2022-03-032-6/+155
| | | | | | | | | | | | | [ChangeLog][Network][QNetworkCookieJar] It is possible to use system's copy of publicsuffix database when it is available. This behavior is enabled by default on Linux and can be controlled using new command line switches -system-publicsuffix, -qt-publicsuffix, -no-publicsuffix, and -publicsuffix=all. Fixes: QTBUG-95889 Change-Id: I911e1a13c1422cdc35851953309fff064e7c5f26 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix compiler warnings about unused parametersPasi Petäjäjärvi2022-02-251-0/+2
| | | | | | | | | When FEATUREs getiffaddrs and ipv6ifname are not enabled variables are unused. Pick-to: 5.15 6.2 6.3 Change-Id: I0fde7ef3a4ee1e89927e2c5550ac24fba76ba155 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Network: Use public suffix database in DAFSA formatIevgenii Meshcheriakov2022-02-244-14912/+4434
| | | | | | | | | | | | | | | | | This saves 91kiB of text size and makes it easier to use a locally installed database when available. [ChangeLog][Third-Party Code] Moved attribution of The Public Suffix List from Qt Core to Qt Network. [ChangeLog][Third-Party Code] Added attribution of new libpsl library to Qt Network. libpsl is available under the BSD 3-Clause "New" or "Revised" License. Task-number: QTBUG-95889 Change-Id: Ibd37c7a94fdf235e75d96fec20d427fb5c2bd2a4 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNX: Fix support for abstract Unix-domain socketPasi Petäjäjärvi2022-02-241-1/+1
| | | | | | | | | | | | As QNX claims to support abstract Unix-domain sockets, its getsockname always returns for socket that has not been bound to local name address_len of sun_path as maximum length (106) even when it does not contain valid address. https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.lib_ref/topic/u/unix_proto.html Pick-to: 6.2 6.3 Change-Id: I0f0f5c05611c8db6af35377dde16450f58c83c56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update public suffix listIevgenii Meshcheriakov2022-02-182-14451/+14277
| | | | | | | Fixes: QTBUG-100990 Pick-to: 5.15 6.2 6.3 Change-Id: Icfcc7882be35b85bfd8828c6950e2cf23f7ede65 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetConMonitor/Win: Drop all warnings down to debugMårten Nordheim2022-02-091-19/+19
| | | | | | | | | | | | The things they warn about are not of any serious consequence to users or end-users and there's nothing they can do about it. Adding to that, in Qt 6 it has a reduced role since QNAM::networkAccessible was removed. Fixes: QTBUG-100482 Pick-to: 6.3 6.2 Change-Id: I178d056c513b5dbb122d5c731af602d3dc117d8e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkInformation: Rename parameter-less load() to loadDefaultBackendMårten Nordheim2022-02-092-3/+3
| | | | | | | | | | To clarify its purpose and separate it from the others Pick-to: 6.3 Change-Id: Id9efcf474ac0cd8777393380bb85c83780454005 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Network: Emit authenticationRequired when using NtlmSören Bohn2022-02-021-0/+1
| | | | | | | | | | | | Adds a new state Phase1 to QAuthenticatorPrivate::Phase which is used when authenticating using Ntlm. The new state forces an emit of the authenticationRequired signal and tracks that it is called only once. Fixes: QTBUG-44096 Pick-to: 6.2 6.3 5.15 Change-Id: Icc9662d4fdc1f0f8c8e8bc5538f211baaa055d4c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Doc: Use \inmodule for all classes and headersTopi Reinio2022-01-171-0/+1
| | | | | | | | | | | | | | | QDoc made some assumptions about the module a class/header belongs to, based on the source file path. This feature is rather error-prone and unnecessarily complex and will be removed from QDoc. Define modules explicitly to avoid documentation warnings when this removal happens. Pick-to: 6.2 6.3 Change-Id: I7947d197db5ac36c12e816caa19bb2f74eda8849 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QAuthenticator: Use views for arguments in private functionsMårten Nordheim2022-01-172-34/+40
| | | | | | | | | Some lines in tests had to be updated because they lost the implicit conversion from char* to QString. Change-Id: I95af5859ced95b9ca974205398e38c0bd4395652 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Replace QString::utf16 with QString::data where appropriateØystein Heskestad2022-01-171-3/+3
| | | | | | | | | | | QString::utf16() needlessly detaches fromRawData() to ensure a terminating NUL. Use data() where we don't require said NUL, taking care not call the mutable data() overload, which would detach, too. Task-number: QTBUG-98763 Change-Id: Ibd5e56798c0c666893c12c91ff0881842b8430c7 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtNetwork: Include moc filesMårten Nordheim2022-01-153-0/+6
| | | | | Change-Id: I227a9541bf76c1c048a694f022b8fc419c0c2544 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use ranged for loops instead of QString::utf16Øystein Heskestad2022-01-071-7/+6
| | | | | | | | Task-number: QTBUG-98763 Change-Id: I27a854121a783e67afcc4f8634ea7c8c921430c2 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* wasm: implement host lookup for socket tunnelingMorten Johan Sørvig2021-12-152-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emscripten implements support for tunneling TCP and UDP sockets through a WebSockets connection. This support is implement for the BSD sockets API, which means that Qt’s existing socket classes can be used, with some adjustments. For example, the flow for making a TCP connection to example.com:1515 can look like this: 1) The application resolves “example.com”. Emscripten creates an internal mapping to a private IP and returns that IP: 172.29.1.0. 2) The application connects to 172.29.1.0:1515. Emscripten makes a WebSocket connection to example.com:1515, and forwards the TCP data over this connection 3) On example.com:1515, a WebSockify intermediate server accepts the WebScoket connection and forwards the TCP data to the target sever, as specified by the WebSockify configuration. Emscripten’s local getaddrinfo() implementation is fast, which means don’t need caching or the thread pool. Instead, special-case lookupHostImpl() for Q_OS_WASM. The implementation calls QHostInfoAgent::lookup() and then posts resultReady using QHostInfoResult. Change-Id: Iaf31efb701ae7cc11752a63cc6b8346d4f09107e Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QAuthenticator: Filter out algorithms we don't supportMårten Nordheim2021-11-251-0/+19
| | | | | | | | | | | Which is anything other than MD5 Pick-to: 6.2 5.15 Fixes: QTBUG-98280 Change-Id: Ifbf143f233ee5602fed1594e3316e6b2adec1461 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Introduce Q_APPLICATION_STATICMike Achtelik2021-11-182-36/+5
| | | | | | | | | | | | | | QObjects must be deleted if the QCoreApplication is being destroyed. This was previously done by implementing custom code in qtbase and other modules. So unify it and introduce a Q_APPLICATION_STATIC, based on the Q_GLOBAL_STATIC, which centralises the logic. Since we still have a few remaining living QObjects, this comes in handy to fix those as well. Task-number: QTBUG-84234 Change-Id: I3040a2280ff56291f2b1c39948c06a23597865c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNI: Add API to check if connection is meteredMårten Nordheim2021-11-043-0/+39
| | | | | | | | | | | | | This may be a useful factor in deciding whether or not you should perform communications over the network which are not purely essential. For example, if you have a logging mechanism you can delay uploading them until you are no longer on a metered network. Task-number: QTBUG-91024 Change-Id: I19d32f031a3893512dc440914133678004987fb1 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNI: Clarify Feature enum entries' documentationMårten Nordheim2021-11-031-5/+9
| | | | | | | | | | | Saying properties are not available depending on feature support is misleading. It is available even if not supported, it's just not useful. Pick-to: 6.2 Change-Id: I6325c50867bb873258c70280adb8d75125db2096 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove pre-Win10 code paths in QtBaseYuhang Zhao2021-11-022-128/+31
| | | | | | | | | | | | | | Mostly a removal of dynamically loaded API. They should all exist on Windows 10 1809 (Qt6's minimum supported version). accessibility parts left untouched to make sure MinGW still compiles. Task-number: QTBUG-84432 Pick-to: 6.2 Change-Id: I7a091fc967bd6b9d18ac2de39db16e3b4b9a76ea Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* QNI: iOS: Fix copy-pasted warning messagesMårten Nordheim2021-10-291-2/+2
| | | | | | Change-Id: Id2b3ff8857a4f86ec88a0f4a8d08a227e145ae4d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QNI: transportMedium support for iOSMårten Nordheim2021-10-292-1/+48
| | | | | | | | | | | | | | It can only differentiate between cellular and not cellular and then we can determine if it's disconnected or (presumably) using wifi. It is also explicitly not supported on macOS, which adds to the confusion. Task-number: QTBUG-91023 Change-Id: I1d002ba06dd9acf1a0daabfb2a4193c07871e9b4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QNI: refactor to avoid tiny lambda slot objectsMårten Nordheim2021-10-262-11/+10
| | | | | | | | | | | | | | by just adding the parameter to the signal there's no longer a need for the tiny lambdas that just call a getter. Originally the idea was that, since the emission from Backend to the 'frontend' may be a queued emission, I wanted to use the getter so that the data emitted from the frontend was as up-to-date as possible. But on one hand, that's not really a big problem, and at the same time it would then emit the signal twice with the same value. Change-Id: Ief0959f8cbf06faf1b02a1ed4ae777181ff4f059 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNI: Add a convenience method for loading the default pluginMårten Nordheim2021-10-223-2/+65
| | | | | | | | | We have some official plugins, we may as well treat them as default and give a convenient function which loads those. Change-Id: I6251c77ac042b795bcf24b86e510e960ee4bab54 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNI: Add supportedFeatures getterMårten Nordheim2021-10-222-0/+11
| | | | | | | Which just returns all the supported features Change-Id: I8c3996b00a6ebb114bdbc9db3085a0e27fc8fa79 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* network: Fix typos in source code commentsJonas Kvinge2021-10-122-2/+2
| | | | | | Change-Id: Iff505451e3f00de2d753de0f1d891a73cf73ef0d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* network: Fix typos in documentationJonas Kvinge2021-10-122-2/+2
| | | | | | | Pick-to: 5.15 6.2 Change-Id: I386c6e4a21dacb2553a39a073052dcf6d92a9854 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNI: Add missing transportMedium documentationMårten Nordheim2021-10-121-0/+30
| | | | | | | | | I forgot Fixes: QTBUG-97409 Change-Id: I5ee94b2cc4c70b6408bb9bb9368c6876f3179783 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkInfo: Add transport medium detection APIMårten Nordheim2021-10-073-4/+55
| | | | | | | | | | | The new public API returns and notifies changes to the currently active transport medium for the application. And there's a new private API to report it, with backends to follow. Task-number: QTBUG-91023 Change-Id: I527985f9dabcd7bc4a32f36597e21bc4ab664c4e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkInformation: Request all supported feature when loading by nameMårten Nordheim2021-09-221-1/+1
| | | | | | | | | | | | | When we load by name we used to pass an empty QList to the backend as the list of requested features. That's not ideal if a backend were to selectively initialize components, so let's just pass the list of supported features. Not a problem in any current backend but it looks weird. Pick-to: 6.2 Change-Id: Ib022778b08d32e4057103a86bfdda9e17e6ebdaf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkInformation: Actually compare names case insensitivelyMårten Nordheim2021-09-201-1/+1
| | | | | | | | | The docs (10 lines above) say it will find the backend case insensitively. Thus the comparison should also be case-insensitive. Pick-to: 6.2 Change-Id: I65901ed81b7d8bdfcf76f5b6c7b40efe63245503 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Centralize RFC documentation-links in rfc.qdocLuca Di Sera2021-09-162-4/+3
| | | | | | | | | | | | | | | | | | | | In the effort of repairing broken links as per QTBUG-96127, a series of RFC links referring to `tools.ietf.org/html/*` were modified to point to the new address that the site redirected to. To simplify executing a similar task and to diminish the duplication of manually inserted urls, the already existing `rfc.qdoc` file, containing `\externalpage` commands directing to RFC locations, was enhanced with links to all RFCs that were mentioned in the current documentation, so as to aggregate this common category of links. All links pointing to a `ietf` domain inside QDoc documentation blocks were then changed to use the newly provided external-references. Task-number: QTBUG-96127 Pick-to: 6.2 Change-Id: I2a52eb6aa8c9e346f64ef1a627b039220d9f6c2a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Implement generating of private cpp exportsAlexey Edelev2021-08-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Add the generating of private cpp exports for Qt modules. Add the GENERATE_PRIVATE_CPP_EXPORTS option to qt_internal_add_module that is the manual switch for private exports generator. Existing modules in qtbase doesn't follow any strict convention of using private cpp export. So there is no clue how to detect if generating of the private exports is required or not for the module. Use autogenerated private cpp exports in QtNetwork module. CPP_EXPORT_HEADER_NAME argument of the qt_internal_add_module function is replaced by the CPP_EXPORT_HEADER_BASE_NAME and has a different meaning. The provided name is used as a base name for the private and non-private headers that contains cpp exports. Header files suffixes are constant: .h and _p.h for the non-private and private header files accordingly. Pick-to: 6.2 Task-number: QTBUG-90492 Change-Id: Icf11304e00379fb8521a865965c19b974e01e62f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Doc: Fix warnings about undocumented enum and parametersNico Vertriest2021-08-032-2/+6
| | | | | | | | | | - enum 'CaptivePortal' in QNetworkInformation::Feature - parameter 'debug' in QNetworkAddressEntry::operator<<() - parameter 'debug' in QNetworkInterface::operator<<() Pick-to: 6.2 Change-Id: I518bc06edee9fa4955dc6295786ab1a6be989727 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QCryptographicHash: use a std::array to hold result (was: QByteArray)Marc Mutz2021-07-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | The maximum size for a hash result is 64 atm. Even if, and esp when, we'll get to 128 and 256 bytes in the future, there's no reason to use dynamic memory, because the sizes will always be statically known. So use, essentially, a std::array<char, 64> to hold the result internally. Add a bit of convenience API on top to limit impact on the rest of the code and add a few static_asserts that ensure this is large enough. Then give users access to the internal buffer by adding QByteArrayView resultView() const noexcept. The documentation snippet is taken from QString::data(), suitably adjusted. Use resultView() in a few places instead of result(). [ChangeLog][QtCore][QCryptographicHash] Changed to use a statically-sized buffer internally. Added resultView() to access it. Change-Id: I96c35e55acacbe94529446d720c18325273ffd2f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>