summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-11-06 13:20:16 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 14:15:44 +0100
commit529b9a7cc85f63966c8ed6150ea18286b7459b1e (patch)
treec9156afd8054ddbc1a448ace2ac010c92abaab72
parentef5d3f16d5c18d51a659d5d22ebc0a190e5c9f43 (diff)
downloadqtwebsockets-529b9a7cc85f63966c8ed6150ea18286b7459b1e.tar.gz
Sanitize include directives
Change-Id: I510e5e8f263d3ea08dd3d623b054d06b2911c6d6 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
-rw-r--r--src/websockets/qwebsocket.cpp11
-rw-r--r--src/websockets/qwebsocket.h8
-rw-r--r--src/websockets/qwebsocket_p.cpp1
-rw-r--r--src/websockets/qwebsocketcorsauthenticator_p.h4
-rw-r--r--src/websockets/qwebsocketdataprocessor_p.cpp10
-rw-r--r--src/websockets/qwebsocketdataprocessor_p.h8
-rw-r--r--src/websockets/qwebsocketframe_p.cpp4
-rw-r--r--src/websockets/qwebsocketframe_p.h4
-rw-r--r--src/websockets/qwebsockethandshakerequest_p.cpp15
-rw-r--r--src/websockets/qwebsockethandshakerequest_p.h8
-rw-r--r--src/websockets/qwebsockethandshakeresponse_p.cpp20
-rw-r--r--src/websockets/qwebsockethandshakeresponse_p.h4
-rw-r--r--src/websockets/qwebsocketprotocol_p.cpp8
-rw-r--r--src/websockets/qwebsocketprotocol_p.h2
-rw-r--r--src/websockets/qwebsockets_global.h2
-rw-r--r--src/websockets/qwebsocketserver.cpp7
-rw-r--r--src/websockets/qwebsocketserver.h6
-rw-r--r--src/websockets/qwebsocketserver_p.cpp7
-rw-r--r--src/websockets/qwebsocketserver_p.h8
-rw-r--r--tests/auto/dataprocessor/tst_dataprocessor.cpp8
-rw-r--r--tests/auto/handshakerequest/tst_handshakerequest.cpp8
-rw-r--r--tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp10
22 files changed, 86 insertions, 77 deletions
diff --git a/src/websockets/qwebsocket.cpp b/src/websockets/qwebsocket.cpp
index 93923e4..21b6a35 100644
--- a/src/websockets/qwebsocket.cpp
+++ b/src/websockets/qwebsocket.cpp
@@ -211,12 +211,13 @@ not been filled in with new information when the signal returns.
*/
#include "qwebsocket.h"
#include "qwebsocket_p.h"
-#include <QUrl>
-#include <QTcpSocket>
-#include <QByteArray>
-#include <QHostAddress>
-#include <QDebug>
+#include <QtCore/QUrl>
+#include <QtNetwork/QTcpSocket>
+#include <QtCore/QByteArray>
+#include <QtNetwork/QHostAddress>
+
+#include <QtCore/QDebug>
#include <limits>
diff --git a/src/websockets/qwebsocket.h b/src/websockets/qwebsocket.h
index 42eb529..f99daad 100644
--- a/src/websockets/qwebsocket.h
+++ b/src/websockets/qwebsocket.h
@@ -42,13 +42,13 @@
#ifndef QWEBSOCKET_H
#define QWEBSOCKET_H
-#include <QUrl>
+#include <QtCore/QUrl>
#ifndef QT_NO_NETWORKPROXY
-#include <QNetworkProxy>
+#include <QtNetwork/QNetworkProxy>
#endif
#ifndef QT_NO_SSL
-#include <QSslError>
-#include <QSslConfiguration>
+#include <QtNetwork/QSslError>
+#include <QtNetwork/QSslConfiguration>
#endif
#include "QtWebSockets/qwebsockets_global.h"
#include "QtWebSockets/qwebsocketprotocol.h"
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index baae1e4..0ae561c 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -44,6 +44,7 @@
#include "qwebsocketprotocol_p.h"
#include "qwebsockethandshakerequest_p.h"
#include "qwebsockethandshakeresponse_p.h"
+
#include <QtCore/QUrl>
#include <QtNetwork/QTcpSocket>
#include <QtCore/QByteArray>
diff --git a/src/websockets/qwebsocketcorsauthenticator_p.h b/src/websockets/qwebsocketcorsauthenticator_p.h
index 707e61c..28c9a3e 100644
--- a/src/websockets/qwebsocketcorsauthenticator_p.h
+++ b/src/websockets/qwebsocketcorsauthenticator_p.h
@@ -41,8 +41,8 @@
#ifndef QWEBSOCKETCORSAUTHENTICATOR_P_H
#define QWEBSOCKETCORSAUTHENTICATOR_P_H
-#include <qglobal.h> //for QT_BEGIN_NAMESPACE
-#include <QString>
+#include <QtCore/qglobal.h>
+#include <QtCore/QString>
//
// W A R N I N G
diff --git a/src/websockets/qwebsocketdataprocessor_p.cpp b/src/websockets/qwebsocketdataprocessor_p.cpp
index 733bb50..0594fb1 100644
--- a/src/websockets/qwebsocketdataprocessor_p.cpp
+++ b/src/websockets/qwebsocketdataprocessor_p.cpp
@@ -56,11 +56,13 @@
#include "qwebsocketprotocol.h"
#include "qwebsocketprotocol_p.h"
#include "qwebsocketframe_p.h"
-#include <QtEndian>
+
+#include <QtCore/QtEndian>
+#include <QtCore/QTextCodec>
+#include <QtCore/QTextDecoder>
+#include <QtCore/QDebug>
+
#include <limits.h>
-#include <QTextCodec>
-#include <QTextDecoder>
-#include <QDebug>
QT_BEGIN_NAMESPACE
diff --git a/src/websockets/qwebsocketdataprocessor_p.h b/src/websockets/qwebsocketdataprocessor_p.h
index 5790204..e4252a7 100644
--- a/src/websockets/qwebsocketdataprocessor_p.h
+++ b/src/websockets/qwebsocketdataprocessor_p.h
@@ -53,10 +53,10 @@
// We mean it.
//
-#include <QObject>
-#include <QByteArray>
-#include <QString>
-#include <QTextCodec>
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QString>
+#include <QtCore/QTextCodec>
#include "qwebsocketprotocol.h"
QT_BEGIN_NAMESPACE
diff --git a/src/websockets/qwebsocketframe_p.cpp b/src/websockets/qwebsocketframe_p.cpp
index 324e701..afb0ece 100644
--- a/src/websockets/qwebsocketframe_p.cpp
+++ b/src/websockets/qwebsocketframe_p.cpp
@@ -55,8 +55,8 @@
#include "qwebsocketframe_p.h"
#include "qwebsocketprotocol_p.h"
-#include <QtEndian>
-#include <QDebug>
+#include <QtCore/QtEndian>
+#include <QtCore/QDebug>
/*!
\internal
diff --git a/src/websockets/qwebsocketframe_p.h b/src/websockets/qwebsocketframe_p.h
index ff71312..f05f602 100644
--- a/src/websockets/qwebsocketframe_p.h
+++ b/src/websockets/qwebsocketframe_p.h
@@ -42,8 +42,8 @@
#ifndef QWEBSOCKETFRAME_P_H
#define QWEBSOCKETFRAME_P_H
-#include <QString>
-#include <QByteArray>
+#include <QtCore/QString>
+#include <QtCore/QByteArray>
#include <limits.h>
#include "qwebsocketprotocol.h"
diff --git a/src/websockets/qwebsockethandshakerequest_p.cpp b/src/websockets/qwebsockethandshakerequest_p.cpp
index b28b9b4..e1c054d 100644
--- a/src/websockets/qwebsockethandshakerequest_p.cpp
+++ b/src/websockets/qwebsockethandshakerequest_p.cpp
@@ -40,15 +40,16 @@
****************************************************************************/
#include "qwebsockethandshakerequest_p.h"
-#include <QString>
-#include <QMap>
-#include <QTextStream>
-#include <QUrl>
-#include <QList>
-#include <QStringList>
-#include <functional> //for std::greater
#include "qwebsocketprotocol.h"
+#include <QtCore/QString>
+#include <QtCore/QMap>
+#include <QtCore/QTextStream>
+#include <QtCore/QUrl>
+#include <QtCore/QList>
+#include <QtCore/QStringList>
+#include <functional> //for std::greater
+
QT_BEGIN_NAMESPACE
/*!
diff --git a/src/websockets/qwebsockethandshakerequest_p.h b/src/websockets/qwebsockethandshakerequest_p.h
index 2ecd81a..9cd0ce5 100644
--- a/src/websockets/qwebsockethandshakerequest_p.h
+++ b/src/websockets/qwebsockethandshakerequest_p.h
@@ -52,10 +52,10 @@
// We mean it.
//
-#include <QObject>
-#include <QMap>
-#include <QString>
-#include <QUrl>
+#include <QtCore/QObject>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QUrl>
#include "qwebsocketprotocol.h"
diff --git a/src/websockets/qwebsockethandshakeresponse_p.cpp b/src/websockets/qwebsockethandshakeresponse_p.cpp
index 4227537..0049306 100644
--- a/src/websockets/qwebsockethandshakeresponse_p.cpp
+++ b/src/websockets/qwebsockethandshakeresponse_p.cpp
@@ -41,15 +41,17 @@
#include "qwebsockethandshakeresponse_p.h"
#include "qwebsockethandshakerequest_p.h"
-#include <QString>
-#include <QTextStream>
-#include <QByteArray>
-#include <QStringList>
-#include <QDateTime>
-#include <QCryptographicHash>
-#include <QSet>
-#include <QList>
-#include <QStringBuilder> //for more efficient string concatenation
+
+#include <QtCore/QString>
+#include <QtCore/QTextStream>
+#include <QtCore/QByteArray>
+#include <QtCore/QStringList>
+#include <QtCore/QDateTime>
+#include <QtCore/QCryptographicHash>
+#include <QtCore/QSet>
+#include <QtCore/QList>
+#include <QtCore/QStringBuilder> //for more efficient string concatenation
+
#include <functional> //for std::greater
QT_BEGIN_NAMESPACE
diff --git a/src/websockets/qwebsockethandshakeresponse_p.h b/src/websockets/qwebsockethandshakeresponse_p.h
index 3706f65..7ee8179 100644
--- a/src/websockets/qwebsockethandshakeresponse_p.h
+++ b/src/websockets/qwebsockethandshakeresponse_p.h
@@ -52,8 +52,8 @@
// We mean it.
//
-#include <QObject>
-#include <QList>
+#include <QtCore/QObject>
+#include <QtCore/QList>
#include "qwebsocketprotocol.h"
QT_BEGIN_NAMESPACE
diff --git a/src/websockets/qwebsocketprotocol_p.cpp b/src/websockets/qwebsocketprotocol_p.cpp
index b5c435e..8a08797 100644
--- a/src/websockets/qwebsocketprotocol_p.cpp
+++ b/src/websockets/qwebsocketprotocol_p.cpp
@@ -39,10 +39,10 @@
**
****************************************************************************/
-#include "private/qwebsocketprotocol_p.h"
-#include <QString>
-#include <QSet>
-#include <QtEndian>
+#include "qwebsocketprotocol_p.h"
+#include <QtCore/QString>
+#include <QtCore/QSet>
+#include <QtCore/QtEndian>
/*!
\enum QWebSocketProtocol::CloseCode
diff --git a/src/websockets/qwebsocketprotocol_p.h b/src/websockets/qwebsocketprotocol_p.h
index e775179..2f29e14 100644
--- a/src/websockets/qwebsocketprotocol_p.h
+++ b/src/websockets/qwebsocketprotocol_p.h
@@ -42,7 +42,7 @@
#ifndef QWEBSOCKETPROTOCOL_P_H
#define QWEBSOCKETPROTOCOL_P_H
-#include <qglobal.h>
+#include <QtCore/qglobal.h>
#include "QtWebSockets/qwebsocketprotocol.h"
QT_BEGIN_NAMESPACE
diff --git a/src/websockets/qwebsockets_global.h b/src/websockets/qwebsockets_global.h
index 78dd5ea..b2e0eeb 100644
--- a/src/websockets/qwebsockets_global.h
+++ b/src/websockets/qwebsockets_global.h
@@ -42,7 +42,7 @@
#ifndef QWEBSOCKETSGLOBAL_H
#define QWEBSOCKETSGLOBAL_H
-#include <qglobal.h>
+#include <QtCore/qglobal.h>
QT_BEGIN_NAMESPACE
diff --git a/src/websockets/qwebsocketserver.cpp b/src/websockets/qwebsocketserver.cpp
index a770667..f89e79b 100644
--- a/src/websockets/qwebsocketserver.cpp
+++ b/src/websockets/qwebsocketserver.cpp
@@ -121,14 +121,15 @@
this signal, as the connection will always succeed.
*/
-#include <QTcpServer>
-#include <QTcpSocket>
-#include <QNetworkProxy>
#include "qwebsocketprotocol.h"
#include "qwebsocket.h"
#include "qwebsocketserver.h"
#include "qwebsocketserver_p.h"
+#include <QtNetwork/QTcpServer>
+#include <QtNetwork/QTcpSocket>
+#include <QtNetwork/QNetworkProxy>
+
QT_BEGIN_NAMESPACE
/*!
diff --git a/src/websockets/qwebsocketserver.h b/src/websockets/qwebsocketserver.h
index ccfcce3..a925fda 100644
--- a/src/websockets/qwebsocketserver.h
+++ b/src/websockets/qwebsocketserver.h
@@ -42,9 +42,9 @@
#ifndef QWEBSOCKETSERVER_H
#define QWEBSOCKETSERVER_H
-#include <QObject>
-#include <QString>
-#include <QHostAddress>
+#include <QtCore/QObject>
+#include <QtCore/QString>
+#include <QtNetwork/QHostAddress>
#include "QtWebSockets/qwebsockets_global.h"
#include "QtWebSockets/qwebsocketprotocol.h"
diff --git a/src/websockets/qwebsocketserver_p.cpp b/src/websockets/qwebsocketserver_p.cpp
index 7a0d204..10f328a 100644
--- a/src/websockets/qwebsocketserver_p.cpp
+++ b/src/websockets/qwebsocketserver_p.cpp
@@ -39,9 +39,6 @@
**
****************************************************************************/
-#include <QTcpServer>
-#include <QTcpSocket>
-#include <QNetworkProxy>
#include "qwebsocketserver.h"
#include "qwebsocketserver_p.h"
#include "qwebsocketprotocol.h"
@@ -51,6 +48,10 @@
#include "qwebsocket_p.h"
#include "qwebsocketcorsauthenticator.h"
+#include <QtNetwork/QTcpServer>
+#include <QtNetwork/QTcpSocket>
+#include <QtNetwork/QNetworkProxy>
+
QT_BEGIN_NAMESPACE
/*!
diff --git a/src/websockets/qwebsocketserver_p.h b/src/websockets/qwebsocketserver_p.h
index 77b2e8d..94491f7 100644
--- a/src/websockets/qwebsocketserver_p.h
+++ b/src/websockets/qwebsocketserver_p.h
@@ -52,10 +52,10 @@
// We mean it.
//
-#include <QObject>
-#include <QQueue>
-#include <QString>
-#include <QHostAddress>
+#include <QtCore/QObject>
+#include <QtCore/QQueue>
+#include <QtCore/QString>
+#include <QtNetwork/QHostAddress>
#include "qwebsocket.h"
QT_BEGIN_NAMESPACE
diff --git a/tests/auto/dataprocessor/tst_dataprocessor.cpp b/tests/auto/dataprocessor/tst_dataprocessor.cpp
index dacc470..f8c3f77 100644
--- a/tests/auto/dataprocessor/tst_dataprocessor.cpp
+++ b/tests/auto/dataprocessor/tst_dataprocessor.cpp
@@ -40,10 +40,10 @@
****************************************************************************/
#include <QtTest/QtTest>
#include <QtTest/qtestcase.h>
-#include <QSignalSpy>
-#include <QBuffer>
-#include <QByteArray>
-#include <QDebug>
+#include <QtTest/QSignalSpy>
+#include <QtCore/QBuffer>
+#include <QtCore/QByteArray>
+#include <QtCore/QDebug>
#include "private/qwebsocketdataprocessor_p.h"
#include "private/qwebsocketprotocol_p.h"
diff --git a/tests/auto/handshakerequest/tst_handshakerequest.cpp b/tests/auto/handshakerequest/tst_handshakerequest.cpp
index 0a12233..3ee5587 100644
--- a/tests/auto/handshakerequest/tst_handshakerequest.cpp
+++ b/tests/auto/handshakerequest/tst_handshakerequest.cpp
@@ -40,12 +40,12 @@
****************************************************************************/
#include <QtTest/QtTest>
#include <QtTest/qtestcase.h>
-#include <QDebug>
-#include <QByteArray>
-#include <QtEndian>
+#include <QtCore/QDebug>
+#include <QtCore/QByteArray>
+#include <QtCore/QtEndian>
#include "private/qwebsockethandshakerequest_p.h"
-#include "qwebsocketprotocol.h"
+#include "QtWebSockets/qwebsocketprotocol.h"
QT_USE_NAMESPACE
diff --git a/tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp b/tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp
index 5480253..80e7b39 100644
--- a/tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp
+++ b/tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp
@@ -40,12 +40,12 @@
****************************************************************************/
#include <QtTest/QtTest>
#include <QtTest/qtestcase.h>
-#include <QDebug>
-#include <QByteArray>
-#include <QtEndian>
+#include <QtCore/QDebug>
+#include <QtCore/QByteArray>
+#include <QtCore/QtEndian>
-#include "qwebsocketcorsauthenticator.h"
-#include "qwebsocketprotocol.h"
+#include "QtWebSockets/qwebsocketcorsauthenticator.h"
+#include "QtWebSockets/qwebsocketprotocol.h"
QT_USE_NAMESPACE