summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qlocalsocket.h
diff options
context:
space:
mode:
authorCorentin Jabot <corentinjabot@gmail.com>2012-11-25 17:30:15 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-05 18:39:35 +0100
commit953255abab0f99afe7559da93ba18a876805d78d (patch)
tree953da560e670c135f2cd2e772c7f83ca2e9627d4 /src/network/socket/qlocalsocket.h
parent866a5d0c28f458d50ab9e4f011fc7a94822ce6eb (diff)
Make QLocalSocket connectable with open()
Add getter and setter for handling the server QLocalSocket connects to. Move the connectServer() implementation to QLocalSocket::open so the local socket can be handled transparently as a QIODevice Add a convenient connectToServer(OpenMode) method Change-Id: Ibc8dc33f79903f92daf2d1ca2e64ead2ce39f33e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/socket/qlocalsocket.h')
-rw-r--r--src/network/socket/qlocalsocket.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/socket/qlocalsocket.h b/src/network/socket/qlocalsocket.h
index 2ff4b2fc5b..427dab1def 100644
--- a/src/network/socket/qlocalsocket.h
+++ b/src/network/socket/qlocalsocket.h
@@ -84,9 +84,11 @@ public:
QLocalSocket(QObject *parent = 0);
~QLocalSocket();
+ void connectToServer(OpenMode openMode = ReadWrite);
void connectToServer(const QString &name, OpenMode openMode = ReadWrite);
void disconnectFromServer();
+ void setServerName(const QString &name);
QString serverName() const;
QString fullServerName() const;
@@ -95,6 +97,7 @@ public:
virtual qint64 bytesAvailable() const;
virtual qint64 bytesToWrite() const;
virtual bool canReadLine() const;
+ virtual bool open(OpenMode openMode = ReadWrite) Q_DECL_OVERRIDE;
virtual void close();
LocalSocketError error() const;
bool flush();