Added QObject parameter to Client class.
This commit is contained in:
parent
def99b199b
commit
e136754ec1
|
|
@ -23,8 +23,9 @@ namespace QRedis
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Connects to a Redis server
|
* @brief Connects to a Redis server
|
||||||
|
* @param parent the parent QObject
|
||||||
*/
|
*/
|
||||||
Client();
|
explicit Client(QObject * parent = nullptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disconnects from the Redis server
|
* @brief Disconnects from the Redis server
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
using namespace QRedis;
|
using namespace QRedis;
|
||||||
|
|
||||||
Client::Client()
|
Client::Client(QObject * parent)
|
||||||
: d(new ClientPrivate)
|
: QObject(parent), d(new ClientPrivate)
|
||||||
{
|
{
|
||||||
connect(&d->socket, &QTcpSocket::connected, this, &Client::connected);
|
connect(&d->socket, &QTcpSocket::connected, this, &Client::connected);
|
||||||
connect(&d->socket, &QTcpSocket::disconnected, this, &Client::disconnected);
|
connect(&d->socket, &QTcpSocket::disconnected, this, &Client::disconnected);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue