diff options
| author | Linus Jahn <lnj@kaidan.im> | 2023-01-22 19:25:35 +0100 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2023-01-22 19:27:12 +0100 |
| commit | 2395e3cd3f087bd05c5cec94b95c73231383054b (patch) | |
| tree | e879fd477fb8a51940bfc4465e34219e34a23e37 /tests/util.h | |
| parent | f5f3909771ac7b07e79c04171d9f5fc79831b891 (diff) | |
| download | qxmpp-2395e3cd3f087bd05c5cec94b95c73231383054b.tar.gz | |
Fix discovery manager incoming request handling
Fixes #529.
Diffstat (limited to 'tests/util.h')
| -rw-r--r-- | tests/util.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/util.h b/tests/util.h index e0d30aa5..17f2c792 100644 --- a/tests/util.h +++ b/tests/util.h @@ -25,7 +25,11 @@ template<typename String> inline QDomElement xmlToDom(const String &xml) { QDomDocument doc; - QVERIFY_RV(doc.setContent(xml, true), "XML is not valid"); + if constexpr (std::is_same_v<String, QString> || std::is_same_v<String, QByteArray>) { + QVERIFY_RV(doc.setContent(xml, true), "XML is not valid"); + } else { + QVERIFY_RV(doc.setContent(QString(xml), true), "XML is not valid"); + } return doc.documentElement(); } |
