contrib/qtwebsockets.git
9 years agopackaging: devel subpackage take imports too 60/39660/1 tizen
Philippe Coval [Wed, 20 May 2015 12:25:29 +0000 (14:25 +0200)]
packaging: devel subpackage take imports too

Change-Id: I7132cf454966b6a7c1a433f12b746b824e6289af
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Initial packaging on 5.4.1 for Tizen 44/37744/2 submit/contrib_common/20150403.140947
Philippe Coval [Thu, 19 Mar 2015 09:15:13 +0000 (10:15 +0100)]
packaging: Initial packaging on 5.4.1 for Tizen

Change-Id: I4ab390147debb32d392b008a94a2f6ca8e3ba677
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agoQWebSocket should remember close code and reason upstream v5.4.1
Frederik Gladhorn [Tue, 2 Dec 2014 12:15:54 +0000 (13:15 +0100)]
QWebSocket should remember close code and reason

Task-number: QTBUG-42982
Change-Id: I50dbff96d7d64a5213e6ea6ba7bb9429b21b1fb2
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
9 years agoBump version
Oswald Buddenhagen [Fri, 12 Dec 2014 12:49:14 +0000 (13:49 +0100)]
Bump version

Change-Id: I5b6f91f66cd5e9379f411952bce59c0364e2065c

9 years agoHardcode QtQml version import in .pro file
Kai Koehne [Thu, 4 Dec 2014 10:04:10 +0000 (11:04 +0100)]
Hardcode QtQml version import in .pro file

This allows the plugins.qmltypes file to be updated by just running

   make qmltypes

Change-Id: I0872082645e9d4d8879e3a3479aea80494248894
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
9 years agoSet parent of internal server objects
Peter Kümmel [Sat, 2 Aug 2014 12:48:32 +0000 (14:48 +0200)]
Set parent of internal server objects

After moving the websocket server into another thread
current code doesn't work because then the QTcpServer/QSslServer
objects reside in a different thread:
"QWarning: QObject: Cannot create children for a parent that is in a different thread."

QObject::moveToThread(QThread*) also moves QObjects's children, therefore the
internal server objects need to be children of QWebSocketServer.

Change-Id: Ic7e8a564cd87400a4ab7258e3799157ed359c098
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
10 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Oswald Buddenhagen [Mon, 3 Nov 2014 12:48:18 +0000 (13:48 +0100)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Change-Id: I0e89ede5ea173f2e831c42d250ddb2b21b42b89b

10 years agoFix invalid Date header field in handshake response
Joni Poikelin [Tue, 19 Aug 2014 12:35:57 +0000 (15:35 +0300)]
Fix invalid Date header field in handshake response

Fix invalid Date header in handshake response on systems with non-
english system locale.

Task-number: QTBUG-40866
Change-Id: If6d5cc55e879eff259698e87c9cda753990245e7
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoMake QWebSocketPrivate::makeConnections() take care of all connections.
Christian Kandeler [Mon, 15 Sep 2014 15:07:33 +0000 (17:07 +0200)]
Make QWebSocketPrivate::makeConnections() take care of all connections.

Otherwise all code that calls it has to handle the other connections
separately, which is error-prone and has actually been forgotten for the
case where the QWebSocket is created via upgradeFrom().

Task-number: QTBUG-39551
Change-Id: I4d1e4faa1594b53e7a8dccc9ce13ef2c323b1c61
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoCompile fix without proxy support
Maurice Kalinowski [Mon, 7 Jul 2014 11:19:50 +0000 (13:19 +0200)]
Compile fix without proxy support

This is required for for the autotests to compile.

Change-Id: I8cd1ad11ca5d28e2d1ade06649cf6c2e1eee9a2c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
(cherry picked from commit aef4cba4ce5f3acfa6765c71283d9363dffe97b7)

10 years agoAlso forward the bytesWritten(qint64) signal
Peter Kümmel [Sat, 20 Sep 2014 06:23:03 +0000 (08:23 +0200)]
Also forward the bytesWritten(qint64) signal

The signal bytesWritten(qint64) is part of the public API
and should be emitted. Seems it was just forgotten.

Change-Id: I85a56c22581c6bd3ecc504add34aeeabc76f4d2a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoUpdate the plugins.qmltypes meta data.
Milian Wolff [Thu, 3 Jul 2014 11:31:01 +0000 (13:31 +0200)]
Update the plugins.qmltypes meta data.

I forgot to do this when I introduced the QQmlWebSocketServer.

Change-Id: I7fd7354cf42f633973e0da71d854594627e2fb97
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
10 years agoImprove the integration of QtWebsockets into general Qt docs v5.4.0-beta1
Alex Blasche [Fri, 26 Sep 2014 10:06:10 +0000 (12:06 +0200)]
Improve the integration of QtWebsockets into general Qt docs

1.) The websocket qml types page is now hooked into Qt's QML Type by Module
page.

2.) Correct incorrectly documented import statement for Qt.WebSockets
module in QML.

3.) Add missing \since tags (see QTBUG-36775).

Change-Id: I1321db70215fcd16cfbd77dd71a459244241d8a3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Frederik Gladhorn [Tue, 16 Sep 2014 13:29:54 +0000 (15:29 +0200)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Conflicts:
.qmake.conf

Change-Id: Ib38d0c86aa010b06b9a201115dfbc9f091abeb0e

10 years agoFix QWebSocketServer for clients preferring lowercase http headers.
Jorma Tähtinen [Wed, 6 Aug 2014 13:12:54 +0000 (16:12 +0300)]
Fix QWebSocketServer for clients preferring lowercase http headers.

QWebSocketServer should not use case-sensitive compare to validate
http headers for incoming connections.

Change-Id: Ie7b8a9f6ca1a0b547eb7a924f6392395f812b0e3
Task-number: QTBUG-40615
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
10 years agoBump version
Frederik Gladhorn [Fri, 29 Aug 2014 09:33:48 +0000 (11:33 +0200)]
Bump version

Change-Id: I7da486fc6640df27695971c70bbb50a842b9cca2

10 years agoUpdate license headers and add new license files v5.4.0-alpha1
Antti Kokko [Thu, 21 Aug 2014 10:30:56 +0000 (13:30 +0300)]
Update license headers and add new license files

- Added LICENSE.LGPLv3, LICENSE.GPLv2 & LICENSE.LGPLv21

Change-Id: I0586e35a7aa99be1b5b3bda580b05897f451acbf
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
10 years agoFix build with non-OpenSSL SSL-enabled backends
Andrew Knight [Wed, 13 Aug 2014 05:41:16 +0000 (08:41 +0300)]
Fix build with non-OpenSSL SSL-enabled backends

Qt 5.4 introduced the ability to split out the OpenSSL-specific parts
of SSL, so allow users of this configuration to still build the SSL
server.

Change-Id: I03e446c1c0fa4062afe16e58d1b7a80373da12a6
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
10 years agoWinRT: Fix compiler crash (msvc2013 arm)
Maurice Kalinowski [Tue, 12 Aug 2014 12:55:11 +0000 (14:55 +0200)]
WinRT: Fix compiler crash (msvc2013 arm)

Visual Studio 2013 Update 3 ARM compiler has issues with the code path
trying to optimize it. Instead of disabling optimization in general,
use a pragma for the function. x86 compilation is fine though.

Change-Id: If099f7d1400cb78958d10c2fd35daef3bb75fc91
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
10 years agoremove some pointless noise from project files
Oswald Buddenhagen [Thu, 7 Aug 2014 11:59:35 +0000 (13:59 +0200)]
remove some pointless noise from project files

Change-Id: I69b07bfdb69ec4f9ad8c7bf0e6fc327b76113de6
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
10 years agoremove custom module pri file
Oswald Buddenhagen [Thu, 7 Aug 2014 11:59:42 +0000 (13:59 +0200)]
remove custom module pri file

that's been deprecated since the 5.0 release or so.

Change-Id: Icbb9f375261a79b708cce4b6e2a70f71140de1d4
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
10 years agoMerge remote-tracking branch 'origin/5.3' into dev
Frederik Gladhorn [Mon, 14 Jul 2014 08:27:24 +0000 (10:27 +0200)]
Merge remote-tracking branch 'origin/5.3' into dev

Conflicts:
src/imports/qmlwebsockets/qqmlwebsocket.h

Change-Id: Ib883a07eb1784743adca7a0c38fd156800354f4b

10 years agoUse 0 instead of Q_NULLPTR in public headers. v5.3.2
Sergio Martins [Tue, 8 Jul 2014 10:11:52 +0000 (11:11 +0100)]
Use 0 instead of Q_NULLPTR in public headers.

Otherwise Q_NULLPTR appears in documentation, which is inconsistent.

Change-Id: I0f4b07b25c6012d502938aa452e68c75d910f954
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoCompile fix without proxy support
Maurice Kalinowski [Mon, 7 Jul 2014 11:19:50 +0000 (13:19 +0200)]
Compile fix without proxy support

Change-Id: I8cd1ad11ca5d28e2d1ade06649cf6c2e1eee9a2c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
10 years agoDoc: Removing url variable from qdocconf file.
Jerome Pasion [Fri, 4 Jul 2014 12:52:42 +0000 (14:52 +0200)]
Doc: Removing url variable from qdocconf file.

-url inherited from the url variable set in qtbase/doc/global

Change-Id: I55312f10a949dc75fdfbf644631fc844afc29329
Reviewed-by: Martin Smith <martin.smith@digia.com>
10 years agoAdd initial support for a declarative WebSocketServer.
Milian Wolff [Fri, 21 Mar 2014 13:49:00 +0000 (14:49 +0100)]
Add initial support for a declarative WebSocketServer.

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>
10 years agoMerge remote-tracking branch 'origin/5.3' into dev
Frederik Gladhorn [Thu, 26 Jun 2014 15:29:10 +0000 (17:29 +0200)]
Merge remote-tracking branch 'origin/5.3' into dev

Conflicts:
.qmake.conf

Change-Id: Idce64ab613c4e07ffb38cac4115690b885f110f2

10 years agoFix a typo in proxy handling.
Jędrzej Nowacki [Tue, 24 Jun 2014 12:32:33 +0000 (14:32 +0200)]
Fix a typo in proxy handling.

Change-Id: I25c9b9be2c780dae32e3f634f58e44be303a4b23
Task-number: QTBUG-39568
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoBump version
Oswald Buddenhagen [Tue, 17 Jun 2014 22:37:06 +0000 (00:37 +0200)]
Bump version

Change-Id: I509b98fb944d007cc1e2727e5b6fa8661767c1a6

10 years agoMerge remote-tracking branch 'origin/5.3' into dev
Sergio Ahumada [Sat, 14 Jun 2014 19:51:30 +0000 (21:51 +0200)]
Merge remote-tracking branch 'origin/5.3' into dev

Conflicts:
.qmake.conf

Change-Id: I8ef1da19810c1bf4d68bf157848bccb5446669cc

10 years agoDoc: Fix qmlclass selector used in documentation config
Topi Reinio [Wed, 11 Jun 2014 15:15:57 +0000 (17:15 +0200)]
Doc: Fix qmlclass selector used in documentation config

A recent change (46959875) in qdoc raised QML types from
subnodes to top-level nodes. This change modifies the
documentation configuration file(s) accordingly.

Change-Id: I558f00483b4f2efaa12c94066e309f46ea6e9b42
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
10 years agoAdd a QUrl serverUrl method to QWebSocketServer.
Milian Wolff [Fri, 21 Mar 2014 15:10:09 +0000 (16:10 +0100)]
Add a QUrl serverUrl method to QWebSocketServer.

It is useful in many places, esp. when constructing clients that
should connect to the server we created.

Note that the returned host address will be LocalHost instead of Any,
to make sure clients can connect to the server even on Windows.
This should hopefully resolve the CI issues.

Change-Id: I3c400ad4d785ea398cf1a1bd113c0833fda9e3bd
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoRemove dependency on unused sql module
Fatih Aşıcı [Tue, 20 May 2014 13:15:43 +0000 (16:15 +0300)]
Remove dependency on unused sql module

Change-Id: I102bcb81ec53d022480e81a3632b93d42bf33403
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Davide Pesavento <davidepesa@gmail.com>
10 years agoBump MODULE_VERSION to 5.3.1 v5.3.1
Sergio Ahumada [Mon, 26 May 2014 09:36:35 +0000 (11:36 +0200)]
Bump MODULE_VERSION to 5.3.1

Change-Id: I1eff9112ed777d873961854b3f81a00d34cb3e1f
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
10 years agoDocument WebSocket::sendTextMessage(string message)
Richard Moe Gustavsen [Tue, 20 May 2014 13:01:53 +0000 (15:01 +0200)]
Document WebSocket::sendTextMessage(string message)

Change-Id: I38c08520c37d84570c3c8df9d2416131defc5b40
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoMerge remote-tracking branch 'origin/release' into stable
Frederik Gladhorn [Wed, 14 May 2014 10:40:46 +0000 (12:40 +0200)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I9de811ee1f43381b6ce27acd47a126a70fd10d46

10 years agoAdd missing classname for module in qmldir. v5.3.0
Frederik Gladhorn [Thu, 8 May 2014 16:38:22 +0000 (18:38 +0200)]
Add missing classname for module in qmldir.

Task-number: QTBUG-38854
Change-Id: Iad6d49309010fd9ccb7e8fcb2c58962d811f018f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoCopy the more efficient HTTP header parser from QtNetwork
Thiago Macieira [Thu, 8 May 2014 06:04:52 +0000 (23:04 -0700)]
Copy the more efficient HTTP header parser from QtNetwork

The one from QtNetwork is more efficient, since it doesn't use regular
expressions. This also solves a use of uninitialised variables.

error: ‘httpStatusCode’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: Id7f203d971564651eb0bd63d3d54d074be947793
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoRemove superfluous qWarning statements
Kurt Pattyn [Wed, 9 Apr 2014 07:09:51 +0000 (09:09 +0200)]
Remove superfluous qWarning statements

Change-Id: I3a6f9881cbd19f409f6d345fde640b9899dad196
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
10 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Fri, 11 Apr 2014 12:17:49 +0000 (14:17 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Iff68a7da2065b64579032f1be8eaf5fb097d58bb

10 years agoUse correct casing for WebSocket v5.3.0-rc1
Kurt Pattyn [Wed, 9 Apr 2014 07:12:00 +0000 (09:12 +0200)]
Use correct casing for WebSocket

Change-Id: Ifbce704186a76b57a4b557b6fc6bfda004517800
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoFix process handshake for servers preferring lowercase http headers.
Jędrzej Nowacki [Tue, 8 Apr 2014 17:19:27 +0000 (17:19 +0000)]
Fix process handshake for servers preferring lowercase http headers.

Task-number: QTBUG-37975
Change-Id: I81225a870aa92350e959b741aec34332eb8d171e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoUse the proper protocol names
Sze Howe Koh [Wed, 2 Apr 2014 12:18:13 +0000 (20:18 +0800)]
Use the proper protocol names

- "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>
10 years agoFix compilation on QNX
Sergio Ahumada [Wed, 2 Apr 2014 09:37:55 +0000 (11:37 +0200)]
Fix compilation on QNX

Add Q_DECL_NOEXCEPT to 'bool seed()' and 'quint32 nextMask()'

  qdefaultmaskgenerator_p.cpp:93:34: error: declaration of 'virtual bool QDefaultMaskGenerator::seed()' has a different exception specifier
  qdefaultmaskgenerator_p.h:69:10: error: from previous declaration 'virtual bool QDefaultMaskGenerator::seed() noexcept (true)'
  qdefaultmaskgenerator_p.cpp:104:41: error: declaration of 'virtual quint32 QDefaultMaskGenerator::nextMask()' has a different exception specifier
  qdefaultmaskgenerator_p.h:70:13: error: from previous declaration 'virtual quint32 QDefaultMaskGenerator::nextMask() noexcept (true)'

Change-Id: Iae49a060fa62a33f629cadc1a0100653a12432f7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
10 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Mon, 24 Mar 2014 15:08:59 +0000 (16:08 +0100)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I7215c289188462383799269aa9b736ae76db4d25

10 years agoDoc: Fix example path in documentation config v5.3.0-beta1
Topi Reinio [Fri, 21 Mar 2014 12:32:53 +0000 (13:32 +0100)]
Doc: Fix example path in documentation config

Task-number: QTBUG-37643
Change-Id: Ifce8f4016c70642a7ae344b0bab463eb201460df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
10 years agoMove examples into 'websockets' folder
Kai Koehne [Wed, 19 Mar 2014 15:45:42 +0000 (16:45 +0100)]
Move examples into 'websockets' folder

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>
10 years agoDoc: small fix in documentation
Kurt Pattyn [Wed, 19 Mar 2014 15:22:58 +0000 (16:22 +0100)]
Doc: small fix in documentation

Change-Id: If7c0e3f33c8c73695492511ff51ab58f4a7863d0
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoRemove unused variable
Kurt Pattyn [Mon, 17 Mar 2014 16:55:50 +0000 (17:55 +0100)]
Remove unused variable

Change-Id: I534878275ea39a28f684c3edac414d647743da69
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
10 years agofix compilation with QT_NO_NETWORKPROXY
Maurice Kalinowski [Mon, 17 Mar 2014 14:34:35 +0000 (15:34 +0100)]
fix compilation with QT_NO_NETWORKPROXY

Change-Id: Ice7ad51cbbde0ef2459642309c32dd392463754d
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
10 years agofix typo in macro
Maurice Kalinowski [Mon, 17 Mar 2014 13:06:27 +0000 (14:06 +0100)]
fix typo in macro

Change-Id: Ib302db81e0667d0c89c1da8611639db0811ff9f3
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoDoc: Language/writ. guidelines review Qt WebSockets
Nico Vertriest [Wed, 12 Mar 2014 13:47:17 +0000 (14:47 +0100)]
Doc: Language/writ. guidelines review Qt WebSockets

Task-number: QTBUG-37149
Change-Id: Ic0c28928404fc515de40e6fdff11849cdb2929d6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoDoc: Add generic thumbnails for the examples
Topi Reinio [Fri, 14 Mar 2014 08:34:37 +0000 (09:34 +0100)]
Doc: Add generic thumbnails for the examples

As the examples do not have any images in their documentation,
no thumbnails are generated.

This change adds generic 'Qt Code Sample' thumbnails for the
examples, ensuring that they are listed in Qt Creator's
example list.

Change-Id: I40d3c69e9cebad72997d82eba0758c63c146aea7
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoDoc: Move and edit examples page
Topi Reinio [Thu, 13 Mar 2014 14:22:36 +0000 (15:22 +0100)]
Doc: Move and edit examples page

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>
10 years agoBump module version to 5.4.0
Sergio Ahumada [Thu, 13 Mar 2014 13:50:57 +0000 (14:50 +0100)]
Bump module version to 5.4.0

Change-Id: I6877931d5ad82310b7ae9d9553bdd8d0f091d340
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
10 years agoMerge remote-tracking branch 'origin/stable' into dev
Sergio Ahumada [Thu, 13 Mar 2014 13:50:03 +0000 (14:50 +0100)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I0ee590f834200c488498315e66acf7cd046d43ad

10 years agoAdd warning to example regarding ignoring ssl errors
Kurt Pattyn [Wed, 12 Mar 2014 13:53:00 +0000 (14:53 +0100)]
Add warning to example regarding ignoring ssl errors

Change-Id: I3d615a774f4071a085b0f233bef2eac76aefbefb
Reviewed-by: Richard J. Moore <rich@kde.org>
10 years agoFix unit tests
Kurt Pattyn [Wed, 12 Mar 2014 13:16:08 +0000 (14:16 +0100)]
Fix unit tests

Change-Id: I24091b8b976b30e8d6ef26f41530027339106243
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoFix for self-signed certificates
Kurt Pattyn [Wed, 12 Mar 2014 10:23:24 +0000 (11:23 +0100)]
Fix for self-signed certificates

Change-Id: I529976e6fc8813d273290e97e86405f51c3efa57
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoCleanup header file
Kurt Pattyn [Wed, 12 Mar 2014 10:30:50 +0000 (11:30 +0100)]
Cleanup header file

Change-Id: I6dade8485daec571e6b1bb844e3320ce3cb00fdb
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoReturn correct error string for known socket errors
Kurt Pattyn [Sun, 9 Mar 2014 10:05:36 +0000 (11:05 +0100)]
Return correct error string for known socket errors

Task-number: QTBUG-37228
Change-Id: I246b858694ea456bce9a0fc4ac963a83502fd058
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoUpdate documentation.
Kurt Pattyn [Sun, 9 Mar 2014 12:11:58 +0000 (13:11 +0100)]
Update documentation.

Change-Id: I8fca0df0ea66adba0898d95f8249ea1b7f33892a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoDoc: Review documentation Qt WebSockets
Nico Vertriest [Fri, 28 Feb 2014 11:31:13 +0000 (12:31 +0100)]
Doc: Review documentation Qt WebSockets

Task-number: QTBUG-37149

Change-Id: Ia8fe7b11140d31bc231a17bfcc16887f3af0dbce
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoFix documentation warnings
Kurt Pattyn [Sun, 9 Mar 2014 11:33:26 +0000 (12:33 +0100)]
Fix documentation warnings

Change-Id: I5790460aab2377144d041c5b2a75ae0208ec5c00
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoCleanup header
Kurt Pattyn [Sun, 9 Mar 2014 11:41:49 +0000 (12:41 +0100)]
Cleanup header

Change-Id: Ib81683e84192a19ca660a7413ee0fcbd69909768
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoFix Google Chrome connection problem
Kurt Pattyn [Sun, 16 Feb 2014 12:53:29 +0000 (13:53 +0100)]
Fix Google Chrome connection problem

Task-number: QTBUG-36757
Change-Id: I6a802e93e28b6281fe03aacf001897003310a027
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
10 years agoMake the constructor explicit
Sergio Ahumada [Sat, 1 Mar 2014 16:10:22 +0000 (17:10 +0100)]
Make the constructor explicit

Change-Id: I6dcd225de9fee909c4cd1afa70938c2eb7ff819a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoUse const & for your foreach variables
Sergio Ahumada [Sat, 1 Mar 2014 16:16:43 +0000 (17:16 +0100)]
Use const & for your foreach variables

Change-Id: I6096111284f02f07e1e7864b8795236563d4f6c1
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoPrefer to use normalised signal/slot signatures
Sergio Ahumada [Sat, 1 Mar 2014 16:22:51 +0000 (17:22 +0100)]
Prefer to use normalised signal/slot signatures

Change-Id: I92322fc3404795bea8442b9b849564d5cd39b367
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoAdd .tag file and the git-archive export options
Sergio Ahumada [Fri, 28 Feb 2014 14:29:20 +0000 (15:29 +0100)]
Add .tag file and the git-archive export options

The .gitattributes and .gitignore files do not need to be present in
packaged sources, as they are for people using the Git repository.

Change-Id: I37f69ce0dfbc25592c149118137398f96cdeb117
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
10 years agoDoc: Fixed missing line separators in qdocconf file. v5.3.0-alpha1
Jerome Pasion [Fri, 21 Feb 2014 09:50:13 +0000 (10:50 +0100)]
Doc: Fixed missing line separators in qdocconf file.

-needed to get the documentation to build.

Task-number: QTBUG-33360
Change-Id: Ifed61ebb39843936ac3e350f26f6accffda78318
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoRemove superfluous setProtocol call
Kurt Pattyn [Sun, 16 Feb 2014 13:03:04 +0000 (14:03 +0100)]
Remove superfluous setProtocol call

Change-Id: I14f16bbe0a68602265a28d71464727b671be5099
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoCatch SSL errors in example
Kurt Pattyn [Sun, 16 Feb 2014 13:01:28 +0000 (14:01 +0100)]
Catch SSL errors in example

Change-Id: Ib9a399789878030361d9bdddd8dbfbb1832cf756
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoMark html page as being utf-8
Kurt Pattyn [Sun, 16 Feb 2014 12:59:29 +0000 (13:59 +0100)]
Mark html page as being utf-8

FireFox complained when opening the page without proper indication of the
encoding.

Change-Id: I4f0891699c72d46bcf0cd488e2ecaf095514fabc
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoFix non-strict warning from AutoBahn
Kurt Pattyn [Sun, 16 Feb 2014 11:24:41 +0000 (12:24 +0100)]
Fix non-strict warning from AutoBahn

When the reserved bits were set to 3, then the connection was aborted.
No a close message is sent before the connection is closed.

Change-Id: Iab365a4720c6588e5c6ac73813f63d26c3312265
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoRename websockets.pro -> qtwebsockets.pro
Sergio Ahumada [Fri, 14 Feb 2014 20:43:32 +0000 (21:43 +0100)]
Rename websockets.pro -> qtwebsockets.pro

Change-Id: Ia42316304a37d151b678a9922071bbb090ec87b5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoAdapt copyright header
Kurt Pattyn [Fri, 14 Feb 2014 12:16:34 +0000 (13:16 +0100)]
Adapt copyright header

Change-Id: I9773492d3673d8aabdb4dd178be6af12eca7ba74
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoAdd user configurable mask generation
Kurt Pattyn [Wed, 12 Feb 2014 14:17:58 +0000 (15:17 +0100)]
Add user configurable mask generation

Created a QMaskGenerator abstract base class to serve as a basis for
user specific mask generators. Added the possibility to override the
default mask generation in QWebSocket.

Change-Id: Iaa02b44193f854d103b5f352617789175fe61f89
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoFix multiple emission of received signals
Kurt Pattyn [Thu, 13 Feb 2014 21:00:27 +0000 (22:00 +0100)]
Fix multiple emission of received signals

Task-number: QTBUG-36762
Change-Id: I239bdd06252fb90056a687ace8540bb91b0055a1
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoUse queued connection for readyRead connection
Kurt Pattyn [Thu, 13 Feb 2014 21:38:02 +0000 (22:38 +0100)]
Use queued connection for readyRead connection

Task-number: QTBUG-36757
Change-Id: I4358563d52ecbff7b7e1575c5d34cef30b5fcd52
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoRemove checks on return value of sendXXX methods
Kurt Pattyn [Thu, 13 Feb 2014 21:05:26 +0000 (22:05 +0100)]
Remove checks on return value of sendXXX methods

Change-Id: If70aa381e377b832f0b44af97e19abf98f3941eb
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoSimplify simple chat example
Jędrzej Nowacki [Tue, 11 Feb 2014 09:21:36 +0000 (10:21 +0100)]
Simplify simple chat example

Change-Id: Ia4e6973e6531017129ae39c89851fbbf3ade76c4
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoCheck on newline characters in origin and urls
Kurt Pattyn [Mon, 10 Feb 2014 20:33:25 +0000 (21:33 +0100)]
Check on newline characters in origin and urls

New line characters (\r\n) in the resource part of a url and in the origin
string can be used to forge the http header and can lead to insertion of
unwanted header entries. This can be an indication of an attack,
so QWebSocket immediately refuses a connection.

Change-Id: I9cdb309bfbe7025ad675925e6ea3e038476a1fd6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
10 years agoSimplify echoclient example
Jędrzej Nowacki [Tue, 11 Feb 2014 09:14:12 +0000 (10:14 +0100)]
Simplify echoclient example

Change-Id: I773665754089c1f4548712df280289c77d45eba9
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoRe-enable QML component
Kurt Pattyn [Fri, 7 Feb 2014 17:47:43 +0000 (18:47 +0100)]
Re-enable QML component

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>
10 years agoRemove superfluous argument
Kurt Pattyn [Sun, 9 Feb 2014 09:24:18 +0000 (10:24 +0100)]
Remove superfluous argument

Change-Id: I7fa01d47d66411572f3f66f4ed5d8df04ac6b8b0
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoSanitize open() method
Kurt Pattyn [Fri, 7 Feb 2014 17:06:58 +0000 (18:06 +0100)]
Sanitize open() method

Removed the mask parameter because a web socket client does not have
a choice between masking and not masking.

Change-Id: I3c33acc235bb2a99476abb6201e6dbb6f881dd70
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoConnect sslErrors signal when a secure connection is established
Kurt Pattyn [Thu, 6 Feb 2014 18:58:09 +0000 (19:58 +0100)]
Connect sslErrors signal when a secure connection is established

Task-number: QTBUG-36676
Change-Id: Ia93751e5a972adf6434b0d749376e2a8c0619514
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoFix tst_QWebSocket::tst_invalidOpen for catch-all DNS setups.
Milian Wolff [Thu, 6 Feb 2014 17:02:04 +0000 (18:02 +0100)]
Fix tst_QWebSocket::tst_invalidOpen for catch-all DNS setups.

Instead of relying on a hostname which might still be resolved in
some DNS setups (i.e. always forward to google search or intranet),
we now try to connect to localhost port 1 which should yield a
ConnectionRefusedError.

This way, the test passes for me on my setup.

Change-Id: I025824796e94e718a42c4999706f647a72b37659
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoDo not double-delete the TCP socket of a QWebSocket.
Milian Wolff [Thu, 6 Feb 2014 16:48:28 +0000 (17:48 +0100)]
Do not double-delete the TCP socket of a QWebSocket.

The socket is put into an owning QScopedPointer. But if its also
put into the QObject parent-child chain, it will get deleted when
the QWebSocket is destroyed. In the dtor of the QWebSocketPrivate
class m_pSocket will thus already be destroyed and thus be a
dangling pointer.

This crashed the QWebSocketServer test reliably for me on exit.

Change-Id: I7f06e933bfed832e66b943542c351cde639c9465
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoDo not try to invoke/emit signal on shutdown.
Milian Wolff [Thu, 6 Feb 2014 16:42:05 +0000 (17:42 +0100)]
Do not try to invoke/emit signal on shutdown.

I'm actually not sure whether this is the right way to do this,
but when the object is destroyed, we cannot delay the signal emit.
In that case, we just don't emit it at all. This is the old behavior
minus the warning:

QWARN  : tst_QWebSocketServer::tst_initialisation()
QMetaObject::invokeMethod: No such method QObject::closed()

Change-Id: I0513dd693ef7bfc43621e24361e72e90204fbea3
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoFix assertion when encountering invalid header line.
Milian Wolff [Thu, 6 Feb 2014 16:40:24 +0000 (17:40 +0100)]
Fix assertion when encountering invalid header line.

The server test sets an empty identifier which results in a
headerLine containing "Server: ". The split then yields a list
with a single entry ("Server"). Calling [1] on it asserts then.

QFATAL : tst_QWebSocketServer::tst_connectivity()
 ASSERT failure in QList<T>::operator[]: "index out of range", file
/ssd/milian/projects/compiled/qt5/include/QtCore/qlist.h, line 476

Change-Id: I3e5c4750b304b2a4a5669a39e2d65a6b3e4e99cf
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoDo not access QObject API before its private data is initialized.
Milian Wolff [Thu, 6 Feb 2014 16:30:55 +0000 (17:30 +0100)]
Do not access QObject API before its private data is initialized.

Inside the ctor of the private data, the QObject has not yet
been associated with the data. Thus, accessing it indirectly i.e.
to setup private signal/slot connections, will trigger crashes.

Now we delay accessing this API and call an init() function manually
in the parent QObject-inheriting class.

Change-Id: I2c3ce7335c54d42af6bce87de867ee0ef197efc6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoFix compilation of websocketprotocol test.
Milian Wolff [Thu, 6 Feb 2014 13:46:30 +0000 (14:46 +0100)]
Fix compilation of websocketprotocol test.

The versionFromString method must be exported for usage in the test.
Additionally, the metatype of the version enum must be declared.

Change-Id: I8e0aef28f9902f274cab43f772667ad5a93c4062
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoUse QObjectPrivate instead of dedicated d-ptr
Kurt Pattyn [Tue, 4 Feb 2014 11:29:40 +0000 (12:29 +0100)]
Use QObjectPrivate instead of dedicated d-ptr

Change-Id: I3f69a2b0ca81e1e003200bb8e0a337b9532e64a0
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoReplace delete loop with qDeleteAll
Kurt Pattyn [Mon, 3 Feb 2014 00:34:46 +0000 (01:34 +0100)]
Replace delete loop with qDeleteAll

Change-Id: If63acc08307c0a411072a2a37ac52661e7e02594
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
10 years agoRemove superfluous Q_REQUIRED_RESULT
Kurt Pattyn [Mon, 3 Feb 2014 00:40:33 +0000 (01:40 +0100)]
Remove superfluous Q_REQUIRED_RESULT

Change-Id: Ie4e01a82082c45918b55e8588c7322dd359ba8c1
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoComment out QML component
Kurt Pattyn [Sun, 2 Feb 2014 00:08:49 +0000 (01:08 +0100)]
Comment out QML component

Commented out QWebSocket QML component because there is
still discussion regarding its API.

Change-Id: I9a0699e19186f7e9761517fd127ac8a5263c745f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
10 years agoAdd cleanup to examples
Kurt Pattyn [Sun, 2 Feb 2014 22:38:45 +0000 (23:38 +0100)]
Add cleanup to examples

Change-Id: I28b9007a6d35575b11a608645930fa2ed71e7c7c
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
10 years agoUpdate documentation
Kurt Pattyn [Sun, 2 Feb 2014 22:39:25 +0000 (23:39 +0100)]
Update documentation

Change-Id: I2fb9b20fc316b8b9ed0e1c0b52c4e44882d7f9d5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>