HTTP belongs to Networking, but also fits well with the scope
of Web Technologies - qtnetworkserver is there after all, too.
So just add the example to both.
Pick-to: 6.6 6.6.0
Change-Id: I588e4e0eefc92ba396fbb21d6f55b33f68332a74
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QItemDelegate was superseded since Qt4 by QStyledItemDelegate but it
took until Qt6.7 to remove the last occurrences in qtbase.
- remove unused includes / replace with qabstractitemdelegate.h
- replace references in the documentation with QStyledItemDelegate
- adjust the examples and tests to use QStyledItemDelegate
Pick-to: 6.5 6.6
Change-Id: I246755004ce2d01192a726ca0972106c237df0cc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Move the rsslisting example documentation to examples/network/doc,
as it is done for all the other examples.
Fixes: QTBUG-117215
Pick-to: 6.5 6.6
Change-Id: If83202825afe8c69cb7fda0f84ca4832cf3d60e7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Add a full stop to the briefs to clear the following qdoc warnings:
* multistreamclient.qdoc: '\brief' statement does not end with
a full stop.
* multistreamserver.qdoc: '\brief' statement does not end with
a full stop.
Change-Id: If0e58bc100a595f3ee00c79c31ac19f8d9ee3ad9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
To make it show up in the documentation.
It's also our only example showing SCTP.
Change-Id: Ib80ab869d9a6cbd370aa1a0c74772639e4393b37
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We don't key it on IP address anymore so we can drop
the use of QMultiHash.
This also requires moving the connections for error and disconnected
to readyForUse so we don't remove an active connection when a second
connection attempt happens from the same peer process.
But since we still need to deallocate those connection attempts
if they error out or simply disconnect, we connect their signals to the
QObject::deleteLater slot. In some cases we might call deleteLater twice
but that's fine.
Change-Id: I48c27de1e51a52ef61cfb941a7a81b358ae9ce3f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
The system was just treating IP (and optionally port) as a unique
identifier, so if a peer had multiple possible paths to a client they
would connect multiple times.
This fixes that by generating using QUuid in each client.
We then use this during broadcast, replacing the username we
sent before (which was not used), and as part of the greeting.
The greeting now is more complex, since we need to send both
username and the ID.
Change-Id: I6c6c2ffd5198406aad48445a68dd6aab36de69c0
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: I34b11cd73c80dc3033de8731bd8edc0db3ed4a12
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: I73658fef13ac4fdc046011f6aa68b6f97555546a
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: I3efebe12e3a46c35e6c1775226e9ba424811cc30
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
If we are already disconnected we end up printing warnings about how it's
illegal to call waitForBytesWritten on an unconnected socket
Change-Id: I8c864d105d5372edfee84affb362cca3021b8ea0
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The example was moved to qtnetwork but its documentation
still referred to old paths under /examples/corelib.
Add documentation dependency to qtwidgets as RSS listing
example's docs link to a number of widget classes.
Pick-to: 6.6 6.5
Change-Id: Ief1c9dc2ca38ba3da1fe3039500292147ec4cc7d
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
It's really showing how to request a resource and act on its becoming
available. The use of XML to do so is incidental; the use of
networking is central.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ibcf438c7ef3b2464ddfa8b96a79fb15523e4a468
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The if statements were originally broken to fit 80-column width
but didn't have the braces we typically require.
It anyway fits inside our new 100-column width, so just do that.
Task-number: QTBUG-108873
Change-Id: Ib632f35607e6b716141c4c5d8211de7a0745c6ab
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Using only the key means all clients with that IP address are removed.
But there could be multiple clients running on the same multi-user
system.
So, use the value as well to remove just the specific one.
This also fixes a bug where, when a client disconnects, all of the
connections are removed from the client's map, but only _one_ is removed
from the GUI.
Task-number: QTBUG-108873
Change-Id: I87da862e8f337fd9c246ff5a2d243e514076fa5f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
It is a best practice after all
Task-number: QTBUG-108873
Change-Id: I11c23c080f6fe7f124e461affa88279d5def93f9
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Where possible
Task-number: QTBUG-108873
Change-Id: I8125ffd63cd0ad1970575fb1a6b85021c03c38d5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Prefer own headers, avoid full-module includes
Task-number: QTBUG-108873
Change-Id: I4282d4aab5fd66c64fc27cd130b223d33069d80f
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Some of the 'int's are purposefully 32-bit because that's what the
protocol is, but others aren't. So, be more explicit.
Task-number: QTBUG-110622
Pick-to: 6.5
Change-Id: I338abca1f13b0c95f49a6f52933712f43f147590
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The '\meta category' command was used for tagging examples with a
specific category, used in Qt Creators Welcome mode.
As we want to also generate lists of examples belonging to a category
elsewhere in the documentation, replace the command with a macro that
expands to the original \meta command and also adds the example to
a group using the \ingroup command. This way, the category names can
be used as arguments to the \generatelist or \annotatedlist commands.
Pick-to: 6.5
Task-number: QTBUG-112731
Change-Id: I46762dabc5f718fecc09a3533235eaa911dda5a0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
It doesn't showcase anything interesting that other examples
don't already show off.
Pick-to: 6.5
Change-Id: Ie95c3ddb3ff52b3beab54bd6fa75fb75ae5c7ba5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
They're small, not much to polish.
Pick-to: 6.5
Change-Id: Iada573504de557ab18381370bb9760b1f60cc2e4
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This let's us get rid of an out-parameter.
Task-number: QTBUG-108873
Pick-to: 6.5
Change-Id: Ifc08d3905932f28ecdfdf3a7de1499700cc7e606
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
showHelp was already in use, but not showVersion.
Return 0 in both cases, even if it's unreachable.
Task-number: QTBUG-108873
Pick-to: 6.5
Change-Id: Iba820e89d7de066130163e7829f75bbfcfa3f7dd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
By using .compare(~~~, Qt::CaseInsensitive) instead of .toLower()
Task-number: QTBUG-108873
Pick-to: 6.5
Change-Id: I60e1fdc0a54450e7385e90f84fd509e62b82d2c9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Their use of QtNetwork is already covered by the HTTP example.
While showcasing that QNAM easily deals with multiple simultaneous
requests, waiting until finished() is emitted to write anything is not
exactly idiomatic.
And managing your own queue to only have one request running at a time
is a weird example for an asynchronous framework.
In this regard, having an example for a complete download manager
(with a GUI) would be interesting, but may ultimately be very
time-consuming to make for limited gain.
Task-number: QTBUG-110643
Pick-to: 6.5
Change-Id: I6b2c1546b85fa89ab7ce1ff5565b0293b5710b74
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
The crash would sometimes happen shortly after removing a torrent
since the RateController would still try to use it even though
it had been deallocated.
Pick-to: 6.5
Task-number: QTBUG-110622
Change-Id: Icad1531ea58560a3a3157a3ed8c0e6b283573196
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Because of the .size() used as part of the expression it
ends up copying sizeof(qsizetype) bytes to the array,
instead of the (rationally) expected 4 bytes.
Amends 69c31f6f68
Pick-to: 6.5
Task-number: QTBUG-110622
Change-Id: I732e3f4bb5934ff3860087baa91f9bebbf044a7f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
There is specific API for counting number of 0-bits
Pick-to: 6.5
Task-number: QTBUG-110622
Change-Id: Ifa33862ff7b98a59f362bc52c492e8a037799835
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
That's not fit for an example...
Task-number: QTBUG-110622
Pick-to: 6.5
Change-Id: Ib196d61867f95f3ff2e45841509d49df9360ad25
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Using seconds because then they all have the same type, even if
all-but-one could use minutes.
Delete one unused interval value.
Task-number: QTBUG-110622
Pick-to: 6.5
Change-Id: I66b456de8a4b867859e9e2b13ce72e8ec691c79a
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>