Added QObject parameter to Client class.

This commit is contained in:
Nathan Osman 2013-06-29 12:42:39 -07:00
parent def99b199b
commit e136754ec1
2 changed files with 4 additions and 3 deletions

View File

@ -23,8 +23,9 @@ namespace QRedis
/**
* @brief Connects to a Redis server
* @param parent the parent QObject
*/
Client();
explicit Client(QObject * parent = nullptr);
/**
* @brief Disconnects from the Redis server

View File

@ -3,8 +3,8 @@
using namespace QRedis;
Client::Client()
: d(new ClientPrivate)
Client::Client(QObject * parent)
: QObject(parent), d(new ClientPrivate)
{
connect(&d->socket, &QTcpSocket::connected, this, &Client::connected);
connect(&d->socket, &QTcpSocket::disconnected, this, &Client::disconnected);