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
|
||||
* @param parent the parent QObject
|
||||
*/
|
||||
Client();
|
||||
explicit Client(QObject * parent = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Disconnects from the Redis server
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue