summaryrefslogtreecommitdiffstats
path: root/examples/network/fortuneserver/server.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fortune* Example: remove needless unset-ing of window flagMårten Nordheim2023-01-171-1/+0
| | | | | | | | | It's unset by default in Qt6. Task-number: QTBUG-108875 Pick-to: 6.5 Change-Id: I3f1c6e4e6de54e9ca0ed8892f9da1d346d16d4c7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fortune* Example: Bump QDataStream format versionMårten Nordheim2023-01-171-1/+1
| | | | | | | | | | | | | | One of the examples were using a different version than the others. Though QString's formatting probably didn't change since then so it was no problem. Anyway, pretend like we're releasing it now for the first time and set 6.5 on all of them Task-number: QTBUG-108875 Pick-to: 6.5 Change-Id: I28b496ab3d8ff54c503a032ba15882cdf3d5eccf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fortune* Example: convert simple for-loop to ranged-forMårten Nordheim2023-01-171-5/+4
| | | | | | | | | Ends up shortening the loop, making it easier to read at a glance. Pick-to: 6.5 Task-number: QTBUG-108875 Change-Id: Ia12a994259b00e9b57f2de48124be9cb38553bf5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-49/+2
| | | | | | | | | | | | | 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>
* Remove unnecessary int() casting in QRandomGenerator::boundedThiago Macieira2021-03-171-1/+1
| | | | | | | | | Commit 21d39168170c6833512c4a5f53985272741bd7e7 added the 64-bit version, so qsizetype now works cross-platform. The casts were added to make qtbase compile on commit df853fed66d891077ae2d04ecfa171d7e2cd5202. Change-Id: I26b8286f61534f88b649fffd166c409c5c232230 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use qsizetype in QListLars Knoll2020-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | The change creates a slight source incompatibility. The main things to take care of are * code using printf statements on list.size(). Using qsizetype in printf statements will always require a cast to work on both 32 and 64 bit. * A few places where overloads now get ambiguous. One example is QRandomGenerator::bounded() that has overloads for int, uint and double, but not int64. * Streaming list.size() to a QDataStream will change the format depending on the architecture. [ChangeLog][QtCore][QList] QList now uses qsizetype to index into elements. Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove bearer management from remaining network examplesMårten Nordheim2020-02-191-39/+2
| | | | | | | | Because bearer management is going away Change-Id: I60439c1714e0350b0f2bbef6afc8d2015886135f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtNetwork (examples) - update the fortune server exampleTimur Pocheptsov2017-09-281-41/+38
| | | | | | | | | | | | | | Unlike client, this needs a bit more changes: - remove redundant (and outdated) stdlib.h includes - use QRandomGenerator (instead of qsrand/qrand pair) - replace QStringList with QVector<QString> - Q_NULLPTR->nullptr, ExplicitType * -> auto - fix some weird indentation Task-number: QTBUG-60628 Change-Id: I12eed12711b1e622407bd8ecd1afdf56a2cf2097 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Unify license header usage.Jani Heikkinen2016-03-291-3/+13
| | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QDataStream: handle incomplete reads from QIODeviceAlex Trotsenko2016-01-131-5/+2
| | | | | | | | | | | | | | This adds a way to resume reading from a stream after a ReadPastEnd error. This is done by introducing a stream read transaction mechanism that keeps read data in an internal buffer and rolls it back on failure. [ChangeLog][QtCore] Added QDataStream startTransaction(), commitTransaction(), rollbackTransaction(), abortTransaction() functions to support read transactions. Task-number: QTBUG-44418 Change-Id: Ibf946e1939a5573c4182fea7e26608947218c2d9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* fortuneserver/fortuneclient: Fix layout for WinRT.Friedemann Kleint2015-12-091-1/+1
| | | | | | | Use the new API QStyleHints::showIsMaximized(). Change-Id: I1342b3c29ef4ccfcf635a32d403f9aa7ce0cb4e4 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Polish the fortune server/client examples.Friedemann Kleint2015-12-031-13/+30
| | | | | | | | | | | | | - Remove Qt::WindowContextHelpButtonHint. - Make the server label interactive (enable copy). - Introduce new connection syntax. - Remove unneeded member variables. - Use constructor initialization where appropriate. - Adapt the layout to fullscreen platforms by wrapping it into a QGroupBox. Change-Id: I6e397ad082f22ba1e99fc5a17440b2be1f9584f6 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-151-3/+3
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-5/+5
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use organization name "QtProject" in examples.Friedemann Kleint2012-10-161-2/+2
| | | | | Change-Id: Ibbe9517ccf81d25eccbdff98f7cfe8ff6ec485d2 Reviewed-by: hjk <qthjk@ovi.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-6/+6
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* include fixesLars Knoll2011-05-071-1/+1
| | | | | | | Fixed the include statements added QT+=widgets in examples/network to get them to compile. Will need something better than doing it manually.
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+176
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12