summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2014-01-15 16:35:38 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-31 13:02:04 +0100
commita3463f8c873f19f9b2aff66d9a633739bb633128 (patch)
tree0726e3bd92e01d49bc1c9f3bc9151b81fad1495c /src
parent00a91c1bab7a121af67f279c06710259fedebeb6 (diff)
downloadqtwebchannel-a3463f8c873f19f9b2aff66d9a633739bb633128.tar.gz
Fix compilation when building with namespaced Qt.
Wrap everything in the QtWebChannel module with the Qt namespace or use the Qt namespace where appropriate. Change-Id: I1ef2b2f5eb22ec5e04ca76c034ef8ebf4043b899 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/imports/webchannel/plugin.cpp4
-rw-r--r--src/imports/webchannel/qmlwebchannel.cpp2
-rw-r--r--src/imports/webchannel/qmlwebchannel.h4
-rw-r--r--src/imports/webchannel/qmlwebchannelattached.cpp2
-rw-r--r--src/imports/webchannel/qmlwebchannelattached.h4
-rw-r--r--src/webchannel/qmetaobjectpublisher.cpp4
-rw-r--r--src/webchannel/qmetaobjectpublisher_p.h4
-rw-r--r--src/webchannel/qwebchannel.cpp4
-rw-r--r--src/webchannel/qwebchannel.h4
-rw-r--r--src/webchannel/qwebchannel_p.h4
-rw-r--r--src/webchannel/qwebchannelsocket.cpp4
-rw-r--r--src/webchannel/qwebchannelsocket_p.h4
-rw-r--r--src/webchannel/qwebsocketserver.cpp4
-rw-r--r--src/webchannel/qwebsocketserver_p.h4
-rw-r--r--src/webchannel/signalhandler_p.h4
-rw-r--r--src/webchannel/variantargument_p.h4
16 files changed, 59 insertions, 1 deletions
diff --git a/src/imports/webchannel/plugin.cpp b/src/imports/webchannel/plugin.cpp
index 024a320..92aac79 100644
--- a/src/imports/webchannel/plugin.cpp
+++ b/src/imports/webchannel/plugin.cpp
@@ -44,7 +44,7 @@
#include "qmlwebchannel.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
class QWebChannelPlugin : public QQmlExtensionPlugin
{
@@ -63,4 +63,6 @@ void QWebChannelPlugin::registerTypes(const char *uri)
}
+QT_END_NAMESPACE
+
#include "plugin.moc"
diff --git a/src/imports/webchannel/qmlwebchannel.cpp b/src/imports/webchannel/qmlwebchannel.cpp
index 71ef7c5..7c70f5c 100644
--- a/src/imports/webchannel/qmlwebchannel.cpp
+++ b/src/imports/webchannel/qmlwebchannel.cpp
@@ -46,6 +46,8 @@
#include <QtQml/QQmlContext>
+QT_USE_NAMESPACE
+
QmlWebChannel::QmlWebChannel(QObject *parent)
: QWebChannel(parent)
{
diff --git a/src/imports/webchannel/qmlwebchannel.h b/src/imports/webchannel/qmlwebchannel.h
index 0f63884..bcbb9cf 100644
--- a/src/imports/webchannel/qmlwebchannel.h
+++ b/src/imports/webchannel/qmlwebchannel.h
@@ -51,6 +51,8 @@
#include <QtQml/qqml.h>
#include <QtQml/QQmlListProperty>
+QT_BEGIN_NAMESPACE
+
class QmlWebChannelAttached;
class QmlWebChannel : public QWebChannel
@@ -85,4 +87,6 @@ private:
QML_DECLARE_TYPE( QmlWebChannel )
QML_DECLARE_TYPEINFO( QmlWebChannel, QML_HAS_ATTACHED_PROPERTIES )
+QT_END_NAMESPACE
+
#endif // QMLWEBCHANNEL_H
diff --git a/src/imports/webchannel/qmlwebchannelattached.cpp b/src/imports/webchannel/qmlwebchannelattached.cpp
index e4aeb5d..637feb2 100644
--- a/src/imports/webchannel/qmlwebchannelattached.cpp
+++ b/src/imports/webchannel/qmlwebchannelattached.cpp
@@ -41,6 +41,8 @@
#include "qmlwebchannelattached.h"
+QT_USE_NAMESPACE
+
QmlWebChannelAttached::QmlWebChannelAttached(QObject *parent)
: QObject(parent)
{
diff --git a/src/imports/webchannel/qmlwebchannelattached.h b/src/imports/webchannel/qmlwebchannelattached.h
index 2f4b9b6..6a0d191 100644
--- a/src/imports/webchannel/qmlwebchannelattached.h
+++ b/src/imports/webchannel/qmlwebchannelattached.h
@@ -44,6 +44,8 @@
#include <QObject>
+QT_BEGIN_NAMESPACE
+
class QmlWebChannelAttached : public QObject
{
Q_OBJECT
@@ -63,4 +65,6 @@ private:
QString m_id;
};
+QT_END_NAMESPACE
+
#endif // QMLWEBCHANNELATTACHED_H
diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
index 5bfc7a9..bd2a22b 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -53,6 +53,8 @@
#include <QtQml/QJSEngine>
#endif
+QT_BEGIN_NAMESPACE
+
namespace {
const QString KEY_SIGNALS = QStringLiteral("signals");
const QString KEY_METHODS = QStringLiteral("methods");
@@ -558,3 +560,5 @@ void QMetaObjectPublisher::timerEvent(QTimerEvent *event)
QObject::timerEvent(event);
}
}
+
+QT_END_NAMESPACE
diff --git a/src/webchannel/qmetaobjectpublisher_p.h b/src/webchannel/qmetaobjectpublisher_p.h
index 5cdb8f6..3e80d24 100644
--- a/src/webchannel/qmetaobjectpublisher_p.h
+++ b/src/webchannel/qmetaobjectpublisher_p.h
@@ -50,6 +50,8 @@
#include <QBasicTimer>
#include <QPointer>
+QT_BEGIN_NAMESPACE
+
class QWebChannel;
#include "qwebchannelglobal.h"
@@ -222,4 +224,6 @@ private:
QBasicTimer timer;
};
+QT_END_NAMESPACE
+
#endif // QMETAOBJECTPUBLISHER_P_H
diff --git a/src/webchannel/qwebchannel.cpp b/src/webchannel/qwebchannel.cpp
index bf90861..b51a056 100644
--- a/src/webchannel/qwebchannel.cpp
+++ b/src/webchannel/qwebchannel.cpp
@@ -48,6 +48,8 @@
#include <QJsonDocument>
#include <QJsonObject>
+QT_BEGIN_NAMESPACE
+
void QWebChannelPrivate::sendJSONMessage(const QJsonValue &id, const QJsonValue &data, bool response) const
{
QJsonObject obj;
@@ -158,3 +160,5 @@ void QWebChannel::ping() const
{
d->socket->ping();
}
+
+QT_END_NAMESPACE
diff --git a/src/webchannel/qwebchannel.h b/src/webchannel/qwebchannel.h
index ea9ff6f..a1f4b6b 100644
--- a/src/webchannel/qwebchannel.h
+++ b/src/webchannel/qwebchannel.h
@@ -48,6 +48,8 @@
#include <QtWebChannel/qwebchannelglobal.h>
+QT_BEGIN_NAMESPACE
+
class QWebChannelPrivate;
class Q_WEBCHANNEL_EXPORT QWebChannel : public QObject
@@ -116,5 +118,7 @@ private:
friend class TestWebChannel;
};
+QT_END_NAMESPACE
+
#endif // QWEBCHANNEL_H
diff --git a/src/webchannel/qwebchannel_p.h b/src/webchannel/qwebchannel_p.h
index 6ea5307..63f5a0a 100644
--- a/src/webchannel/qwebchannel_p.h
+++ b/src/webchannel/qwebchannel_p.h
@@ -44,6 +44,8 @@
#include "qwebchannelglobal.h"
+QT_BEGIN_NAMESPACE
+
class QJsonValue;
class QWebChannelSocket;
class QMetaObjectPublisher;
@@ -56,4 +58,6 @@ struct Q_WEBCHANNEL_EXPORT QWebChannelPrivate
void sendJSONMessage(const QJsonValue &id, const QJsonValue &data, bool response) const;
};
+QT_END_NAMESPACE
+
#endif // QWEBCHANNEL_P_H
diff --git a/src/webchannel/qwebchannelsocket.cpp b/src/webchannel/qwebchannelsocket.cpp
index 5a152c0..84e6685 100644
--- a/src/webchannel/qwebchannelsocket.cpp
+++ b/src/webchannel/qwebchannelsocket.cpp
@@ -44,6 +44,8 @@
#include <QUuid>
#include <QDebug>
+QT_BEGIN_NAMESPACE
+
QWebChannelSocket::QWebChannelSocket(QObject *parent)
: QWebSocketServer(parent)
, m_useSecret(true)
@@ -97,3 +99,5 @@ void QWebChannelSocket::socketError()
{
emit failed(errorString());
}
+
+QT_END_NAMESPACE
diff --git a/src/webchannel/qwebchannelsocket_p.h b/src/webchannel/qwebchannelsocket_p.h
index ab86b22..3f58f91 100644
--- a/src/webchannel/qwebchannelsocket_p.h
+++ b/src/webchannel/qwebchannelsocket_p.h
@@ -44,6 +44,8 @@
#include "qwebsocketserver_p.h"
+QT_BEGIN_NAMESPACE
+
class QWebChannelSocket : public QWebSocketServer
{
Q_OBJECT
@@ -71,4 +73,6 @@ private slots:
void socketError();
};
+QT_END_NAMESPACE
+
#endif // QWEBCHANNELSOCKET_P_H
diff --git a/src/webchannel/qwebsocketserver.cpp b/src/webchannel/qwebsocketserver.cpp
index f027943..4404dc1 100644
--- a/src/webchannel/qwebsocketserver.cpp
+++ b/src/webchannel/qwebsocketserver.cpp
@@ -48,6 +48,8 @@
#include <limits>
+QT_BEGIN_NAMESPACE
+
namespace {
template<typename T>
inline static void appendBytes(QByteArray& data, T value)
@@ -421,3 +423,5 @@ void QWebSocketServer::ping() const
{
sendFrame(Frame::Ping, QByteArray());
}
+
+QT_END_NAMESPACE
diff --git a/src/webchannel/qwebsocketserver_p.h b/src/webchannel/qwebsocketserver_p.h
index 7ad1053..34c9ec2 100644
--- a/src/webchannel/qwebsocketserver_p.h
+++ b/src/webchannel/qwebsocketserver_p.h
@@ -45,6 +45,8 @@
#include <QObject>
#include <QHostAddress>
+QT_BEGIN_NAMESPACE
+
class QTcpServer;
class QTcpSocket;
@@ -156,4 +158,6 @@ private:
QHash<QTcpSocket*, Connection> m_connections;
};
+QT_END_NAMESPACE
+
#endif // QWEBSOCKET_H
diff --git a/src/webchannel/signalhandler_p.h b/src/webchannel/signalhandler_p.h
index 5acea8a..0d8678c 100644
--- a/src/webchannel/signalhandler_p.h
+++ b/src/webchannel/signalhandler_p.h
@@ -48,6 +48,8 @@
#include <QMetaMethod>
#include <QDebug>
+QT_BEGIN_NAMESPACE
+
static const int s_destroyedSignalIndex = QObject::staticMetaObject.indexOfMethod("destroyed(QObject*)");
/**
@@ -286,4 +288,6 @@ void SignalHandler<Receiver>::clear()
m_signalArgumentTypes[&QObject::staticMetaObject] = keep;
}
+QT_END_NAMESPACE
+
#endif // SIGNALHANDLER_H
diff --git a/src/webchannel/variantargument_p.h b/src/webchannel/variantargument_p.h
index b46e6ca..bcb81c4 100644
--- a/src/webchannel/variantargument_p.h
+++ b/src/webchannel/variantargument_p.h
@@ -44,6 +44,8 @@
#include <QVariant>
+QT_BEGIN_NAMESPACE
+
/**
* RAII QVariant to Q[Generic]Argument conversion
*/
@@ -60,4 +62,6 @@ struct VariantArgument
QVariant value;
};
+QT_END_NAMESPACE
+
#endif // VARIANTARGUMENT_H