Skip to content

Commit 7e1d3e0

Browse files
committed
qt5 compat
1 parent ad80955 commit 7e1d3e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/xmpp/xmpp-im/xmpp_vcard4.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace {
1414
#define INIT_D() \
1515
do { \
1616
if (!d) \
17-
d.reset(new VCardData); \
17+
d = new VCardData; \
1818
} while (0)
1919

2020
const QString VCARD_NAMESPACE = QLatin1String("urn:ietf:params:xml:ns:vcard-4.0");
@@ -656,7 +656,11 @@ VCard VCard::fromFile(const QString &filename)
656656
return VCard();
657657

658658
QDomDocument doc;
659+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
660+
if (!doc.setContent(&file, true)) {
661+
#else
659662
if (!doc.setContent(&file, QDomDocument::ParseOption::UseNamespaceProcessing)) {
663+
#endif
660664
file.close();
661665
return VCard();
662666
}

0 commit comments

Comments
 (0)