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