fix build for no XMPP

This commit is contained in:
Andrew Meadows 2014-09-12 17:56:25 -07:00
parent 27b8d7076b
commit b94b737f26
2 changed files with 6 additions and 2 deletions

View file

@ -104,10 +104,12 @@ void GlobalServicesScriptingInterface::loggedOut() {
emit GlobalServicesScriptingInterface::disconnected(QString("logout"));
}
#ifdef HAVE_QXMPP
void GlobalServicesScriptingInterface::messageReceived(const QXmppMessage& message) {
if (message.type() != QXmppMessage::GroupChat) {
return;
}
const QXmppMucRoom* publicChatRoom = XmppClient::getInstance().getPublicChatRoom();
emit GlobalServicesScriptingInterface::incomingMessage(message.from().right(message.from().count() - 1 - publicChatRoom->jid().count()), message.body());
}
}
#endif // HAVE_QXMPP

View file

@ -24,7 +24,7 @@
#include <QXmppClient.h>
#include <QXmppMessage.h>
#endif
#endif // HAVE_QXMPP
class GlobalServicesScriptingInterface : public QObject {
Q_OBJECT
@ -47,7 +47,9 @@ private slots:
void loggedOut();
void onConnected();
void participantsChanged();
#ifdef HAVE_QXMPP
void messageReceived(const QXmppMessage& message);
#endif // HAVE_QXMPP
signals:
void connected();