Commit 65083a86 authored by LNJ's avatar LNJ 🖖

Keep QXmpp v0.8.3 compatibility

Fixes #302.
parent d8491551
......@@ -57,7 +57,7 @@ kde_enable_exceptions()
find_package(PkgConfig REQUIRED)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Qml Quick Svg Sql QuickControls2 Xml)
find_package(KF5Kirigami2 REQUIRED)
pkg_search_module(QXmpp REQUIRED qxmpp>=0.9)
pkg_search_module(QXmpp REQUIRED qxmpp>=0.8.3)
# Optional QtQuickCompiler
if(QUICK_COMPILER)
......
......@@ -40,7 +40,7 @@ how to do that:
Here are the general dependencies of Kaidan listed:
* [Qt](https://doc.qt.io/qt-5/build-sources.html) (Core Qml Quick Svg Sql QuickControls2) (>= 5.8.0)
* [QXmpp][qxmpp] (>= 0.9.0)
* [QXmpp][qxmpp] (>= 0.8.3)
* [Kirigami 2](https://phabricator.kde.org/source/kirigami/) (>= 5.42.0)
* [ECM (extra-cmake-modules)](https://api.kde.org/ecm/manual/ecm.7.html)
* [KNotifications][knotif] (`-DUSE_KNOTIFICATIONS=OFF` to disable)
......
......@@ -57,7 +57,9 @@ bool Message::operator==(const Message &m) const
m.to() == to() &&
m.type() == type() &&
m.stamp() == stamp() &&
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
m.outOfBandUrl() == outOfBandUrl() &&
#endif
m.isSent() == isSent() &&
m.isDelivered() == isDelivered() &&
m.mediaType() == mediaType() &&
......@@ -182,3 +184,15 @@ void Message::setSpoilerHint(const QString &spoilerHint)
{
m_spoilerHint = spoilerHint;
}
#if (QXMPP_VERSION) < QT_VERSION_CHECK(1, 0, 0)
QString Message::outOfBandUrl() const
{
return m_outOfBandUrl;
}
void Message::setOutOfBandUrl(const QString &outOfBandUrl)
{
m_outOfBandUrl = outOfBandUrl;
}
#endif
......@@ -81,11 +81,16 @@ public:
qint64 mediaSize() const;
void setMediaSize(const qint64 &mediaSize);
bool isSpoiler() const;
void setIsSpoiler(bool isSpoiler);
bool isSpoiler() const;
void setIsSpoiler(bool isSpoiler);
QString spoilerHint() const;
void setSpoilerHint(const QString &spoilerHint);
QString spoilerHint() const;
void setSpoilerHint(const QString &spoilerHint);
#if (QXMPP_VERSION) < QT_VERSION_CHECK(1, 0, 0)
QString outOfBandUrl() const;
void setOutOfBandUrl(const QString &outOfBandUrl);
#endif
private:
/**
......@@ -142,6 +147,10 @@ private:
* Hint of the spoiler message.
*/
QString m_spoilerHint;
#if (QXMPP_VERSION) < QT_VERSION_CHECK(1, 0, 0)
QString m_outOfBandUrl;
#endif
};
#endif // MESSAGE_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment