summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Revamp WebSocket's simple-chat examplev5.10.0-beta1Mårten Nordheim2017-09-284-23/+41
| | | | | | | | | | | | | - Replace Q_* macros with their 'modern' substitutes - Replace a usage of qDebug with QTextStream - Print a little piece of text whenever a client connects - Add a textbox to the html page to set the host to connect to - Enable/disable disconnect and send button based on connection Task-number: QTBUG-60656 Change-Id: Ieec571c3964f94cd464912054acda3208c02c898 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make sure we find the ssl feature from QtNetworkv5.8.0-beta1Lars Knoll2016-09-141-0/+1
| | | | | | | | Required to be able to continue to compile this module with the modularized configure Change-Id: I9c929a1ab8e856922bacb92ca17c8e1588fa591b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Eradicate Q_FOREACH and Java-style loops and mark the module as Q_FOREACH-freeMarc Mutz2016-09-071-2/+1
| | | | | | Change-Id: I200f72423f13b54c636e995b120a70968b0e0758 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up QT_CONFIG usageLars Knoll2016-08-191-1/+1
| | | | | | | Use the newer qtConfig() method instead. Change-Id: I197dbe01edaf8696ee06d30400bd18e53cf69c94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-247-3/+24
|\ | | | | | | Change-Id: Ic4a2b48535dd9b22a950b84de4bfa2728a859902
| * Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-rc1Liang Qi2016-05-197-3/+24
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I80cd189fc82481fdc2241db6d2a7d95537c340a6
| | * add example installsOswald Buddenhagen2016-05-067-3/+24
| | | | | | | | | | | | | | | Change-Id: I49d9fda43374776685d2ab1fa653287447d34028 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | | No need to manually call the default constructorFrank Meerkoetter2016-04-074-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | Cleaning up the examples a little. There is no need to explicitly call the default constructor for these members. Change-Id: I7a931ea78f6db1bc1c70f7c49bc85f51e8666d47 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Remove dead codeFrank Meerkoetter2016-04-071-1/+0
|/ / | | | | | | | | Change-Id: I528533bffe34e0df66b4a5b7aad98d54e3ce718c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-2027-470/+929
|/ | | | | | | | | | From Qt 5.7 -> examples are lisenced under BSD license, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new BSD header instead of LGPL21 one (in those files which will be under BSD) Change-Id: I0166fb7434185f9d151631a51124945150cdd633 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix qmldir for qmlwebsockets_compatLiang Qi2015-05-222-2/+2
| | | | | | | | | It is not supported to have both "import Qt.WebSockets 1.0" and "import QtWebSockets 1.0" in the same project. Task-number: QTBUG-46205 Change-Id: I71b824b091f4491b8ab5e1eae8290a51159b03e2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-173-2/+10
|\ | | | | | | Change-Id: I3dec06c8b49480a8225ef3487c4c76a4fa05b01c
| * Examples: fix certificate files for shadow build in sslechoserverLiang Qi2015-03-093-2/+10
| | | | | | | | | | | | Change-Id: I2e5c35586c3cdc153abf9a70ee1ed6bba7894ecb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-253-6/+32
|\ \ | |/ | | | | Change-Id: I218b5069480f60b88390c8540f01c3dbbee485d0
| * Example: echoserver should not close when it got a new connectionLiang Qi2015-02-201-1/+0
| | | | | | | | | | | | | | Otherwise it's just a onetime server. Change-Id: Ida516614e72cac1635062a04a6f1f9e1c56753da Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
| * Examples: add options for port and debug outputs in echoserverLiang Qi2015-02-203-5/+32
| | | | | | | | | | | | | | Change-Id: Iadba1c5cb7cd4454b01a98339c2225483b08e180 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Frederik Gladhorn2015-02-245-7/+33
|\ \ | |/
| * Examples: add an option for debug outputs in echoclientLiang Qi2015-02-173-6/+25
| | | | | | | | | | Change-Id: I9bec2324b666c00212135ef6c9d5a69594cda050 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * Doc: add description and image for echoclient htmlLiang Qi2015-02-132-1/+8
| | | | | | | | | | Change-Id: I7e2adaf19d15842f914be6f946f30d09b7b5532f Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Update copyright headersJani Heikkinen2015-02-1627-169/+169
|/ | | | | | | | | | 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. Change-Id: I8467410bfad44e8d3fe6bd5724c61bb0c07c91f9 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Update license headers and add new license filesv5.4.0-alpha1Antti Kokko2014-08-2427-493/+277
| | | | | | | - Added LICENSE.LGPLv3, LICENSE.GPLv2 & LICENSE.LGPLv21 Change-Id: I0586e35a7aa99be1b5b3bda580b05897f451acbf Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Add initial support for a declarative WebSocketServer.Milian Wolff2014-07-026-1/+216
| | | | | | | | | | | | | | | | | | It comes with basic support for setting up a non-secure server listening on an arbitrary host and port. The name can be set, and whether the server should be listening or accept connections. The error string is also available via a property. When a client connects, a clientConnected(QQmlWebSocket*) signal is emitted. To showcase the usage and functionality, a new qmlwebsocketserver example is added which behaves similar to qmlwebsocketclient. It simply sends messages from a WebSocket to a local WebSocketServer which in turn sends a simple response. Change-Id: Ib6318155ed08cbeea47d820b709764d2e36dcc45 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-118-31/+31
|\ | | | | | | Change-Id: Iff68a7da2065b64579032f1be8eaf5fb097d58bb
| * Use the proper protocol namesSze Howe Koh2014-04-098-31/+31
| | | | | | | | | | | | | | | | - "WebSocket" is one word, with uppercase 'W' and 'S'. - "HTTP"/"HTTPS" is fully uppercase Change-Id: Ice3a50c94394433c97f7347291af5cda69b234ce Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-2438-21/+15
|\ \ | |/ | | | | Change-Id: I7215c289188462383799269aa9b736ae76db4d25
| * Move examples into 'websockets' folderKai Koehne2014-03-1938-10/+13
| | | | | | | | | | | | | | | | | | In the packaging process the content of all 'examples' folders are copied together into one folder ... so modules are supposed to have their submodule name as a sub-folder of 'examples'. Change-Id: I9981b914e8268c932ca5a3d1c9fa73f8db0b6a5b Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
| * Doc: Move and edit examples pageTopi Reinio2014-03-141-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Changed the example page type to a group to have a standardized table of examples. Also, a filename 'examples.html' is too collision-prone when Qt docs are output to a single directory. Also, moved the examples.qdoc file into /doc subdirectory to avoid it from being copied to QT_INSTALL_EXAMPLES when packaging the examples. Change-Id: I87251e0fde127bdef3024907b6472b50039f0357 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2014-03-139-10/+40
|\ \ | |/ | | | | Change-Id: I0ee590f834200c488498315e66acf7cd046d43ad
| * Add warning to example regarding ignoring ssl errorsKurt Pattyn2014-03-121-0/+5
| | | | | | | | | | Change-Id: I3d615a774f4071a085b0f233bef2eac76aefbefb Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix for self-signed certificatesKurt Pattyn2014-03-122-4/+17
| | | | | | | | | | Change-Id: I529976e6fc8813d273290e97e86405f51c3efa57 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
| * Doc: Review documentation Qt WebSocketsNico Vertriest2014-03-117-6/+18
| | | | | | | | | | | | | | Task-number: QTBUG-37149 Change-Id: Ia8fe7b11140d31bc231a17bfcc16887f3af0dbce Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Cleanup header fileKurt Pattyn2014-03-121-2/+0
|/ | | | | Change-Id: I6dade8485daec571e6b1bb844e3320ce3cb00fdb Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove superfluous setProtocol callKurt Pattyn2014-02-161-1/+0
| | | | | Change-Id: I14f16bbe0a68602265a28d71464727b671be5099 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Catch SSL errors in exampleKurt Pattyn2014-02-162-0/+9
| | | | | Change-Id: Ib9a399789878030361d9bdddd8dbfbb1832cf756 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Mark html page as being utf-8Kurt Pattyn2014-02-161-0/+2
| | | | | | | | FireFox complained when opening the page without proper indication of the encoding. Change-Id: I4f0891699c72d46bcf0cd488e2ecaf095514fabc Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Adapt copyright headerKurt Pattyn2014-02-1517-17/+17
| | | | | Change-Id: I9773492d3673d8aabdb4dd178be6af12eca7ba74 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove checks on return value of sendXXX methodsKurt Pattyn2014-02-133-10/+5
| | | | | Change-Id: If70aa381e377b832f0b44af97e19abf98f3941eb Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Simplify simple chat exampleJędrzej Nowacki2014-02-112-4/+0
| | | | | Change-Id: Ia4e6973e6531017129ae39c89851fbbf3ade76c4 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Simplify echoclient exampleJędrzej Nowacki2014-02-113-7/+0
| | | | | Change-Id: I773665754089c1f4548712df280289c77d45eba9 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Re-enable QML componentKurt Pattyn2014-02-111-1/+1
| | | | | | | Change-Id: I84948cf414585af841f3e669ddaf18b7a10fb22f Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Replace delete loop with qDeleteAllKurt Pattyn2014-02-053-12/+3
| | | | | | Change-Id: If63acc08307c0a411072a2a37ac52661e7e02594 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove superfluous Q_REQUIRED_RESULTKurt Pattyn2014-02-042-4/+2
| | | | | | Change-Id: Ie4e01a82082c45918b55e8588c7322dd359ba8c1 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Comment out QML componentKurt Pattyn2014-02-041-1/+1
| | | | | | | | Commented out QWebSocket QML component because there is still discussion regarding its API. Change-Id: I9a0699e19186f7e9761517fd127ac8a5263c745f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Add cleanup to examplesKurt Pattyn2014-02-034-0/+20
| | | | | Change-Id: I28b9007a6d35575b11a608645930fa2ed71e7c7c Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename ProcessMessage to ProcessTextMessageKurt Pattyn2014-02-012-5/+5
| | | | | | | | | Renamed to ProcessTextMessage to be consistent with ProcessBinaryMessage and with the method names in the SslEchoServer example. Change-Id: Iaaa732221597a08fca079e8df4df941d673d16a6 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename processMessage to processTextMessageKurt Pattyn2014-01-212-5/+5
| | | | | | | | Renamed processMessage to be more inline with processBinaryMessage. Change-Id: Ib0c8b9a4999756105f894d7ca5df88452495a66b Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename SecureMode to SslModeKurt Pattyn2014-01-203-3/+3
| | | | | | | | Renamed SecureMode to SslMode to be more inline with QSslSocket. Change-Id: Id2f0c5ebc1e06fcd7b0ce5059e88520e5f0e6fe5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename write methodsKurt Pattyn2014-01-205-7/+7
| | | | | | | | | Renamed the write methods to sendTextMessage and sendBinaryMessage respectively. This makes the code more readable. Change-Id: Ie49abf07a37f54c84bd01c5c788d2e42b28bcfdd Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use QStringLiteral where appropriateKurt Pattyn2014-01-206-6/+8
| | | | | Change-Id: I608b555428aceafd7761a882cd4bd1fdb50d19b3 Reviewed-by: Richard J. Moore <rich@kde.org>
* Consume return value of write functionKurt Pattyn2014-01-205-7/+14
| | | | | Change-Id: Ia5d950f539f87f2f81e111f26e77960be456017e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>