network: Fix missing or improper include guard in headers
authorSergio Ahumada <sergio.ahumada@nokia.com>
Sat, 15 Sep 2012 16:29:50 +0000 (18:29 +0200)
committerQt by Nokia <qt-info@nokia.com>
Sat, 15 Sep 2012 21:54:45 +0000 (23:54 +0200)
Use an include guard in headers to ensure the header is not included
more than once. Make the header guard match its file name.

Also, cpp files should include their own headers first (but below config.h)

Change-Id: Iecf5da23c0f8e6d457f67657b88ef7557bde9669
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
17 files changed:
src/network/access/qhttpnetworkconnection.cpp
src/network/access/qhttpnetworkconnectionchannel.cpp
src/network/access/qnetworkaccessauthenticationmanager.cpp
src/network/access/qnetworkrequest.cpp
src/network/bearer/qnetworkconfigmanager.h
src/network/bearer/qnetworkconfigmanager_p.h
src/network/bearer/qnetworksession.cpp
src/network/kernel/qnetworkfunctions_wince.h
src/network/kernel/qnetworkinterface_win.cpp
src/network/socket/qnativesocketengine.cpp
src/network/socket/qtcpserver.cpp
src/network/socket/qtcpsocket.cpp
src/network/socket/qudpsocket.cpp
src/network/ssl/qsslcertificateextension_p.h
src/network/ssl/qsslcipher_p.h
src/network/ssl/qsslkey.cpp
src/network/ssl/qsslsocket.cpp

index b0c4deb..46ed10b 100644 (file)
@@ -39,8 +39,8 @@
 **
 ****************************************************************************/
 
-#include <private/qabstractsocket_p.h>
 #include "qhttpnetworkconnection_p.h"
+#include <private/qabstractsocket_p.h>
 #include "qhttpnetworkconnectionchannel_p.h"
 #include "private/qnoncontiguousbytedevice_p.h"
 #include <private/qnetworkrequest_p.h>
index be2be04..382c156 100644 (file)
@@ -39,8 +39,8 @@
 **
 ****************************************************************************/
 
-#include "qhttpnetworkconnection_p.h"
 #include "qhttpnetworkconnectionchannel_p.h"
+#include "qhttpnetworkconnection_p.h"
 #include "private/qnoncontiguousbytedevice_p.h"
 
 #include <qpair.h>
index 85e7f65..77f3b37 100644 (file)
@@ -39,9 +39,9 @@
 **
 ****************************************************************************/
 
+#include "qnetworkaccessauthenticationmanager_p.h"
 #include "qnetworkaccessmanager.h"
 #include "qnetworkaccessmanager_p.h"
-#include "qnetworkaccessauthenticationmanager_p.h"
 
 #include "QtCore/qbuffer.h"
 #include "QtCore/qurl.h"
index ff35a10..a29c7b6 100644 (file)
 **
 ****************************************************************************/
 
-#include "qplatformdefs.h"
 #include "qnetworkrequest.h"
-#include "qnetworkcookie.h"
 #include "qnetworkrequest_p.h"
+#include "qplatformdefs.h"
+#include "qnetworkcookie.h"
 #include "qsslconfiguration.h"
 #include "QtCore/qshareddata.h"
 #include "QtCore/qlocale.h"
index 6c16040..81f5d44 100644 (file)
@@ -39,8 +39,8 @@
 **
 ****************************************************************************/
 
-#ifndef QNETWORKCONFIGURATIONMANAGER_H
-#define QNETWORKCONFIGURATIONMANAGER_H
+#ifndef QNETWORKCONFIGMANAGER_H
+#define QNETWORKCONFIGMANAGER_H
 
 #include <QtCore/qobject.h>
 #include <QtNetwork/qnetworkconfiguration.h>
@@ -102,4 +102,4 @@ QT_END_HEADER
 
 #endif // QT_NO_BEARERMANAGEMENT
 
-#endif // QNETWORKCONFIGURATIONMANAGER_H
+#endif // QNETWORKCONFIGMANAGER_H
index 92406ae..73458f1 100644 (file)
@@ -39,8 +39,8 @@
 **
 ****************************************************************************/
 
-#ifndef QNETWORKCONFIGURATIONMANAGERPRIVATE_H
-#define QNETWORKCONFIGURATIONMANAGERPRIVATE_H
+#ifndef QNETWORKCONFIGMANAGER_P_H
+#define QNETWORKCONFIGMANAGER_P_H
 
 //
 //  W A R N I N G
@@ -137,4 +137,4 @@ QT_END_NAMESPACE
 
 #endif // QT_NO_BEARERMANAGEMENT
 
-#endif // QNETWORKCONFIGURATIONMANAGERPRIVATE_H
+#endif // QNETWORKCONFMANAGER_P_H
index ee21dff..21535e7 100644 (file)
@@ -40,6 +40,7 @@
 ****************************************************************************/
 
 #include "qnetworksession.h"
+#include "qnetworksession_p.h"
 #include "qbearerengine_p.h"
 
 #include <QEventLoop>
@@ -48,7 +49,6 @@
 #include <QThread>
 
 #include "qnetworkconfigmanager_p.h"
-#include "qnetworksession_p.h"
 
 #ifndef QT_NO_BEARERMANAGEMENT
 
index 1181788..17a9f45 100644 (file)
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
-#ifndef Q_NETWORK_FUNCTIONS_WCE_H
-#define Q_NETWORK_FUNCTIONS_WCE_H
+
+#ifndef QNETWORKFUNCTIONS_WINCE_H
+#define QNETWORKFUNCTIONS_WINCE_H
+
 #ifdef Q_OS_WINCE
 
 #include <qt_windows.h>
@@ -93,4 +95,4 @@ QT_END_NAMESPACE
 QT_END_HEADER
 
 #endif // Q_OS_WINCE
-#endif // Q_NETWORK_FUNCTIONS_WCE_H
+#endif // QNETWORKFUNCTIONS_WINCE_H
index 1f4ac7f..3c83241 100644 (file)
 **
 ****************************************************************************/
 
+#include "qnetworkinterface_win_p.h"
+
 #include "qnetworkinterface.h"
 #include "qnetworkinterface_p.h"
 
 #ifndef QT_NO_NETWORKINTERFACE
 
-#include "qnetworkinterface_win_p.h"
 #include <qhostinfo.h>
 #include <qhash.h>
 #include <qurl.h>
index 3dca7aa..7b2fdc8 100644 (file)
     errorString() can be called to determine the cause of the error.
 */
 
+#include "qnativesocketengine_p.h"
+
 #include <qabstracteventdispatcher.h>
 #include <qsocketnotifier.h>
 #include <qnetworkinterface.h>
 
-#include "qnativesocketengine_p.h"
 #include <private/qthread_p.h>
 #include <private/qobject_p.h>
 
index 7955928..90540a2 100644 (file)
     \sa hasPendingConnections(), nextPendingConnection()
 */
 
+#include "qtcpserver.h"
 #include "private/qobject_p.h"
 #include "qalgorithms.h"
 #include "qhostaddress.h"
 #include "qlist.h"
 #include "qpointer.h"
 #include "qabstractsocketengine_p.h"
-#include "qtcpserver.h"
 #include "qtcpsocket.h"
 #include "qnetworkproxy.h"
 
index dff8b5e..ccd4a76 100644 (file)
@@ -66,9 +66,9 @@
     {Loopback Example}, {Torrent Example}
 */
 
-#include "qlist.h"
-#include "qtcpsocket_p.h"
 #include "qtcpsocket.h"
+#include "qtcpsocket_p.h"
+#include "qlist.h"
 #include "qhostaddress.h"
 
 QT_BEGIN_NAMESPACE
index 8e3c427..925b1e7 100644 (file)
     \sa QTcpSocket
 */
 
+#include "qudpsocket.h"
 #include "qhostaddress.h"
 #include "qnetworkinterface.h"
 #include "qabstractsocket_p.h"
-#include "qudpsocket.h"
 
 QT_BEGIN_NAMESPACE
 
index ccd9565..1b63af1 100644 (file)
@@ -39,8 +39,8 @@
 **
 ****************************************************************************/
 
-#ifndef QSSLCERTIFICATEEXTESNION_P_H
-#define QSSLCERTIFICATEEXTESNION_P_H
+#ifndef QSSLCERTIFICATEEXTENSION_P_H
+#define QSSLCERTIFICATEEXTENSION_P_H
 
 #include "qsslcertificateextension.h"
 
@@ -64,5 +64,5 @@ public:
 
 QT_END_NAMESPACE
 
-#endif // QSSLCERTIFICATEEXTESNION_P_H
+#endif // QSSLCERTIFICATEEXTENSION_P_H
 
index eadb4ea..4d451d0 100644 (file)
@@ -39,6 +39,8 @@
 **
 ****************************************************************************/
 
+#ifndef QSSLCIPHER_P_H
+#define QSSLCIPHER_P_H
 
 #include "qsslcipher.h"
 
@@ -76,3 +78,5 @@ public:
 };
 
 QT_END_NAMESPACE
+
+#endif // QSSLCIPHER_P_H
index 31f211c..b7f3c96 100644 (file)
@@ -55,9 +55,9 @@
     \sa QSslSocket, QSslCertificate, QSslCipher
 */
 
-#include "qsslsocket_openssl_symbols_p.h"
 #include "qsslkey.h"
 #include "qsslkey_p.h"
+#include "qsslsocket_openssl_symbols_p.h"
 #include "qsslsocket.h"
 #include "qsslsocket_p.h"
 
index b254748..7d7655a 100644 (file)
     \sa peerVerifyError()
 */
 
-#include "qsslcipher.h"
 #include "qsslsocket.h"
+#include "qsslcipher.h"
 #include "qsslsocket_openssl_p.h"
 #include "qsslconfiguration_p.h"