Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5a3e5e8a authored by Filipe Azevedo's avatar Filipe Azevedo Committed by Linus Jahn

Fix build issue to wrongly declared QXMPP_VERSION define

It is declared as an unenclosed or'dered value, making comparison
failing.
ie, lead to #if (0x1 << 16) | (0x0 << 8) | 0x0 >= 65536
parent 15ce4abb
Pipeline #4964 passed with stages
in 18 minutes and 11 seconds
......@@ -80,7 +80,7 @@ ClientWorker::ClientWorker(Caches *caches, Kaidan *kaidan, bool enableLogging, Q
client->versionManager().setClientVersion(VERSION_STRING);
client->versionManager().setClientOs(QSysInfo::prettyProductName());
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
// Client State Indication
connect(app, &QGuiApplication::applicationStateChanged, this, &ClientWorker::setCsiState);
#endif
......@@ -187,7 +187,7 @@ QString ClientWorker::generateRandomString(unsigned int length) const
return randomString;
}
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
void ClientWorker::setCsiState(Qt::ApplicationState state)
{
if (state == Qt::ApplicationActive)
......
......@@ -159,7 +159,7 @@ private slots:
*/
void onConnectionError(QXmppClient::Error error);
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
/**
* Uses the QGuiApplication state to reduce network traffic when window is minimized
*/
......
......@@ -38,7 +38,7 @@
#include <QXmppDiscoveryManager.h>
#include <QXmppRosterManager.h>
#include <QXmppUtils.h>
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
#include <QXmppCarbonManager.h>
#endif
// Kaidan
......@@ -61,7 +61,7 @@ MessageHandler::MessageHandler(Kaidan *kaidan, QXmppClient *client, MessageModel
emit model->setMessageAsDeliveredRequested(id);
});
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
carbonManager = new QXmppCarbonManager();
client->addExtension(carbonManager);
......@@ -84,7 +84,7 @@ MessageHandler::MessageHandler(Kaidan *kaidan, QXmppClient *client, MessageModel
MessageHandler::~MessageHandler()
{
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
delete carbonManager;
#endif
}
......@@ -101,7 +101,7 @@ void MessageHandler::handleMessage(const QXmppMessage &msg)
message.setId(msg.id());
message.setBody(msg.body());
message.setMediaType(MessageType::MessageText); // default to text message without media
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 1)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 1)
message.setIsSpoiler(msg.isSpoiler());
message.setSpoilerHint(msg.spoilerHint());
#else
......@@ -152,7 +152,7 @@ void MessageHandler::handleMessage(const QXmppMessage &msg)
: msg.stamp().toUTC());
// save the message to the database
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
// in case of message correction, replace old message
if (msg.replaceId().isEmpty()) {
emit model->addMessageRequested(message);
......@@ -269,7 +269,7 @@ void MessageHandler::correctMessage(const QString& toJid,
msg.setSentByMe(true);
msg.setMediaType(MessageType::MessageText); // text message without media
msg.setIsEdited(true);
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
msg.setReplaceId(msgId);
#endif
......@@ -285,7 +285,7 @@ void MessageHandler::correctMessage(const QString& toJid,
void MessageHandler::handleDiscoInfo(const QXmppDiscoveryIq &info)
{
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
if (info.from() != client->configuration().domain())
return;
// enable carbons, if feature found
......
......@@ -42,7 +42,7 @@ class MessageModel;
class QMimeType;
class QXmppMessage;
class QXmppDiscoveryIq;
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
class QXmppCarbonManager;
#endif
......@@ -85,7 +85,7 @@ private:
QXmppClient *client;
QXmppMessageReceiptManager receiptManager;
MessageModel *model;
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
QXmppCarbonManager *carbonManager;
#endif
QString chatPartner;
......
......@@ -129,7 +129,7 @@ void UploadManager::handleUploadSucceeded(const QXmppHttpUpload *upload)
: originalMsg->body() + "\n" + oobUrl;
emit msgModel->updateMessageRequested(originalMsg->id(), [=] (Message &msg) {
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
msg.setOutOfBandUrl(oobUrl);
#endif
msg.setBody(body);
......@@ -140,7 +140,7 @@ void UploadManager::handleUploadSucceeded(const QXmppHttpUpload *upload)
m.setId(originalMsg->id());
m.setReceiptRequested(true);
m.setStamp(originalMsg->stamp());
#if QXMPP_VERSION >= QT_VERSION_CHECK(1, 0, 0)
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 0, 0)
m.setOutOfBandUrl(upload->slot().getUrl().toEncoded());
#endif
......
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