summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Stottlemyer <bstottle@ford.com>2017-06-10 09:42:37 -0400
committerBrett Stottlemyer <bstottle@ford.com>2017-06-17 00:23:46 +0000
commit2ca7b229f7552c28f906c0efff8a662c06cc2e40 (patch)
tree97e0096ce49b6969525e769b42e3161ef53c7cad
parente866117b5a1b7df854a98b9a7a17f1957d33b8c7 (diff)
Export classes needed for custom backendsv5.9.1
Export ServerIoDevice, ClientIoDevice and QConnectionAbstractServer, which are needed to enable custom QIODevice backend implementations. Test code: class TestClient : public ClientIoDevice { public: TestClient(QObject *) {} void connectToServer() override {} bool isOpen() override { return false; } QIODevice *connection() override { return 0; } void doClose() override {} }; class TestServer : public ServerIoDevice { public: QIODevice *connection() const override {return 0;} void doClose() override {} }; class TestServerImpl : public QConnectionAbstractServer { public: TestServerImpl(QObject *) {} bool hasPendingConnections() const override { return true; } ServerIoDevice *configureNewConnection() override { return new TestServer; } QUrl address() const override { return QUrl(); } bool listen(const QUrl &) override { return true; } QAbstractSocket::SocketError serverError() const override { return QAbstractSocket::UnknownSocketError; } void close() override {}; }; int main(int, char**) { auto url = QUrl(QStringLiteral("test:address")); qRegisterRemoteObjectsClient<TestClient>(QStringLiteral("test")); qRegisterRemoteObjectsServer<TestServerImpl>(QStringLiteral("test")); auto server = QtROServerFactory::instance()->create(url); auto connection = QtROClientFactory::instance()->create(url); } Task-number: QTBUG-60624 Change-Id: I08899fe40bf9407dab3783cbaf8c14809d46bbdb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
-rw-r--r--src/remoteobjects/qconnectionfactories.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/remoteobjects/qconnectionfactories.h b/src/remoteobjects/qconnectionfactories.h
index 8556f3a..bf35327 100644
--- a/src/remoteobjects/qconnectionfactories.h
+++ b/src/remoteobjects/qconnectionfactories.h
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
//The Qt servers create QIODevice derived classes from handleConnection.
//The problem is that they behave differently, so this class adds some
//consistency.
-class ServerIoDevice : public QObject
+class Q_REMOTEOBJECTS_EXPORT ServerIoDevice : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(ServerIoDevice)
@@ -81,7 +81,7 @@ private:
QDataStream m_dataStream;
};
-class QConnectionAbstractServer : public QObject
+class Q_REMOTEOBJECTS_EXPORT QConnectionAbstractServer : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(QConnectionAbstractServer)
@@ -104,7 +104,7 @@ Q_SIGNALS:
void newConnection();
};
-class ClientIoDevice : public QObject
+class Q_REMOTEOBJECTS_EXPORT ClientIoDevice : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(ClientIoDevice)