Skip to content
Permalink
Browse files

clang-format: Enable regrouping and sorting of includes

  • Loading branch information
lnjX committed Feb 2, 2020
1 parent 2dd54da commit 99b850a3008bbb03d3449d683adb87839f7d5c4b
Showing with 519 additions and 446 deletions.
  1. +9 −1 .clang-format
  2. +2 −3 examples/example_0_connected/example_0_connected.cpp
  3. +2 −3 examples/example_1_echoClient/example_1_echoClient.cpp
  4. +2 −2 examples/example_2_rosterHandling/example_2_rosterHandling.cpp
  5. +6 −6 examples/example_3_transferHandling/example_3_transferHandling.cpp
  6. +1 −2 examples/example_5_rpcInterface/main.cpp
  7. +2 −2 examples/example_6_rpcClient/main.cpp
  8. +3 −3 examples/example_6_rpcClient/rpcClient.cpp
  9. +3 −3 examples/example_7_archiveHandling/example_7_archiveHandling.cpp
  10. +2 −2 examples/example_7_archiveHandling/example_7_archiveHandling.h
  11. +2 −2 examples/example_8_server/example_8_server.cpp
  12. +7 −7 examples/example_9_vCard/example_9_vCard.cpp
  13. +3 −2 src/base/QXmppArchiveIq.cpp
  14. +5 −4 src/base/QXmppBindIq.cpp
  15. +3 −3 src/base/QXmppBitsOfBinaryContentId.h
  16. +6 −6 src/base/QXmppBitsOfBinaryData.cpp
  17. +2 −2 src/base/QXmppBitsOfBinaryData.h
  18. +2 −2 src/base/QXmppBitsOfBinaryDataList.cpp
  19. +2 −2 src/base/QXmppBitsOfBinaryDataList.h
  20. +1 −1 src/base/QXmppBitsOfBinaryIq.h
  21. +3 −2 src/base/QXmppBookmarkSet.cpp
  22. +2 −2 src/base/QXmppBookmarkSet.h
  23. +3 −2 src/base/QXmppByteStreamIq.cpp
  24. +5 −5 src/base/QXmppCodec.cpp
  25. +2 −2 src/base/QXmppCodec_p.h
  26. +0 −1 src/base/QXmppConstants.cpp
  27. +5 −0 src/base/QXmppDataForm.cpp
  28. +4 −3 src/base/QXmppDiscoveryIq.cpp
  29. +1 −0 src/base/QXmppElement.cpp
  30. +2 −2 src/base/QXmppElement.h
  31. +2 −3 src/base/QXmppEntityTimeIq.cpp
  32. +2 −2 src/base/QXmppEntityTimeIq.h
  33. +4 −3 src/base/QXmppHttpUploadIq.cpp
  34. +2 −2 src/base/QXmppHttpUploadIq.h
  35. +4 −4 src/base/QXmppIbbIq.cpp
  36. +1 −1 src/base/QXmppIq.cpp
  37. +5 −4 src/base/QXmppJingleIq.cpp
  38. +2 −2 src/base/QXmppJingleIq.h
  39. +2 −0 src/base/QXmppLogger.cpp
  40. +2 −2 src/base/QXmppLogger.h
  41. +3 −3 src/base/QXmppMamIq.cpp
  42. +1 −1 src/base/QXmppMamIq.h
  43. +6 −5 src/base/QXmppMessage.cpp
  44. +2 −2 src/base/QXmppMessage.h
  45. +2 −1 src/base/QXmppMixIq.cpp
  46. +1 −0 src/base/QXmppMixIq.h
  47. +2 −1 src/base/QXmppMixItem.cpp
  48. +2 −2 src/base/QXmppMixItem.h
  49. +3 −2 src/base/QXmppMucIq.cpp
  50. +5 −4 src/base/QXmppNonSASLAuth.cpp
  51. +2 −1 src/base/QXmppPingIq.cpp
  52. +3 −4 src/base/QXmppPresence.cpp
  53. +1 −1 src/base/QXmppPresence.h
  54. +3 −3 src/base/QXmppPubSubIq.cpp
  55. +2 −2 src/base/QXmppPubSubIq.h
  56. +2 −2 src/base/QXmppPubSubItem.cpp
  57. +2 −2 src/base/QXmppPubSubItem.h
  58. +5 −4 src/base/QXmppRegisterIq.cpp
  59. +2 −2 src/base/QXmppResultSet.cpp
  60. +2 −2 src/base/QXmppResultSet.h
  61. +5 −4 src/base/QXmppRosterIq.cpp
  62. +1 −0 src/base/QXmppRosterIq.h
  63. +1 −0 src/base/QXmppRpcIq.h
  64. +2 −2 src/base/QXmppRtcpPacket.cpp
  65. +2 −2 src/base/QXmppRtcpPacket.h
  66. +6 −6 src/base/QXmppRtpChannel.cpp
  67. +3 −3 src/base/QXmppRtpChannel.h
  68. +2 −2 src/base/QXmppRtpPacket.cpp
  69. +2 −2 src/base/QXmppRtpPacket.h
  70. +4 −4 src/base/QXmppSasl.cpp
  71. +4 −4 src/base/QXmppSasl_p.h
  72. +4 −3 src/base/QXmppSessionIq.cpp
  73. +2 −2 src/base/QXmppSocks.cpp
  74. +2 −2 src/base/QXmppSocks.h
  75. +3 −3 src/base/QXmppStanza.cpp
  76. +3 −3 src/base/QXmppStanza.h
  77. +1 −1 src/base/QXmppStream.cpp
  78. +2 −1 src/base/QXmppStream.h
  79. +3 −2 src/base/QXmppStreamFeatures.cpp
  80. +2 −2 src/base/QXmppStreamInitiationIq.cpp
  81. +2 −2 src/base/QXmppStreamInitiationIq_p.h
  82. +2 −3 src/base/QXmppStreamManagement.cpp
  83. +5 −5 src/base/QXmppStun.cpp
  84. +3 −3 src/base/QXmppStun.h
  85. +3 −3 src/base/QXmppUtils.cpp
  86. +2 −2 src/base/QXmppUtils.h
  87. +4 −4 src/base/QXmppVCardIq.cpp
  88. +2 −1 src/base/QXmppVCardIq.h
  89. +3 −2 src/base/QXmppVersionIq.cpp
  90. +3 −2 src/client/QXmppArchiveManager.cpp
  91. +2 −2 src/client/QXmppArchiveManager.h
  92. +3 −2 src/client/QXmppBookmarkManager.cpp
  93. +2 −2 src/client/QXmppBookmarkManager.h
  94. +4 −3 src/client/QXmppCallManager.cpp
  95. +4 −4 src/client/QXmppCallManager.h
  96. +3 −5 src/client/QXmppCarbonManager.cpp
  97. +11 −11 src/client/QXmppClient.cpp
  98. +3 −3 src/client/QXmppClient.h
  99. +2 −2 src/client/QXmppClientExtension.cpp
  100. +4 −3 src/client/QXmppConfiguration.cpp
  101. +3 −3 src/client/QXmppConfiguration.h
  102. +4 −4 src/client/QXmppDiscoveryManager.cpp
  103. +3 −4 src/client/QXmppEntityTimeManager.cpp
  104. +1 −2 src/client/QXmppInternalClientExtension.cpp
  105. +1 −1 src/client/QXmppInternalClientExtension_p.h
  106. +1 −2 src/client/QXmppInvokable.cpp
  107. +4 −4 src/client/QXmppInvokable.h
  108. +4 −3 src/client/QXmppMamManager.cpp
  109. +2 −2 src/client/QXmppMamManager.h
  110. +3 −3 src/client/QXmppMessageReceiptManager.cpp
  111. +4 −3 src/client/QXmppMucManager.cpp
  112. +13 −12 src/client/QXmppOutgoingClient.cpp
  113. +1 −0 src/client/QXmppRemoteMethod.cpp
  114. +3 −2 src/client/QXmppRosterManager.cpp
  115. +4 −4 src/client/QXmppRosterManager.h
  116. +2 −1 src/client/QXmppRpcManager.cpp
  117. +3 −3 src/client/QXmppRpcManager.h
  118. +3 −4 src/client/QXmppTlsManager.cpp
  119. +12 −11 src/client/QXmppTransferManager.cpp
  120. +5 −5 src/client/QXmppUploadRequestManager.cpp
  121. +1 −0 src/client/QXmppUploadRequestManager.h
  122. +1 −1 src/client/QXmppVCardManager.cpp
  123. +5 −4 src/client/QXmppVersionManager.cpp
  124. +3 −2 src/server/QXmppDialback.cpp
  125. +6 −6 src/server/QXmppIncomingClient.cpp
  126. +6 −5 src/server/QXmppIncomingServer.cpp
  127. +9 −8 src/server/QXmppOutgoingServer.cpp
  128. +2 −2 src/server/QXmppOutgoingServer.h
  129. +2 −2 src/server/QXmppPasswordChecker.cpp
  130. +2 −2 src/server/QXmppPasswordChecker.h
  131. +11 −10 src/server/QXmppServer.cpp
  132. +2 −2 src/server/QXmppServer.h
  133. +5 −4 src/server/QXmppServerExtension.cpp
  134. +2 −2 src/server/QXmppServerExtension.h
  135. +2 −2 src/server/QXmppServerPlugin.h
  136. +1 −0 tests/qxmpparchiveiq/tst_qxmpparchiveiq.cpp
  137. +2 −1 tests/qxmppbindiq/tst_qxmppbindiq.cpp
  138. +2 −2 tests/qxmppbitsofbinarycontentid/tst_qxmppbitsofbinarycontentid.cpp
  139. +3 −3 tests/qxmppbitsofbinaryiq/tst_qxmppbitsofbinaryiq.cpp
  140. +3 −3 tests/qxmppcallmanager/tst_qxmppcallmanager.cpp
  141. +4 −3 tests/qxmppcarbonmanager/tst_qxmppcarbonmanager.cpp
  142. +1 −2 tests/qxmppclient/tst_qxmppclient.cpp
  143. +3 −3 tests/qxmppcodec/tst_qxmppcodec.cpp
  144. +2 −1 tests/qxmppdataform/tst_qxmppdataform.cpp
  145. +2 −1 tests/qxmppdiscoveryiq/tst_qxmppdiscoveryiq.cpp
  146. +2 −1 tests/qxmppentitytimeiq/tst_qxmppentitytimeiq.cpp
  147. +2 −1 tests/qxmpphttpuploadiq/tst_qxmpphttpuploadiq.cpp
  148. +2 −1 tests/qxmppiceconnection/tst_qxmppiceconnection.cpp
  149. +2 −2 tests/qxmppiq/tst_qxmppiq.cpp
  150. +2 −1 tests/qxmppjingleiq/tst_qxmppjingleiq.cpp
  151. +4 −3 tests/qxmppmammanager/tst_qxmppmammanager.cpp
  152. +2 −1 tests/qxmppmessage/tst_qxmppmessage.cpp
  153. +2 −1 tests/qxmppmessagereceiptmanager/tst_qxmppmessagereceiptmanager.cpp
  154. +2 −2 tests/qxmppmixiq/tst_qxmppmixiq.cpp
  155. +3 −2 tests/qxmppmixitem/tst_qxmppmixitem.cpp
  156. +1 −0 tests/qxmppnonsaslauthiq/tst_qxmppnonsaslauthiq.cpp
  157. +2 −3 tests/qxmpppresence/tst_qxmpppresence.cpp
  158. +2 −1 tests/qxmpppubsubiq/tst_qxmpppubsubiq.cpp
  159. +2 −2 tests/qxmppregisteriq/tst_qxmppregisteriq.cpp
  160. +2 −1 tests/qxmppresultset/tst_qxmppresultset.cpp
  161. +2 −1 tests/qxmpprosteriq/tst_qxmpprosteriq.cpp
  162. +2 −1 tests/qxmpprpciq/tst_qxmpprpciq.cpp
  163. +2 −1 tests/qxmpprtcppacket/tst_qxmpprtcppacket.cpp
  164. +2 −1 tests/qxmpprtppacket/tst_qxmpprtppacket.cpp
  165. +1 −0 tests/qxmppserver/tst_qxmppserver.cpp
  166. +1 −0 tests/qxmppsessioniq/tst_qxmppsessioniq.cpp
  167. +3 −2 tests/qxmppsocks/tst_qxmppsocks.cpp
  168. +2 −1 tests/qxmppstanza/tst_qxmppstanza.cpp
  169. +2 −2 tests/qxmppstarttlspacket/tst_qxmppstarttlspacket.cpp
  170. +1 −0 tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp
  171. +1 −0 tests/qxmppstreaminitiationiq/tst_qxmppstreaminitiationiq.cpp
  172. +2 −1 tests/qxmppstunmessage/tst_qxmppstunmessage.cpp
  173. +3 −3 tests/qxmpptransfermanager/tst_qxmpptransfermanager.cpp
  174. +7 −7 tests/qxmppuploadrequestmanager/tst_qxmppuploadrequestmanager.cpp
  175. +2 −1 tests/qxmpputils/tst_qxmpputils.cpp
  176. +2 −1 tests/qxmppvcardiq/tst_qxmppvcardiq.cpp
  177. +2 −1 tests/qxmppversioniq/tst_qxmppversioniq.cpp
  178. +2 −1 tests/util.h
@@ -9,7 +9,15 @@ BreakBeforeBraces: Custom
BreakConstructorInitializers: BeforeColon
DerivePointerAlignment: true
DisableFormat: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: "^.QXmpp.*"
Priority: 1
- Regex: "^<Q(?!Xmpp).*"
Priority: 2
- Regex: "^<[^Q].*"
Priority: 3
Language: Cpp
SortIncludes: false
SortIncludes: true
SpaceAfterTemplateKeyword: false
SpacesBeforeTrailingComments: 2
@@ -21,12 +21,11 @@
*
*/


#include <QCoreApplication>

#include "QXmppClient.h"
#include "QXmppLogger.h"

#include <QCoreApplication>

int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
@@ -21,13 +21,12 @@
*
*/


#include <QCoreApplication>
#include "example_1_echoClient.h"

#include "QXmppLogger.h"
#include "QXmppMessage.h"

#include "example_1_echoClient.h"
#include <QCoreApplication>

echoClient::echoClient(QObject *parent)
: QXmppClient(parent)
@@ -21,12 +21,12 @@
*
*/

#include <QCoreApplication>
#include "example_2_rosterHandling.h"

#include "QXmppMessage.h"
#include "QXmppRosterManager.h"

#include "example_2_rosterHandling.h"
#include <QCoreApplication>

xmppClient::xmppClient(QObject *parent)
: QXmppClient(parent),
@@ -22,18 +22,18 @@
*
*/

#include <cstdlib>
#include "example_3_transferHandling.h"

#include "QXmppMessage.h"
#include "QXmppUtils.h"

#include <cstdio>
#include <cstdlib>

#include <QBuffer>
#include <QCoreApplication>
#include <QDebug>

#include "QXmppMessage.h"
#include "QXmppUtils.h"

#include "example_3_transferHandling.h"

xmppClient::xmppClient(QObject *parent)
: QXmppClient(parent), transferManager(nullptr)
{
@@ -22,13 +22,12 @@
*
*/

#include <QCoreApplication>

#include "QXmppClient.h"
#include "QXmppLogger.h"
#include "QXmppRpcManager.h"

#include "remoteinterface.h"
#include <QCoreApplication>

int main(int argc, char *argv[])
{
@@ -21,10 +21,10 @@
*
*/

#include "QXmppLogger.h"

#include <QtCore/QCoreApplication>
#include "rpcClient.h"
#include "QXmppLogger.h"
#include <QtCore/QCoreApplication>

int main(int argc, char *argv[])
{
@@ -22,13 +22,13 @@
*
*/

#include <QDebug>
#include <QTimer>
#include "rpcClient.h"

#include "QXmppRpcManager.h"
#include "QXmppUtils.h"

#include "rpcClient.h"
#include <QDebug>
#include <QTimer>

rpcClient::rpcClient(QObject *parent)
: QXmppClient(parent)
@@ -21,13 +21,13 @@
*
*/

#include <QCoreApplication>
#include <QDateTime>
#include "example_7_archiveHandling.h"

#include "QXmppArchiveIq.h"
#include "QXmppArchiveManager.h"

#include "example_7_archiveHandling.h"
#include <QCoreApplication>
#include <QDateTime>

static void logStart(const QString &msg)
{
@@ -24,10 +24,10 @@
#ifndef XMPPCLIENT_H
#define XMPPCLIENT_H

#include <QDateTime>

#include "QXmppClient.h"

#include <QDateTime>

class QXmppArchiveChat;
class QXmppArchiveManager;
class QXmppResultSetReply;
@@ -21,12 +21,12 @@
*
*/

#include <QtCore/QCoreApplication>

#include "QXmppLogger.h"
#include "QXmppPasswordChecker.h"
#include "QXmppServer.h"

#include <QtCore/QCoreApplication>

#define USERNAME "qxmpp.test1"
#define PASSWORD "qxmpp123"

@@ -21,6 +21,13 @@
*
*/

#include "example_9_vCard.h"

#include "QXmppMessage.h"
#include "QXmppRosterManager.h"
#include "QXmppVCardIq.h"
#include "QXmppVCardManager.h"

#include <QBuffer>
#include <QCoreApplication>
#include <QDebug>
@@ -30,13 +37,6 @@
#include <QImageReader>
#include <QXmlStreamWriter>

#include "QXmppMessage.h"
#include "QXmppRosterManager.h"
#include "QXmppVCardIq.h"
#include "QXmppVCardManager.h"

#include "example_9_vCard.h"

xmppClient::xmppClient(QObject *parent)
: QXmppClient(parent),
m_rosterManager(findExtension<QXmppRosterManager>()),
@@ -21,12 +21,13 @@
*
*/

#include <QDomElement>

#include "QXmppArchiveIq.h"

#include "QXmppConstants_p.h"
#include "QXmppUtils.h"

#include <QDomElement>

QXmppArchiveMessage::QXmppArchiveMessage()
: m_received(false)
{
@@ -22,14 +22,15 @@
*
*/

#include "QXmppBindIq.h"

#include "QXmppConstants_p.h"
#include "QXmppUtils.h"

#include <QDomElement>
#include <QTextStream>
#include <QXmlStreamWriter>

#include "QXmppBindIq.h"
#include "QXmppUtils.h"
#include "QXmppConstants_p.h"

/// Returns the bound JID.
///

@@ -24,11 +24,11 @@
#ifndef QXMPPBITSOFBINARYCONTENTID_H
#define QXMPPBITSOFBINARYCONTENTID_H

#include <QSharedDataPointer>
#include <QCryptographicHash>

#include "QXmppGlobal.h"

#include <QCryptographicHash>
#include <QSharedDataPointer>

class QXmppBitsOfBinaryContentIdPrivate;

/// \class QXmppBitsOfBinaryContentId represents a link to or an identifier of
@@ -23,16 +23,16 @@

#include "QXmppBitsOfBinaryData.h"

#include <QDomElement>
#include <QSharedData>
#include <QMimeType>
#include <QMimeDatabase>
#include <QXmlStreamWriter>

#include "QXmppBitsOfBinaryContentId.h"
#include "QXmppConstants_p.h"
#include "QXmppUtils.h"

#include <QDomElement>
#include <QMimeDatabase>
#include <QMimeType>
#include <QSharedData>
#include <QXmlStreamWriter>

class QXmppBitsOfBinaryDataPrivate : public QSharedData
{
public:
@@ -24,10 +24,10 @@
#ifndef QXMPPBITSOFBINARYDATA_H
#define QXMPPBITSOFBINARYDATA_H

#include <QSharedDataPointer>

#include "QXmppGlobal.h"

#include <QSharedDataPointer>

class QDomElement;
class QMimeType;
class QXmlStreamWriter;
@@ -23,11 +23,11 @@

#include "QXmppBitsOfBinaryDataList.h"

#include <QDomElement>

#include "QXmppBitsOfBinaryData.h"
#include "QXmppConstants_p.h"

#include <QDomElement>

QXmppBitsOfBinaryDataList::QXmppBitsOfBinaryDataList() = default;

QXmppBitsOfBinaryDataList::~QXmppBitsOfBinaryDataList() = default;
@@ -24,10 +24,10 @@
#ifndef QXMPPBITSOFBINARYDATACONTAINER_H
#define QXMPPBITSOFBINARYDATACONTAINER_H

#include <QVector>

#include "QXmppBitsOfBinaryData.h"

#include <QVector>

class QDomElement;
class QXmlStreamWriter;

@@ -24,8 +24,8 @@
#ifndef QXMPPBITSOFBINARYIQ_H
#define QXMPPBITSOFBINARYIQ_H

#include "QXmppIq.h"
#include "QXmppBitsOfBinaryData.h"
#include "QXmppIq.h"

/// \class QXmppBitsOfBinaryIq represents a XEP-0231: Bits of Binary IQ to
/// request and transmit Bits of Binary data elements.
@@ -21,11 +21,12 @@
*
*/

#include <QDomElement>

#include "QXmppBookmarkSet.h"

#include "QXmppUtils.h"

#include <QDomElement>

static const char *ns_bookmarks = "storage:bookmarks";

/// Constructs a new conference room bookmark.
@@ -24,11 +24,11 @@
#ifndef QXMPPBOOKMARKSET_H
#define QXMPPBOOKMARKSET_H

#include "QXmppStanza.h"

#include <QList>
#include <QUrl>

#include "QXmppStanza.h"

/// \brief The QXmppBookmarkConference class represents a bookmark for a conference room,
/// as defined by XEP-0048: Bookmarks.
///
@@ -21,12 +21,13 @@
*
*/

#include <QDomElement>

#include "QXmppByteStreamIq.h"

#include "QXmppConstants_p.h"
#include "QXmppUtils.h"

#include <QDomElement>

QString QXmppByteStreamIq::StreamHost::host() const
{
return m_host;
@@ -25,17 +25,17 @@
* G.711 based on reference implementation by Sun Microsystems, Inc.
*/

#include <QDataStream>
#include <QDebug>
#include <QSize>
#include <QThread>

#include "QXmppCodec_p.h"
#include "QXmppRtpChannel.h"
#include "QXmppRtpPacket.h"

#include <cstring>

#include <QDataStream>
#include <QDebug>
#include <QSize>
#include <QThread>

#ifdef QXMPP_USE_SPEEX
#include <speex/speex.h>
#endif

0 comments on commit 99b850a

Please sign in to comment.
You can’t perform that action at this time.