Skip to content

Commit

Permalink
qt5 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jun 9, 2024
1 parent ad80955 commit 7e1d3e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/xmpp/xmpp-im/xmpp_vcard4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace {
#define INIT_D() \
do { \
if (!d) \
d.reset(new VCardData); \
d = new VCardData; \
} while (0)

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

QDomDocument doc;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
if (!doc.setContent(&file, true)) {
#else
if (!doc.setContent(&file, QDomDocument::ParseOption::UseNamespaceProcessing)) {
#endif
file.close();
return VCard();
}
Expand Down

0 comments on commit 7e1d3e0

Please sign in to comment.