-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
197 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,45 @@ | |
// | ||
// SPDX-License-Identifier: LGPL-2.1-or-later | ||
|
||
#include "QXmppE2eeExtension.h" | ||
#include "QXmppFutureUtils_p.h" | ||
#include "QXmppMamManager.h" | ||
#include "QXmppMessage.h" | ||
|
||
#include "TestClient.h" | ||
#include "util.h" | ||
#include <QObject> | ||
|
||
using namespace QXmpp::Private; | ||
|
||
class EncryptionExtension : public QXmppE2eeExtension | ||
{ | ||
public: | ||
QXmppTask<MessageEncryptResult> encryptMessage(QXmppMessage &&, const std::optional<QXmppSendStanzaParams> &) override | ||
{ | ||
return makeReadyTask<MessageEncryptResult>(QXmppError { "it's only a test", QXmpp::SendError::EncryptionError }); | ||
} | ||
QXmppTask<MessageDecryptResult> decryptMessage(QXmppMessage &&m) override | ||
{ | ||
m.setBody(m.e2eeFallbackBody()); | ||
m.setE2eeFallbackBody({}); | ||
return makeReadyTask<MessageDecryptResult>(std::move(m)); | ||
} | ||
|
||
QXmppTask<IqEncryptResult> encryptIq(QXmppIq &&, const std::optional<QXmppSendStanzaParams> &) override | ||
{ | ||
return makeReadyTask<IqEncryptResult>(QXmppError { "it's only a test", QXmpp::SendError::EncryptionError }); | ||
} | ||
|
||
QXmppTask<IqDecryptResult> decryptIq(const QDomElement &) override | ||
{ | ||
return makeReadyTask<IqDecryptResult>(QXmppError { "it's only a test", QXmpp::SendError::EncryptionError }); | ||
} | ||
|
||
bool isEncrypted(const QDomElement &e) override { return !e.firstChildElement("test-encrypted").isNull(); }; | ||
bool isEncrypted(const QXmppMessage &) override { return false; }; | ||
}; | ||
|
||
class QXmppMamTestHelper : public QObject | ||
{ | ||
Q_OBJECT | ||
|
@@ -39,6 +72,10 @@ class tst_QXmppMamManager : public QObject | |
Q_SLOT void testHandleResultIq_data(); | ||
Q_SLOT void testHandleResultIq(); | ||
|
||
// test for task-based API | ||
Q_SLOT void retrieveMessagesUnencrypted(); | ||
Q_SLOT void retrieveMessagesEncrypted(); | ||
|
||
QXmppMamTestHelper m_helper; | ||
QXmppMamManager m_manager; | ||
}; | ||
|
@@ -205,6 +242,122 @@ void tst_QXmppMamManager::testHandleResultIq() | |
QCOMPARE(m_helper.m_signalTriggered, accept); | ||
} | ||
|
||
void tst_QXmppMamManager::retrieveMessagesUnencrypted() | ||
{ | ||
TestClient test; | ||
auto *mam = test.addNewExtension<QXmppMamManager>(); | ||
auto task = mam->retrieveMessages("mam.server.org"); | ||
test.expect("<iq id='qxmpp1' to='mam.server.org' type='set'>" | ||
"<query xmlns='urn:xmpp:mam:2' queryid='qxmpp1'>" | ||
"<x xmlns='jabber:x:data' type='submit'>" | ||
"<field type='hidden' var='FORM_TYPE'><value>urn:xmpp:mam:2</value></field>" | ||
"</x>" | ||
"</query>" | ||
"</iq>"); | ||
mam->handleStanza(xmlToDom("<message id='aeb213' to='[email protected]/chamber' from='mam.server.org'>" | ||
"<result xmlns='urn:xmpp:mam:2' queryid='qxmpp1' id='28482-98726-73623'>" | ||
"<forwarded xmlns='urn:xmpp:forward:0'>" | ||
"<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>" | ||
"<message xmlns='jabber:client'" | ||
" to='[email protected]/balcony'" | ||
" from='[email protected]/orchard'" | ||
" type='chat'>" | ||
"<body>Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.</body>" | ||
"</message>" | ||
"</forwarded>" | ||
"</result>" | ||
"</message>")); | ||
mam->handleStanza(xmlToDom("<message id='aeb214' to='[email protected]/chamber' from='mam.server.org'>" | ||
"<result xmlns='urn:xmpp:mam:2' queryid='qxmpp1' id='5d398-28273-f7382'>" | ||
"<forwarded xmlns='urn:xmpp:forward:0'>" | ||
"<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:09:32Z'/>" | ||
"<message xmlns='jabber:client'" | ||
" to='[email protected]/orchard'" | ||
" from='[email protected]/balcony'" | ||
" type='chat' id='8a54s'>" | ||
"<body>What man art thou that thus bescreen'd in night so stumblest on my counsel?</body>" | ||
"</message>" | ||
"</forwarded>" | ||
"</result>" | ||
"</message>")); | ||
test.inject("<iq type='result' id='qxmpp1'>" | ||
"<fin xmlns='urn:xmpp:mam:2'>" | ||
"<set xmlns='http://jabber.org/protocol/rsm'>" | ||
"<first index='0'>28482-98726-73623</first>" | ||
"<last>09af3-cc343-b409f</last>" | ||
"</set>" | ||
"</fin>" | ||
"</iq>"); | ||
|
||
auto retrieved = expectFutureVariant<QXmppMamManager::RetrievedMessages>(task); | ||
QCOMPARE(retrieved.messages.size(), 2); | ||
QCOMPARE(retrieved.messages.at(0).body(), "Call me but love, and I'll be new baptized; Henceforth I never will be Romeo."); | ||
QCOMPARE(retrieved.messages.at(1).body(), "What man art thou that thus bescreen'd in night so stumblest on my counsel?"); | ||
QCOMPARE(retrieved.result.resultSetReply().first(), "28482-98726-73623"); | ||
} | ||
|
||
void tst_QXmppMamManager::retrieveMessagesEncrypted() | ||
{ | ||
TestClient test; | ||
// e2ee | ||
auto e2ee = std::make_unique<EncryptionExtension>(); | ||
test.setEncryptionExtension(e2ee.get()); | ||
// mam manager | ||
auto *mam = test.addNewExtension<QXmppMamManager>(); | ||
|
||
// start request | ||
auto task = mam->retrieveMessages("mam.server.org"); | ||
test.expect("<iq id='qxmpp1' to='mam.server.org' type='set'>" | ||
"<query xmlns='urn:xmpp:mam:2' queryid='qxmpp1'>" | ||
"<x xmlns='jabber:x:data' type='submit'>" | ||
"<field type='hidden' var='FORM_TYPE'><value>urn:xmpp:mam:2</value></field>" | ||
"</x>" | ||
"</query>" | ||
"</iq>"); | ||
mam->handleStanza(xmlToDom("<message id='aeb213' to='[email protected]/chamber' from='mam.server.org'>" | ||
"<result xmlns='urn:xmpp:mam:2' queryid='qxmpp1' id='28482-98726-73623'>" | ||
"<forwarded xmlns='urn:xmpp:forward:0'>" | ||
"<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>" | ||
"<message xmlns='jabber:client'" | ||
" to='[email protected]/balcony'" | ||
" from='[email protected]/orchard'" | ||
" type='chat'>" | ||
"<test-encrypted/>" | ||
"<body>Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.</body>" | ||
"</message>" | ||
"</forwarded>" | ||
"</result>" | ||
"</message>")); | ||
mam->handleStanza(xmlToDom("<message id='aeb214' to='[email protected]/chamber' from='mam.server.org'>" | ||
"<result xmlns='urn:xmpp:mam:2' queryid='qxmpp1' id='5d398-28273-f7382'>" | ||
"<forwarded xmlns='urn:xmpp:forward:0'>" | ||
"<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:09:32Z'/>" | ||
"<message xmlns='jabber:client'" | ||
" to='[email protected]/orchard'" | ||
" from='[email protected]/balcony'" | ||
" type='chat' id='8a54s'>" | ||
"<body>What man art thou that thus bescreen'd in night so stumblest on my counsel?</body>" | ||
"</message>" | ||
"</forwarded>" | ||
"</result>" | ||
"</message>")); | ||
test.inject("<iq type='result' id='qxmpp1'>" | ||
"<fin xmlns='urn:xmpp:mam:2'>" | ||
"<set xmlns='http://jabber.org/protocol/rsm'>" | ||
"<first index='0'>28482-98726-73623</first>" | ||
"<last>09af3-cc343-b409f</last>" | ||
"</set>" | ||
"</fin>" | ||
"</iq>"); | ||
|
||
// check results | ||
auto retrieved = expectFutureVariant<QXmppMamManager::RetrievedMessages>(task); | ||
QCOMPARE(retrieved.messages.size(), 2); | ||
QCOMPARE(retrieved.messages.at(0).body(), "Call me but love, and I'll be new baptized; Henceforth I never will be Romeo."); | ||
QCOMPARE(retrieved.messages.at(1).body(), "What man art thou that thus bescreen'd in night so stumblest on my counsel?"); | ||
QCOMPARE(retrieved.result.resultSetReply().first(), "28482-98726-73623"); | ||
} | ||
|
||
void QXmppMamTestHelper::archivedMessageReceived(const QString &queryId, const QXmppMessage &message) | ||
{ | ||
m_signalTriggered = true; | ||
|
56eaed2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-Linter Report⚠️
Some files did not pass the configured checks!
clang-format (v15.0.7) reports: 4 file(s) not formatted
clang-tidy (v15.0.7) reports: 4534 concern(s)
tests/qxmppclient/tst_qxmppclient.cpp:6:10: error: [clang-diagnostic-error]
tests/qxmppclient/tst_qxmppclient.cpp:22:7: warning: [cppcoreguidelines-pro-type-member-init]
tests/qxmppclient/tst_qxmppclient.cpp:29:17: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:30:17: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:31:17: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:32:17: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:33:17: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:34:17: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:39:23: warning: [readability-convert-member-functions-to-static]
tests/qxmppclient/tst_qxmppclient.cpp:39:41: warning: [bugprone-easily-swappable-parameters]
tests/qxmppclient/tst_qxmppclient.cpp:43:18: warning: [cppcoreguidelines-init-variables]
QXmppMessage msg; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:56:23: warning: [readability-convert-member-functions-to-static]
tests/qxmppclient/tst_qxmppclient.cpp:58:17: warning: [cppcoreguidelines-init-variables]
QXmppLogger logger; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:73:23: warning: [readability-convert-member-functions-to-static]
tests/qxmppclient/tst_qxmppclient.cpp:101:37: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:101:67: warning: [readability-named-parameter]
tests/qxmppclient/tst_qxmppclient.cpp:106:37: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:106:67: warning: [readability-named-parameter]
tests/qxmppclient/tst_qxmppclient.cpp:111:32: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:111:52: warning: [readability-named-parameter]
tests/qxmppclient/tst_qxmppclient.cpp:117:32: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:117:61: warning: [readability-named-parameter]
tests/qxmppclient/tst_qxmppclient.cpp:122:10: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:122:10: warning: [readability-convert-member-functions-to-static]
tests/qxmppclient/tst_qxmppclient.cpp:122:41: warning: [readability-named-parameter]
tests/qxmppclient/tst_qxmppclient.cpp:123:10: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:123:10: warning: [readability-convert-member-functions-to-static]
tests/qxmppclient/tst_qxmppclient.cpp:123:42: warning: [readability-named-parameter]
tests/qxmppclient/tst_qxmppclient.cpp:126:23: warning: [readability-convert-member-functions-to-static]
tests/qxmppclient/tst_qxmppclient.cpp:128:17: warning: [cppcoreguidelines-init-variables]
QXmppClient client; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:144:26: warning: [cppcoreguidelines-init-variables]
QXmppDiscoveryIq request; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:170:27: warning: [cppcoreguidelines-init-variables]
QXmppPromise<QXmppIq> p; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:170:27: warning: [readability-identifier-length]
tests/qxmppclient/tst_qxmppclient.cpp:171:21: warning: [cppcoreguidelines-init-variables]
QXmppRegisterIq iq; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:171:21: warning: [readability-identifier-length]
tests/qxmppclient/tst_qxmppclient.cpp:175:49: warning: [readability-identifier-length]
p.task().then(this, [&thenCalled](QXmppIq &&iq) { ^
tests/qxmppclient/tst_qxmppclient.cpp:187:27: warning: [modernize-use-trailing-return-type]
tests/qxmppclient/tst_qxmppclient.cpp:189:27: warning: [cppcoreguidelines-init-variables]
QXmppPromise<QXmppIq> p; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:189:27: warning: [readability-identifier-length]
tests/qxmppclient/tst_qxmppclient.cpp:190:21: warning: [cppcoreguidelines-init-variables]
QXmppRegisterIq iq; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:190:21: warning: [readability-identifier-length]
tests/qxmppclient/tst_qxmppclient.cpp:202:45: warning: [readability-identifier-length]
task.then(this, [&thenCalled](QXmppIq &&iq) { ^
tests/qxmppclient/tst_qxmppclient.cpp:211:27: warning: [cppcoreguidelines-init-variables]
QXmppPromise<QXmppIq> p; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:211:27: warning: [readability-identifier-length]
tests/qxmppclient/tst_qxmppclient.cpp:212:21: warning: [cppcoreguidelines-init-variables]
QXmppRegisterIq iq; ^ = 0
tests/qxmppclient/tst_qxmppclient.cpp:212:21: warning: [readability-identifier-length]
tests/qxmppclient/tst_qxmppclient.cpp:220:49: warning: [readability-identifier-length]
p.task().then(this, [&thenCalled](QXmppIq &&iq) { ^
tests/qxmppclient/tst_qxmppclient.cpp:231:12: warning: [cppcoreguidelines-avoid-non-const-global-variables]
QTEST_MAIN(tst_QXmppClient) ^
tests/qxmpppubsubforms/tst_qxmpppubsubforms.cpp:5:10: error: [clang-diagnostic-error]
tests/qxmpppubsubforms/tst_qxmpppubsubforms.cpp:19:28: warning: [readability-convert-member-functions-to-static]
tests/qxmpppubsubforms/tst_qxmpppubsubforms.cpp:21:16: warning: [cppcoreguidelines-init-variables]
tests/qxmpppubsubforms/tst_qxmpppubsubforms.cpp:32:19: warning: [cppcoreguidelines-init-variables]
QXmppDataForm form; ^ = 0
tests/qxmpppubsubforms/tst_qxmpppubsubforms.cpp:49:12: warning: [cppcoreguidelines-avoid-non-const-global-variables]
QTEST_MAIN(tst_QXmppPubSubForms) ^
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:5:10: error: [clang-diagnostic-error]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:10:20: warning: [cppcoreguidelines-avoid-non-const-global-variables]
Q_DECLARE_METATYPE(QXmppEntityTimeIq) ^
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:12:7: warning: [cppcoreguidelines-pro-type-member-init]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:16:17: warning: [modernize-use-trailing-return-type]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:17:17: warning: [modernize-use-trailing-return-type]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:20:34: warning: [readability-convert-member-functions-to-static]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:25:34: warning: [readability-convert-member-functions-to-static]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:27:16: warning: [cppcoreguidelines-init-variables]
TestClient test; ^ = 0
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:28:11: warning: [cppcoreguidelines-init-variables]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:30:16: warning: [cppcoreguidelines-init-variables]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:47:34: warning: [readability-convert-member-functions-to-static]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:49:16: warning: [cppcoreguidelines-init-variables]
TestClient test; ^ = 0
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:52:11: warning: [cppcoreguidelines-init-variables]
tests/qxmppentitytimemanager/tst_qxmppentitytimemanager.cpp:67:12: warning: [cppcoreguidelines-avoid-non-const-global-variables]
QTEST_MAIN(tst_QXmppEntityTimeManager) ^
tests/qxmppomemodata/tst_qxmppomemodata.cpp:6:10: error: [clang-diagnostic-error]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:49:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:50:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:51:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:52:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:53:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:54:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:55:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:56:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:57:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:58:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:59:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:60:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:61:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:62:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:63:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:64:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:65:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:66:17: warning: [modernize-use-trailing-return-type]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:85:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:90:18: warning: [cppcoreguidelines-init-variables]
QDomDocument doc; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:92:23: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:112:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:118:29: warning: [cppcoreguidelines-init-variables]
QXmppOmemoDeviceElement deviceElement1; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:124:29: warning: [cppcoreguidelines-init-variables]
QXmppOmemoDeviceElement deviceElement2; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:148:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:153:18: warning: [cppcoreguidelines-init-variables]
QDomDocument doc; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:155:23: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:159:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:161:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:167:29: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:170:29: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:174:26: warning: [cppcoreguidelines-init-variables]
QXmppOmemoDeviceList deviceList1; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:181:26: warning: [cppcoreguidelines-init-variables]
QXmppOmemoDeviceList deviceList2; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:206:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:211:18: warning: [cppcoreguidelines-init-variables]
QDomDocument doc; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:213:23: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:217:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:219:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:233:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:244:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:254:25: warning: [cppcoreguidelines-init-variables]
QVector<QByteArray> xmls = { xml1, xml2 }; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:256:33: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:261:28: warning: [cppcoreguidelines-init-variables]
QXmppOmemoDeviceBundle deviceBundle1; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:270:28: warning: [cppcoreguidelines-init-variables]
QXmppOmemoDeviceBundle deviceBundle2; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:306:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:311:18: warning: [cppcoreguidelines-init-variables]
QDomDocument doc; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:313:23: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:336:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:343:24: warning: [cppcoreguidelines-init-variables]
QXmppOmemoEnvelope omemoEnvelope1; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:350:24: warning: [cppcoreguidelines-init-variables]
QXmppOmemoEnvelope omemoEnvelope2; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:376:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:381:18: warning: [cppcoreguidelines-init-variables]
QDomDocument doc; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:383:23: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:387:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:389:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:417:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:442:23: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:481:23: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:496:24: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:501:24: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:507:24: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:527:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:529:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:560:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:588:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:595:18: warning: [cppcoreguidelines-init-variables]
QXmppMessage message1; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:602:18: warning: [cppcoreguidelines-init-variables]
QXmppMessage message2; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:608:26: warning: [readability-convert-member-functions-to-static]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:610:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:622:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:635:22: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:641:18: warning: [cppcoreguidelines-init-variables]
QDomDocument doc; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:643:17: warning: [cppcoreguidelines-init-variables]
QDomElement element = doc.documentElement(); ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:650:18: warning: [cppcoreguidelines-init-variables]
QXmppOmemoIq omemoIq1; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:657:23: warning: [cppcoreguidelines-init-variables]
tests/qxmppomemodata/tst_qxmppomemodata.cpp:661:18: warning: [cppcoreguidelines-init-variables]
QXmppOmemoIq omemoIq2; ^ = 0
tests/qxmppomemodata/tst_qxmppomemodata.cpp:667:12: warning: [cppcoreguidelines-avoid-non-const-global-variables]
QTEST_MAIN(tst_QXmppOmemoData) ^
tests/qxmpppubsub/tst_qxmpppubsub.cpp:5:10: error: [clang-diagnostic-error]
tests/qxmpppubsub/tst_qxmpppubsub.cpp:23:20: warning: [cppcoreguidelines-avoid-non-const-global-variables]
Q_DECLARE_METATYPE(PubSubNamespace) ^
tests/qxmpppubsub/tst_qxmpppubsub.cpp:67:9: warning: [cppcoreguidelines-macro-usage]
tests/qxmpppubsub/tst_qxmpppubsub.cpp:68:54: warning: [bugprone-macro-parentheses]
QTest::newRow(name) << QByteArrayLiteral(xml) << type << jid << node ^ ( )
tests/qxmpppubsub/tst_qxmpppubsub.cpp:68:62: warning: [bugprone-macro-parentheses]
QTest::newRow(name) << QByteArrayLiteral(xml) << type << jid << node ^ ( )
tests/qxmpppubsub/tst_qxmpppubsub.cpp:147:9: warning: [cppcoreguidelines-macro-usage]
tests/qxmpppubsub/tst_qxmpppubsub.cpp:148:54: warning: [bugprone-macro-parentheses]
QTest::newRow(name) << QByteArrayLiteral(xml) << xmlns << state << jid << node << subid << configSupport ^ ( )
tests/qxmpppubsub/tst_qxmpppubsub.cpp:148:63: warning: [bugprone-macro-parentheses]
QTest::newRow(name) << QByteArrayLiteral(xml) << xmlns << state << jid << node << subid << configSupport ^ ( )
tests/qxmpppubsub/tst_qxmpppubsub.cpp:148:72: warning: [bugprone-macro-parentheses]
QTest::newRow(name) << QByteArrayLiteral(xml) << xmlns << state << jid << node << subid << configSupport ^ ( )
tests/qxmpppubsub/tst_qxmpppubsub.cpp:148:79: warning: [bugprone-macro-parentheses]
QTest::newRow(name) << QByteArrayLiteral(xml) << xmlns << state << jid << node << subid << configSupport ^ ( )
tests/qxmpppubsub/tst_qxmpppubsub.cpp:148:87: warning: [bugprone-macro-parentheses]
QTest::newRow(name) << QByteArrayLiteral(xml) << xmlns << state << jid << node << subid << configSupport ^ ( )
tests/qxmpppubsub/tst_qxmpppubsub.cpp:283:12: warning: [cppcoreguidelines-avoid-non-const-global-variables]
QTEST_MAIN(tst_QXmppPubSub) ^
tests/qxmppmixiq/tst_qxmppmixiq.cpp:5:10: error: [clang-diagnostic-error]
tests/qxmppmixiq/tst_qxmppmixiq.cpp:19:17: warning: [modernize-use-trailing-return-type]
tests/qxmppmixiq/tst_qxmppmixiq.cpp:20:17: warning: [modernize-use-trailing-return-type]
tests/qxmppmixiq/tst_qxmppmixiq.cpp:21:17: warning: [modernize-use-trailing-return-type]
tests/qxmppmixiq/tst_qxmppmixiq.cpp:22:17: warning: [modernize-use-trailing-return-type]
tests/qxmppmixiq/tst_qxmppmixiq.cpp:23:17: warning: [modernize-use-trailing-return-type]
tests/qxmppsasl/tst_qxmppsasl.cpp:5:10: error: [clang-diagnostic-error]
Have any feedback or feature suggestions? Share it here.