Steven Ceuppens [Mon, 30 Sep 2013 09:10:01 +0000 (11:10 +0200)]
Update to fix minor compiler warnings
Change-Id: I9b8e4cb5ad174faaf7d8c32a00a0b4b4c66edb68
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 29 Sep 2013 18:53:22 +0000 (20:53 +0200)]
Uncommented data processor from auto.pro
Change-Id: Ia04d205ecf5fa86b7be577536c77414cfb06ebbc
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
Kurt Pattyn [Sun, 29 Sep 2013 18:52:58 +0000 (20:52 +0200)]
Include qwebsocketdataprocessor iso dataprocessor
Change-Id: Ic522190a929c8f86ab364cc52cc0afeadb0fcc44
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
Steven Ceuppens [Sun, 29 Sep 2013 18:41:29 +0000 (20:41 +0200)]
moved class to separate file
As QWebSocketFrame is quite big, i moved it into its own file, for futher implementation:wq
Change-Id: Iadf51323d5e8151c8345057614f4c49f81e626b1
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Steven Ceuppens [Sun, 29 Sep 2013 17:56:37 +0000 (19:56 +0200)]
update _global file, to match Qt default
Change-Id: I4bbf6bd60abd93bd18947b8d2a9d42784aaea10b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Steven Ceuppens [Sun, 29 Sep 2013 17:47:27 +0000 (19:47 +0200)]
removed unused includes
Change-Id: I7b934942c77b1da566acf77dc46521975c3ecba4
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Steven Ceuppens [Sun, 29 Sep 2013 17:51:49 +0000 (19:51 +0200)]
whitesapce updates
Change-Id: I3e7feb9123868c558e5500c2142774df54afdfc6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Steven Ceuppens [Sun, 29 Sep 2013 17:21:55 +0000 (19:21 +0200)]
update class & filenames
Change-Id: Idd2caa074f2f3feba99714bf6927ca879809ad47
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Steven Ceuppens [Sun, 29 Sep 2013 17:22:54 +0000 (19:22 +0200)]
remove declaration, only Qt5 will be supported
Change-Id: I4e1c4b0948aca2fa76b2ebec2163ed1fc82d8154
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Steven Ceuppens [Sun, 29 Sep 2013 16:30:25 +0000 (18:30 +0200)]
reorganized unittests & added module pri
Change-Id: Ib1aa45f7cc07ea4564b0e5f1315273a2526a4e74
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 29 Sep 2013 15:57:48 +0000 (17:57 +0200)]
Replaced foreach calls with iterators
Removed commented out lines
Change-Id: Ieccf43a4bb6b06b62acb347777b5481846144d14
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
Kurt Pattyn [Sun, 29 Sep 2013 14:54:29 +0000 (16:54 +0200)]
Added const keyword to const variables
Change-Id: I470d9bebbb86645ca766804e1005f3cb85256b38
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
Kurt Pattyn [Sun, 29 Sep 2013 15:20:03 +0000 (17:20 +0200)]
Added const to const variables, added QStringLiteral
Removed whitespace again to make sanity bot happy
Change-Id: Ifb0ae2566af73759593b2c46ec9cf4c93d6f3fcc
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
Kurt Pattyn [Sun, 29 Sep 2013 14:59:57 +0000 (16:59 +0200)]
Removed unused constant declaration
Change-Id: Iee07585470404281daae768c2db745b65b036dba
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
Kurt Pattyn [Sun, 29 Sep 2013 14:43:17 +0000 (16:43 +0200)]
Replaced fromLatin1() with QStringLiteral
Replaced tabs with spaces
Change-Id: Ice5adcf10bc7294852661f64c41836f8c97275bc
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
Kurt Pattyn [Sun, 29 Sep 2013 13:13:08 +0000 (15:13 +0200)]
Replace string literals with QString::fromLatin1() expression
to avoid deprecated warning (since Qt 5.1.1)
Replaced fromLatin1() with QStringLiteral
Change-Id: I0602cbe905310796357af97c8310dad6346c5f73
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
Kurt Pattyn [Sun, 29 Sep 2013 12:39:19 +0000 (14:39 +0200)]
Replace string literals with QString::fromLatin1() expression, to avoid deprecated warning (since Qt 5.1.1)
Change-Id: Ie0c6218aae2eb829aa90b15f042e032a2c8a3d88
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 29 Sep 2013 12:29:02 +0000 (14:29 +0200)]
Replace string literals with QString::fromLatin1() expression, to avoid deprecated warning (since Qt 5.1.1)
Change-Id: I01cec0e4e168815e486945afb03dd8f1ec2e949b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Steven Ceuppens [Fri, 27 Sep 2013 12:27:27 +0000 (14:27 +0200)]
Changes to integrate the websocket module as a full Qt Add-On module
- Changed project files to use Qt structure
- Moved existing sources into subdirectory, to make room for moduels
- Created a "import/qmlwebsocket" module skeleton (works, but needs to be extended)
- Modified examples to not use "include(.pri)", but use "QT += websocket"
- Added qml example skeleton (works, but no useful functionality yet)
Project can be build with:
$ qmake
$ make
$ make install
Module can be used in other projects with
QT += websockets
Change-Id: I2123026958b264670dbf8a978dee76edf5855806
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Sergio Ahumada [Sat, 28 Sep 2013 12:42:31 +0000 (14:42 +0200)]
tests: Enable "make check" to run unit tests
Change-Id: I8333e7a19d937003f16a02d4e10e1a542150d63f
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Sergio Ahumada [Sat, 28 Sep 2013 12:53:37 +0000 (14:53 +0200)]
Update .gitignore
Add mkspecs/ include/ and lib/ to the ignore list
Change-Id: Ifad1eb78e3bd1b2b825a30a31df325e836c77e3e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 28 Sep 2013 11:11:22 +0000 (13:11 +0200)]
Added TODOs for extra tests
Change-Id: I816d9adf686106443fe65df499f6615eca4599c5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Sergio Ahumada [Wed, 25 Sep 2013 18:07:38 +0000 (20:07 +0200)]
Update .gitignore file
Change-Id: I2093ea60192aff6c82a4815cec472d4b23e8961f
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Sergio Ahumada [Wed, 25 Sep 2013 17:55:41 +0000 (19:55 +0200)]
sync.profile: Remove qtnetwork from %dependencies
qtnetwork is not a repository, so it doesn't make sense here.
Change-Id: I679df09f47b3996a3c1157b500f1d0381a61398d
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Fri, 6 Sep 2013 15:09:32 +0000 (17:09 +0200)]
There was no '?' between path and query. Bug detected by someone on the internet.
Kurt Pattyn [Sun, 1 Sep 2013 17:40:27 +0000 (19:40 +0200)]
Open buffer in readonly mode iso readwrite mode
Kurt Pattyn [Sun, 1 Sep 2013 17:33:44 +0000 (19:33 +0200)]
Corrected failing tests
Kurt Pattyn [Sun, 1 Sep 2013 11:54:04 +0000 (13:54 +0200)]
Added checks for non-emitting of other signals than the one we expect
Kurt Pattyn [Sun, 1 Sep 2013 11:53:26 +0000 (13:53 +0200)]
Added tests for valid and invalid close codes
Added tests for invalid UTF8 sequences in close frames
Kurt Pattyn [Sun, 1 Sep 2013 11:49:00 +0000 (13:49 +0200)]
Added maxMessageSize() and maxFrameSize() static getters to aid in unit testing
Kurt Pattyn [Sun, 1 Sep 2013 11:36:54 +0000 (13:36 +0200)]
Update README.md
Kurt Pattyn [Sat, 31 Aug 2013 18:57:26 +0000 (20:57 +0200)]
Added payload to ping() method and pong() signal
Kurt Pattyn [Sat, 31 Aug 2013 18:43:37 +0000 (20:43 +0200)]
Changed the way origins are checked. Instead of a virtual method, we now use a QCorsAuthenticator object and the signal originAuthenticationRequired(). This is modelled after the way QNetworkAccessManager handles authentication.
By using a signal iso of virtual method, applications must not subclass QWebSocketServer anymore to add origin checks.
Kurt Pattyn [Sat, 31 Aug 2013 17:13:36 +0000 (19:13 +0200)]
Added \internal to documentation of new methods
Kurt Pattyn [Sat, 31 Aug 2013 17:09:01 +0000 (19:09 +0200)]
Moved registerMetaType calls to init() method
Kurt Pattyn [Sat, 31 Aug 2013 17:07:32 +0000 (19:07 +0200)]
Moved processing of control frame from QWebSocketPrivate to DataProcessor.
Added closeReceived(), pingReceived() and pongReceived() signals.
Added processClose(), processPing() and processPong() slot to QWebSocketPrivate
Kurt Pattyn [Sat, 31 Aug 2013 17:04:14 +0000 (19:04 +0200)]
Added documentation for internally used classes
Kurt Pattyn [Sat, 31 Aug 2013 16:47:24 +0000 (18:47 +0200)]
Added ordered flag to build in declared order
Kurt Pattyn [Fri, 30 Aug 2013 12:05:28 +0000 (14:05 +0200)]
Added -Wextra compiler check
Kurt Pattyn [Fri, 30 Aug 2013 11:58:40 +0000 (13:58 +0200)]
Added -Wall and -Werror flags when building on mac (is in fact dependent on the compiler that is used; currently don't know how to check that)
Kurt Pattyn [Thu, 29 Aug 2013 19:05:43 +0000 (21:05 +0200)]
Added extra unit tests
Kurt Pattyn [Wed, 28 Aug 2013 22:19:02 +0000 (00:19 +0200)]
Added a bunch of tests (still not complete; listed tests still to be done in TO DO items)
Kurt Pattyn [Wed, 28 Aug 2013 22:18:05 +0000 (00:18 +0200)]
Added TO DO's for tests still to be implemented
Kurt Pattyn [Wed, 28 Aug 2013 22:17:27 +0000 (00:17 +0200)]
Changed error string
Kurt Pattyn [Wed, 28 Aug 2013 22:16:55 +0000 (00:16 +0200)]
Solved comparison bug (detected through unit tests :-) )
Kurt Pattyn [Tue, 27 Aug 2013 22:01:22 +0000 (00:01 +0200)]
Added unit tests for:
- incomplete headers
- invalid headers
- invalid payloads
Kurt Pattyn [Tue, 27 Aug 2013 21:59:53 +0000 (23:59 +0200)]
Headers are ok
Kurt Pattyn [Tue, 27 Aug 2013 21:59:32 +0000 (23:59 +0200)]
Added extra error checks on network reads
Kurt Pattyn [Tue, 27 Aug 2013 21:03:18 +0000 (23:03 +0200)]
Redirect errors to DISPATCH_RESULT state, instead of directly setting isDone=true (makes the code cleaner, but a bit slower on errors)
Kurt Pattyn [Tue, 27 Aug 2013 21:01:19 +0000 (23:01 +0200)]
Added extra checks:
- check on minimum representation of frame length (according RFC 6455 para 5.2)
- extra checks on network read errors
Kurt Pattyn [Mon, 26 Aug 2013 20:43:28 +0000 (22:43 +0200)]
Added dataprocessor test
Kurt Pattyn [Mon, 26 Aug 2013 20:42:26 +0000 (22:42 +0200)]
Corrected type in reserved opcode names
Kurt Pattyn [Mon, 26 Aug 2013 17:04:27 +0000 (19:04 +0200)]
Replaced QTcpSocket * with a QIODevice * to make network independent unit tests possible.
Kurt Pattyn [Mon, 26 Aug 2013 15:39:38 +0000 (17:39 +0200)]
Added accessor and setter for the server name
Kurt Pattyn [Mon, 26 Aug 2013 15:26:39 +0000 (17:26 +0200)]
Replace QWebSocket:: scope with QObject:: in calls to tr()
Kurt Pattyn [Mon, 26 Aug 2013 15:26:10 +0000 (17:26 +0200)]
Removed scope (i.e. QWebSocket) from tr() callls
Kurt Pattyn [Mon, 26 Aug 2013 13:07:08 +0000 (15:07 +0200)]
Implemented Q_D and Q_Q paradigm
Kurt Pattyn [Mon, 26 Aug 2013 13:06:28 +0000 (15:06 +0200)]
Made parameters const references
Kurt Pattyn [Mon, 26 Aug 2013 13:04:52 +0000 (15:04 +0200)]
Removed friend class declaration as it is already contained in the Q_DECLARE_PRIVATE macro
Kurt Pattyn [Mon, 26 Aug 2013 12:15:47 +0000 (14:15 +0200)]
Replaced use of d_ptr and q_ptr with usage of Q_D and Q_Q
Kurt Pattyn [Mon, 26 Aug 2013 11:03:44 +0000 (13:03 +0200)]
Replace QT_BUILD_SERIALPORT_LIB with QT_BUILD_WEBSOCKETS_LIB
Kurt Pattyn [Mon, 26 Aug 2013 11:03:15 +0000 (13:03 +0200)]
Adapted documentation to qDoc style
Kurt Pattyn [Mon, 26 Aug 2013 11:02:48 +0000 (13:02 +0200)]
Disconnect previously connected signal (was forgotten)
Kurt Pattyn [Mon, 26 Aug 2013 11:02:24 +0000 (13:02 +0200)]
Removed default values from methods in private class
Kurt Pattyn [Mon, 26 Aug 2013 11:01:49 +0000 (13:01 +0200)]
Removed virtual from open and close methods
Kurt Pattyn [Mon, 26 Aug 2013 11:01:22 +0000 (13:01 +0200)]
Made accessor methods const; made serverName parameter const in QWebSocket
Kurt Pattyn [Mon, 26 Aug 2013 10:59:26 +0000 (12:59 +0200)]
Added optimised string concatenation (replaced '+' with '%')
Kurt Pattyn [Mon, 26 Aug 2013 10:58:04 +0000 (12:58 +0200)]
Add tr() to translatable strings
Kurt Pattyn [Sun, 25 Aug 2013 20:35:13 +0000 (22:35 +0200)]
Replaced tabs by spaces
Kurt Pattyn [Sun, 25 Aug 2013 19:45:41 +0000 (21:45 +0200)]
Added sync.profile based on that of QtSerialPort
Kurt Pattyn [Sun, 25 Aug 2013 18:44:09 +0000 (20:44 +0200)]
Changed license to LGPL 2.1 (comes from LGPL 3.0)
Kurt Pattyn [Sun, 25 Aug 2013 18:39:13 +0000 (20:39 +0200)]
Added required structure and .pro files to the project
Kurt Pattyn [Sun, 25 Aug 2013 18:38:48 +0000 (20:38 +0200)]
Added dev specific files to ignore list
Kurt Pattyn [Sun, 25 Aug 2013 17:59:22 +0000 (19:59 +0200)]
Cleaned up a bit
Made it analog to serialport qdocconfig
Kurt Pattyn [Sun, 25 Aug 2013 17:58:21 +0000 (19:58 +0200)]
Renamed qwebsocket.pri to qwebsockets.pri
Kurt Pattyn [Sun, 25 Aug 2013 17:28:49 +0000 (19:28 +0200)]
Ignore generated documentation
Kurt Pattyn [Sun, 25 Aug 2013 17:28:20 +0000 (19:28 +0200)]
Adapted copyright disclaimer to be a pure C++ comment
Kurt Pattyn [Sun, 25 Aug 2013 17:27:33 +0000 (19:27 +0200)]
Moved doc directory to src as required by Qt
Kurt Pattyn [Sun, 25 Aug 2013 17:14:09 +0000 (19:14 +0200)]
Added copyright disclaimer to all files
Kurt Pattyn [Sun, 25 Aug 2013 16:54:06 +0000 (18:54 +0200)]
Made documentation qdoc compatible
Kurt Pattyn [Sun, 25 Aug 2013 16:53:43 +0000 (18:53 +0200)]
Added QWebSockets module documentation
Kurt Pattyn [Sun, 25 Aug 2013 16:53:28 +0000 (18:53 +0200)]
Added qdoc configuration file
Kurt Pattyn [Sun, 25 Aug 2013 16:52:51 +0000 (18:52 +0200)]
Removed doxygen configuration files
Kurt Pattyn [Sun, 25 Aug 2013 13:36:43 +0000 (15:36 +0200)]
Cleaned up the project files
Kurt Pattyn [Sun, 25 Aug 2013 13:23:30 +0000 (15:23 +0200)]
Reordered the lines a bit
Kurt Pattyn [Sun, 25 Aug 2013 13:22:54 +0000 (15:22 +0200)]
Added extra signal reemission
Cleaned up unused signals
Kurt Pattyn [Sun, 25 Aug 2013 13:22:23 +0000 (15:22 +0200)]
Added missing functionality after a comparison between QWebSocket and QTcpSocket and between QWebSocketServer and QTcpServer
Kurt Pattyn [Sun, 25 Aug 2013 13:20:05 +0000 (15:20 +0200)]
Added check on QT_NO_NETWORKPROXY to include proxy functionality only when required
Kurt Pattyn [Sun, 25 Aug 2013 13:15:45 +0000 (15:15 +0200)]
Added QT_BEGIN_NAMESPACE and QT_END_NAMESPACE to files
Documented internal classes and methods as \private
Kurt Pattyn [Sun, 25 Aug 2013 13:09:02 +0000 (15:09 +0200)]
Replaced write() methods with send() methods to comply with the QAbstractSocket API
Kurt Pattyn [Sun, 25 Aug 2013 11:48:10 +0000 (13:48 +0200)]
Renamed websocket.pri to qwebsocket.pri
Kurt Pattyn [Sat, 24 Aug 2013 23:04:23 +0000 (01:04 +0200)]
Added warning comment to private header files
Kurt Pattyn [Sat, 24 Aug 2013 22:52:43 +0000 (00:52 +0200)]
Renamed test directory to tests (to be inline with Qt)
Kurt Pattyn [Sat, 24 Aug 2013 22:50:59 +0000 (00:50 +0200)]
Renamed source directory to src (to be in line with Qt)
Kurt Pattyn [Sat, 24 Aug 2013 21:54:01 +0000 (23:54 +0200)]
Removed unnecessary includes
Kurt Pattyn [Sat, 24 Aug 2013 21:52:04 +0000 (23:52 +0200)]
Added cache() command at start of .pro file to avoid qmake warnings in OS X
Kurt Pattyn [Sat, 24 Aug 2013 21:51:30 +0000 (23:51 +0200)]
Added d-pointer paradigm to QWebSocket implementation
Kurt Pattyn [Sat, 24 Aug 2013 20:35:42 +0000 (22:35 +0200)]
Added d-pointer paradigm to QWebSocketServer implementation
Kurt Pattyn [Sat, 24 Aug 2013 19:21:06 +0000 (21:21 +0200)]
Added export statements to public classes
Kurt Pattyn [Sat, 24 Aug 2013 19:16:50 +0000 (21:16 +0200)]
Renamed WebSocket to QWebSocket
Renamed WebSocketProtocol to QWebSocketProtocol
Renamed WebSocketServer to QWebSocketServer
Adapted source files to include renamed headers
Added qwebsocketsglobal.h file