From bd34e5b5ab78e15ee1433a7fbd1dfe2b672fef7f Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 18 Feb 2016 16:57:06 +0100 Subject: Various Ifdefed the WebSocket stuff that doesn't exist on Sailfish Voice calls nearly working, except for a segfault on callEnded, which might be a reentrant thing. --- rockworkd/libpebble/jskit/jskitpebble.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rockworkd/libpebble/jskit/jskitpebble.cpp') diff --git a/rockworkd/libpebble/jskit/jskitpebble.cpp b/rockworkd/libpebble/jskit/jskitpebble.cpp index e755d60..5ea94b7 100644 --- a/rockworkd/libpebble/jskit/jskitpebble.cpp +++ b/rockworkd/libpebble/jskit/jskitpebble.cpp @@ -4,8 +4,9 @@ #include "jskitpebble.h" #include "jskitxmlhttprequest.h" +#if QT_VERSION >= 0x050300 #include "jskitwebsocket.h" - +#endif static const char *token_salt = "0feeb7416d3c4546a19b04bccd8419b1"; JSKitPebble::JSKitPebble(const AppInfo &info, JSKitManager *mgr, QObject *parent) : @@ -319,11 +320,13 @@ QJSValue JSKitPebble::createXMLHttpRequest() return m_mgr->engine()->newQObject(xhr); } +#if QT_VERSION >= 0x050300 QJSValue JSKitPebble::createWebSocket(const QString &url, const QJSValue &protocols) { JSKitWebSocket *ws = new JSKitWebSocket(m_mgr->engine(), url, protocols); return m_mgr->engine()->newQObject(ws); } +#endif QJSValue JSKitPebble::buildAckEventObject(uint transaction, const QString &message) const -- cgit v1.2.3