summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Support 401 response for websocket connectionsMårten Nordheim2022-12-216-2/+460
| | | | | | | | | | | | | Adds the authenticationRequired signal. [ChangeLog][QWebSocket] QWebSocket now supports 401 Unauthorized. Connect to the authenticationRequired signal to handle authentication challenges, or pass your credentials along with the URL. Fixes: QTBUG-92858 Change-Id: Ic43d1c12529dea278b2951e6f991cc1004fc3713 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-12-211-2/+2
| | | | | Change-Id: Icffa3aaff2de2987e522222c6c159bf78395c05e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Rewrite translated string to not include '(s)'Mårten Nordheim2022-12-191-1/+1
| | | | | | | | | | | It is not always possible to translate such strings, and the number of occurrences don't matter, it's an error as soon as there is 1. Amends 99ebe2f669258b3919a0933ffd5d4c85fb13c0c0 Pick-to: 6.5 6.4 Change-Id: I4b12311813b26cd6e8e21e55826ec60dd301692a Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
* Bump version to 6.6.0Jani Heikkinen2022-12-161-1/+1
| | | | | Change-Id: I06f064b9032c3ee4f06fe5acead68a969fd00631 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-12-161-2/+2
| | | | | Change-Id: Id84c371e0b690b6c38db1907b0978810a24b1273 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Turn if..else if..else into a switchMårten Nordheim2022-12-151-3/+9
| | | | | | | Makes it a little nicer when adding new branches Change-Id: I1075c00c5bfc83d868adbc98d8c086f6065e9688 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Disconnect when handshake failsMårten Nordheim2022-12-151-0/+2
| | | | | | | | | It is unexpected that websocket does not disconnect once it knows the handshake has failed. Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I11e64745ffdb01c11ac79739cf7f384ad6cc4590 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-12-121-2/+2
| | | | | Change-Id: I05c5fdddf937eb8400b7e2c24beab3ac077cf135 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-12-111-2/+2
| | | | | Change-Id: I38bba2a4dcce26485f145486e0cd5d2ca05ea1c0 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-12-081-2/+2
| | | | | Change-Id: I0c2d22addf977aa9052b44504489e2349ee5bf56 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Mark the module free of qAsConst()Marc Mutz2022-12-051-0/+1
| | | | | Change-Id: I914ccc09297ac6283d7cf24d5afc96ebdaf294d0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-12-051-2/+2
| | | | | Change-Id: I8c0b6d96db2af16b30752da0ad9ed190e86efa11 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-291-1/+1
| | | | | Change-Id: I65122d7c59560429ea2576e13212f647d9c2c9b9 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-261-2/+2
| | | | | Change-Id: Ieeadaf0ef30fd0f59c8193fe178e315b91394161 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-251-2/+2
| | | | | Change-Id: Ie9b2fc96f1d2eeeeca572072ec2fadeb536d342f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QWebSocket: honor subprotocols specified with setRawHeaderMårten Nordheim2022-11-244-19/+50
| | | | | | | | | | | We would error out with a ConnectionRejected if the server accepted one of the protocols specified directly in the header since we did not consider those at all. Fixes: QTBUG-108276 Pick-to: 6.4 Change-Id: Ifbb316c9d4871fd764e03c74caefa10f5b757155 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QWebSocket: check correct variable in if-statementMårten Nordheim2022-11-222-1/+72
| | | | | | | | | It's _usually_ correct, but if all protocols have been filtered out then it will be an empty string. Pick-to: 6.4 Change-Id: I3aa3221b7e36cfd253cd1152b13e57183bf4f905 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Replace QT_HAS_INCLUDE() wrapper macro with __has_include()Tor Arne Vestbø2022-11-222-3/+3
| | | | | | | | | | | | | | Using wrappers for these macros is problematic when for example passing the -frewrite-includes flag to preprocess sources before shipping off to distcc or Icecream. It will also start producing warnings when compilers implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example https://reviews.llvm.org/D49091 See qtbase change c3bd5ffdc8a3b459f18ba6e35fca93e29f3b0ab0. Change-Id: I79d15f92c4d1af3ae3cdd2c0c615dca36c761d1a Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-171-2/+2
| | | | | Change-Id: I88a2332daa083839df9d87b8227cf177f27240ad Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-161-2/+2
| | | | | Change-Id: Icdcc9b5ebc84ca8bff8d9712061e395a4f0ccca6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-141-2/+2
| | | | | Change-Id: Ib737c6016fa950f3e2509268bec9776aa5778ba6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-091-2/+2
| | | | | Change-Id: Idabf733eab4e761812f839ecbc900c6a58bbf5c1 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-081-2/+2
| | | | | Change-Id: I0456db1465e6e325d1cc58971269c183d014f238 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-031-2/+2
| | | | | Change-Id: I61b059d7288ac0cb67608d9755d2402e96af8d58 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-11-011-2/+2
| | | | | Change-Id: I68ca9edabebc09fcb1a410b26c885befbe5ee360 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Enable syncqt cppAlexey Edelev2022-10-311-0/+2
| | | | | | Change-Id: I0e5b5b7f44777b0981fb8acdb6ca2c0b9cb2ec1d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-10-261-2/+2
| | | | | Change-Id: I8e0549dd6d6c2c0ce0c3783bd3d6d445a5ee318b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Port to new Q_UNREACHABLE_RETURN()Marc Mutz2022-10-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator to convert sequences of Q_UNREACHABLE() + return into Q_UNREACHABLE_RETURN(), newly added to qtbase. const std::string unr = "unr", val = "val", ret = "ret"; auto makeUnreachableReturn = cat("Q_UNREACHABLE_RETURN(", ifBound(val, cat(node(val)), cat("")), ")"); auto ignoringSwitchCases = [](auto stmt) { return anyOf(stmt, switchCase(subStmt(stmt))); }; makeRule(stmt(ignoringSwitchCases(stmt(isExpandedFromMacro("Q_UNREACHABLE")).bind(unr)), nextStmt(returnStmt(optionally(hasReturnValue(expr().bind(val)))).bind(ret))), {changeTo(node(unr), cat(makeUnreachableReturn, ";")), // TODO: why is the ; lost w/o this? changeTo(node(ret), cat(""))}, cat("use ", makeUnreachableReturn)); a.k.a qt-use-unreachable-return. subStmt() and nextStmt() are non-standard matchers. Change-Id: I3855b2dc8523db1ea860f72ad9818738162495c6 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-10-191-2/+2
| | | | | Change-Id: Iba151ef28defbdeb980666219a77f5b35c700d6e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Replace usages of Q_CLANG_QDOC with Q_QDOCLuca Di Sera2022-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | To allow the user to customize the C++ code that QDoc sees, so as to be able to work-around some limitations on QDoc itself, QDoc defines two symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an entire execution of QDoc. At a certain point in time, QDoc allowed the user the choice between a custom C++ parser and a Clang based one. The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol would be defined only when the Clang based parser was chosen. In more recent times, QDoc always uses a Clang based parser, such that both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent. To avoid using different symbols, and the possible confusion and fragmentation that derives from it, all usages of Q_CLANG_QDOC are now replaced by the equivalent usages of Q_QDOC. Change-Id: I637a5dfe613d02f7c4bfe6b31f91b64f498b1c7b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-10-121-2/+2
| | | | | Change-Id: Ic82e6bc9be70df06afb76dd6cbfeef93342cc666 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Port from container::count() and length() to size() - V4Marc Mutz2022-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); a.k.a qt-port-to-std-compatible-api V4 with config Scope: 'Container'. Change-Id: I58e1b41b91c34d2e860dbb5847b3752edbfc6fc9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: Ib7233b40047e539a08daece8bbc4576f0ced7026 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-0710-334/+334
| | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Ic219197507870fd2b739f2e04ff138021e58d550 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove/replace uninitialized status line variable in error stringJuha Vuolle2022-10-052-3/+5
| | | | | | | | Amends: bbd9f2f4f5e0fda85029fa320f793973ea607c2b Pick-to: 6.3 6.4 Change-Id: I4af7b167e5f45ad5ead25f6421a2af8638494fd4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix uninitialized QWebSocket::errorString()Juha Vuolle2022-10-053-6/+25
| | | | | | | | | Amends: bbd9f2f4f5e0fda85029fa320f793973ea607c2b Fixes: QTBUG-106937 Pick-to: 6.3 6.4 Change-Id: Ia805df3e3dd8ba61e53592ebfb0a8bfae9184042 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-10-041-2/+2
| | | | | Change-Id: Ic6b59374ffae817a025687a23b44553af3879cc9 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-10-031-2/+2
| | | | | Change-Id: Iee305c11a499024a1f4801f25d8127c68f6b7358 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-09-301-2/+2
| | | | | Change-Id: I5d6078f9ea9c1abbb7b2a73fdf3cea0cb3ef299c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-09-261-2/+2
| | | | | Change-Id: I5c43b796f58961cbf66788207ab80c9cbb574851 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-09-231-2/+2
| | | | | Change-Id: Idf60aafac5c900ce150840956f764bcca87f1b15 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-09-161-2/+2
| | | | | Change-Id: I9be121e6a027393b3f96de24f7cc7c3d484318f8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* wasm: fix websocket use from worker threadLorn Potter2022-09-131-1/+1
| | | | | | | | | | self is the current window or WorkerGlobalScope Pick-to: 6.4 6.4.0 Fixes: QTBUG-106372 Change-Id: Ia23f8bd147d729d224ba8de0d44c07877ba24631 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Doc: Remove usages of the second argument of a "\page" commandLuca Di Sera2022-09-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The "\page" command for QDoc, used to construct a standalone documentation page in the output documentation of a project, was able to take a second argument, apart from the first argument representing the name for the generated documentation page, that roughly represented the type of the page that was to be generated. This second argument was not actually used by QDoc, such that it had no meaningful effect. QDoc was recently modified to not support this second argument, internally, and officially removed its use. For technical legacy reason, QDoc will still support the usage of a second argument for a "\page" command, albeit it will do nothing, as before. To avoid confusion for future readers who might not be aware of the history of the "\page" argument and that will not find an explanation in QDoc's documentation anymore, the usages of the second argument in "\page" commands are now removed. Change-Id: Ia41f57d5afd76b0c369f58b3f9c25854e55a33fc Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-09-021-2/+2
| | | | | Change-Id: I29d34073e43e879e08f7634e4a9034d3725e54cd Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QWebSocketServer: update handshake timeout to keep up with QSslServerMårten Nordheim2022-08-312-7/+24
| | | | | | | | | | | | | | | | | A side-effect of this is that the timeout is now duplicated. The TLS handshake first has the 'msec' timeout, and then the websocket handshake has the same 'msec' timeout. [ChangeLog][QWebSocketServer] Due to the introduction of a standalone QSslServer, with its own timeout handling, the setHandshakeTimeout() function now applies the same timeout to both the TLS and WebSocket handshakes separately. Pick-to: 6.4 Fixes: QTBUG-105851 Change-Id: I6c515e0dcdf83fa452979b06ab5f890c8b14b184 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-08-301-2/+2
| | | | | Change-Id: Ifbed933d0ca11cd4282eb6ef898280524f6e4b1e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Purge remaining usage of Q_NULLPTRJohannes Kauffmann2022-08-292-2/+2
| | | | | Change-Id: I570d920fbdeae64c0b58b767b65243c82e94982b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update dependencies on 'dev' in qt/qtwebsocketsQt Submodule Update Bot2022-08-251-2/+2
| | | | | Change-Id: I0427bf15251123228629b12e24f4308c98d2c60c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2329-29/+29
| | | | | | | Task-number: QTBUG-105718 Change-Id: I9ae1ecc59e30cadaa8aaef762c86126c58e32bf0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>