summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Update to new QRandomGenerator APIv5.10.0-beta4Thiago Macieira2017-11-033-6/+6
| | | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-307-22/+30
|\ | | | | | | Change-Id: I3ae5df71f201cfdb9a4c9e7d90a60d1f9792700a
| * Fix empty sslConfiguration in sslErrors slotAndré Klitzing2017-10-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QWebSocket fires signal sslErrors the QSslConfiguration of QWebSocket is not updated. So client application cannot check it in implemented slot. Fix this by calling the update method like for encrypted signal. Sibling of QTBUG-40401. Change-Id: I18b39f6b6a0791ae67fc2bff5cf2c04a22b0ab85 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Fix handshakeReceived not being invoked in some situationMårten Nordheim2017-10-271-0/+5
| | | | | | | | | | | | | | | | | | | | In the rare case where the handshake was received before the signal and slot was connected it would never invoke handshakeReceived and the server would keep waiting. Task-number: QTBUG-64026 Change-Id: I86d54031d2583b6a0cf2b5348889b5ef859b9aab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Fix outdated FDL license headerKai Koehne2017-10-235-22/+22
| | | | | | | | | | Change-Id: Ic41f3745e800ba54153b36f269017075297c2402 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta3v5.10.0-beta2Liang Qi2017-10-112-11/+12
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I4af142703e469b56236b73335a93f6960534c0f1
| * Replace iterator based loop by range-for-loopAndré Klitzing2017-10-101-9/+9
| | | | | | | | | | | | | | | | Found by clazy and fixes "clazy-strict-iterators" warning. Change-Id: I8f50c92ac054d627499440d593faa43ed5b4ad4b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Change assert to null-checkMårten Nordheim2017-09-201-1/+2
| | | | | | | | | | | | | | | | | | Avoids a crash that would happen if readyRead was emitted after calling ::close on the websocket. Task-number: QTBUG-59179 Change-Id: I1e7bd19d99ee068b8699014fac9a72f839632c85 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Fix releaseConnectionsAlan Alpert2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The overload selected when you pass a single object pointer is to disconnect all signals with that object as a receiver. We want to disconnect all signals with that object as a sender, which is done most easily by passing no explicit arguments. Task-number: QTBUG-62667 Change-Id: I3dd9c5aced9160510bff527355ecfbedded690aa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Replace Q_ENUMS by Q_ENUMAndré Klitzing2017-10-102-3/+2
| | | | | | | | | | Change-Id: Ie16c88fb0a215efe5f152ea2d12c984f8d9e0878 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Use multi-arg instead of multiple arg callsAndré Klitzing2017-10-091-1/+1
| | | | | | | | | | | | Change-Id: Ic1f4b357138457eb33ac9154a280f499664c3c78 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devv5.10.0-alpha1Liang Qi2017-08-151-11/+0
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3dd9c568ed9160510bff527355ecfbed5d4690a9
| * Remove workaround for unsupported compilerJake Petroules2017-08-141-11/+0
| | | | | | | | | | | | | | | | | | Qt for WinRT now requires Visual Studio 2015. Change-Id: I8996f2855476315819532df89c6754aa162bd02e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Change the mask generator to use QRandomGenerator instead of qs?randThiago Macieira2017-06-303-12/+12
|/ | | | | | | | | This makes it secure, instead of insecure, and requires no seeding. Task-number: QTBUG-61694 Change-Id: Ia53158e207a94bf49489fffd14c782bd4ec24946 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Replace comment with Q_FALLTHROUGHJesus Fernandez2017-05-041-3/+3
| | | | | Change-Id: Ie970ce470672f1c849470b0eaf7fe39758341e37 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QQmlWebSocket::setUrl(): let open() decided what to actually doEdward Welbourne2017-05-041-3/+1
| | | | | | | | | | | | | | | | After emitting urlChanged(), setUrl() did a manual open(url) if it had a web-socket to do it on, omitting various checks that open() imposes on actually calling open(url); as a result, it left the web socket in an inconsistent state if it wasn't yet active. This meant that setting active could trigger a second open() while the web-socket was already open(), which upset it. Replaced the hand-rolled call to open(url) with a call to open() so as to be consistent and avoid such problems. Task-number: QTBUG-58278 Change-Id: Iee84f2b0d973e7fd288a14018039a665658c0040 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move Q_REQUIRED_RESULT to the beginning of the declarationThiago Macieira2017-04-271-7/+8
| | | | | | | That's the correct place and works with C++11 attributes. Change-Id: I7814054a102a407d876ffffd14b6a2fed3744b03 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix build for -no-feature-textcodecStephan Binner2017-04-271-2/+4
| | | | | | Change-Id: I98ef516031e8057456d8dab6de01576d2734d8f5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add a function to hand off a tcp socket to the websocket serverAleksey Lysenko2017-01-274-11/+35
| | | | | | | | | | | | | This method allows a listening port to process connections with different protocols. It lets the websocket server handle a TCP socket, upgrading it to a websocket [ChangeLog][QWebSocketServer] Add support to handle external QTcpSocket Done-with: André Klitzing <aklitzing@gmail.com> Task-number: QTBUG-54276 Change-Id: Ia36b481dc87d6f3806e9f1e61e75e528640f1937 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-257-27/+29
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: If50b73b1f1e293269404bd8b38088119a0f59f1f
| * Fix the parser of port in hand shake requestLiang Qi2017-01-061-10/+6
| | | | | | | | | | | | | | | | | | | | Use QUrl::setAuthority() to parse host and port. The request is invalid when having username or password in Host. Task-number: QTBUG-57357 Change-Id: I4e7c0370794dce15359d372a1e36dc0383083204 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fixed possible block clearing in QWebSocketDataProcessor::process methodAleksey Lysenko2017-01-041-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | In QWebSocketDataProcessor::process() the signals text(binary)MessageReceived are emitted before clear() method. If signal handler blocks loop (for example, using QDialog::exec()), clear() will be called only after resuming loop. It may lead to the data corruption due to the fact that QWebSocketDataProcessor clearing won't be performed before the new data arrived. Task-number: QTBUG-55506 Change-Id: Ib7016a91d3987dec7c1af977b17f86a53568c413 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Fixed wrong scheme for secure websocketAleksey Lysenko2016-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | Websocket server always constructed QWebSocketHandshakeRequest like for non-secure socket without checking SecureMode. This led to the fact that secure socket had "ws" scheme. Task-number: QTBUG-55927 Change-Id: I881766f55182136072fd23f3fefe93ea60f3d27d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Fixed QWebSocketServer::SslMode collisionAleksey Lysenko2016-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Value of NonSecureMode enumerator depends on QT_NO_SSL. If Qt is built with QT_NO_SSL defined, NonSecureMode is equal to 0, otherwise it is equal to 1. It may lead to problem if user built app with libs where NonSecureMode = 0, but run it with libs where NonSecureMode = 1. [ChangeLog][QWebSocketServer] SslMode::NonSecure enumerator now always has the same value (1) regardless of SSL enabled or disabled. Task-number: QTBUG-56129 Change-Id: If17137eff4b19015697c827a985ef89dd95a5611 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Delete disconnected socketAleksey Lysenko2016-12-132-3/+5
| | | | | | | | | | | | | | | | | | | | | | Method onSocketDisconnected has never been called, so WebSocketServer did not handle closed connection properly. Moreover, socket was not freed in time and this led to increase in memory consumption Task-number: QTBUG-56414 Change-Id: Ib57f5b88413ffeef4f296a260245ba0a8d25adb2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Fixed WebSocket status docAleksey Lysenko2016-12-131-5/+5
| | | | | | | | | | | | Task-number: QTBUG-57523 Change-Id: I2c7f6c2467ba615d1bcbb9d659e27bb242373710 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-261-1/+1
| |\ | | | | | | | | | Change-Id: Ia8c2930d5bf681227cef0730cdf0dca6d068722f
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-171-1/+1
| | |\ | | | | | | | | | | | | Change-Id: I912302259dc84aa15ca8bb8a498c5c5b148c2864
| | | * Doc: Add verb to WebSockets introv5.6.25.6.2Kai Koehne2016-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I4c9f3a50c24f945c0f14010a10ff808d8adf7845 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | | Remove support for WinRT 8.1 and Windows Phone 8.1Maurice Kalinowski2017-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-57288 Change-Id: I45978f7c267c8c8742b0cba5bc9469535e2e6f5b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-09-213-12/+8
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | Conflicts: src/websockets/qwebsocket_p.cpp Change-Id: Ib6b9655985246c9ce3968f1eb662be457465a937
| * | | Eradicate Q_FOREACH and Java-style loops and mark the module as Q_FOREACH-freeMarc Mutz2016-09-073-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I200f72423f13b54c636e995b120a70968b0e0758 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | Fix loading of QML pluginsv5.8.0-alpha1Simon Hausmann2016-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 709f6370884b110def2e4665df8fa7bbf5fae734 the plugin loader is strict about requiring the correct interface id, to avoid loading unrelated plugins in the loader thread (which they may not be prepared to do). Change-Id: If892bc1d3d1762ffd9dad9dd19deda84baba4159 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | | | Eradicate Q_FOREACH loopsAndré Klitzing2016-08-232-2/+3
|/ / / | | | | | | | | | | | | Change-Id: I08541a4162ceb4ba101ed44d65143dda6eb84e3d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | 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-08-022-5/+11
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I593c47e7aeebb7997f42a7408a8d22704d2713a1
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-012-5/+11
| |\ \ | | |/ | | | | | | Change-Id: Ie37e1ec038e82c845066f92e5f87e355d627e2ff
| | * Fixed erroneous detection of server disconnect conditionOleksandr Tymoshenko2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractSocket::atEnd does not check actual connection state it only checks if data is ready to be read. Under some conditions (e.g. slow network) data may not be available yet but it doesn't mean the server dropped connection. When more data comes FSM will pick it up and handle as expected. The right way to check disconnect is to check for actual socket state. Task-number: QTBUG-51069 Change-Id: I17d7110fbefdba2d5378a71935ab5923f8c1bf3e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Doc: Also mention QML Import in index pageKai Koehne2016-05-231-4/+10
| | | | | | | | | | | | | | | | | | | | | qtwebsockets-index.html is the entry point for both C++ and QML API. Change-Id: I81efb2d7b931cce0d63efc2f25ce89904abcbfad Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Add support for TLS PSK (client and server)André Klitzing2016-06-128-0/+55
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][QWebSocket] It is now possible to use TLS PSK ciphersuites. Change-Id: I9e96669494cec5e6a4e076fe9f10fcd4ef6358a4 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Doc: Update WebSockets import to 1.1Kai Koehne2016-05-261-2/+2
| | | | | | | | | | | | | | | Change-Id: Ied0b921fb5bc666f0cec7c722880f1c91e1c6923 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-241-1/+1
|\ \ \ | |/ / | | | | | | Change-Id: Ic4a2b48535dd9b22a950b84de4bfa2728a859902
| * | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-rc1Liang Qi2016-05-191-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I80cd189fc82481fdc2241db6d2a7d95537c340a6
| | * Doc: Remove repository name from examplesinstallpathv5.6.1-1v5.6.15.6.1Topi Reinio2016-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Examples in binary packages now directly match the install path. Change-Id: Id4e9b2bc738ae3b1b35114c74530aa50e4103aa3 Task-number: QTBUG-52953 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-0818-56/+204
|\ \ \ | |/ / | | | | | | Change-Id: I8a2d6875b68c99786f99ec0dc380f8725c6abd42
| * | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-beta1Liang Qi2016-04-0814-53/+193
| |\ \ | | |/ | | | | | | Change-Id: I7ebcdc16a8b65103abfb9640c990eddbeccdef05
| | * Fix possible hang on handshakeKai Koehne2016-04-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | processHandShake operates on complete lines. If the data available does not contain the full handshake message, the loop will therefore never return. Task-number: QTBUG-51001 Change-Id: Ie87f5b5dee01116f463e84f06feab502ff5ac563 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * Doc: Avoid auto-linking of WebSocket, WebSocketsKai Koehne2016-04-073-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable the automatic linking of 'WebSocket' to the QML type, and 'WebSockets' to a section in the general documentation. Instead, make the linking explicit where it makes sense. This patch is inspired by 0228a5bd581ae6d672ce5f3 in qtwebengine. Change-Id: I80886360d5f7fdaa68a5e5f6fa982137c7187719 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * Doc: Add external-resources.qdocKai Koehne2016-04-0711-38/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also sanitize some linking, e.g. by referencing to the paper by title, not by link. Change-Id: I95482994ca569001a23a3beb0e3cbe6739f4ed77 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * Merge remote-tracking branch 'origin/5.6.0' into 5.6Frederik Gladhorn2016-03-171-10/+9
| | |\ | | | | | | | | | | | | Change-Id: I11c3b9f39d56d3b26e0f3c4012cb2e3afee46341