OTHER: Call disconnect from XClient destructor
Make valgrind happy
This commit is contained in:
parent
43516c9431
commit
7dbdf3bb65
2 changed files with 8 additions and 0 deletions
|
@ -80,6 +80,13 @@ XClient::XClient (QObject *parent, const std::string &name) : QObject (parent),
|
||||||
m_name = name;
|
m_name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XClient::~XClient ()
|
||||||
|
{
|
||||||
|
// make sure we disconnect, to make valgrind happy
|
||||||
|
if (m_isconnected)
|
||||||
|
disconnect ();
|
||||||
|
}
|
||||||
|
|
||||||
void XClient::disconnect ()
|
void XClient::disconnect ()
|
||||||
{
|
{
|
||||||
delete m_client;
|
delete m_client;
|
||||||
|
|
|
@ -43,6 +43,7 @@ class XClient : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
XClient (QObject *, const std::string &);
|
XClient (QObject *, const std::string &);
|
||||||
|
~XClient ();
|
||||||
|
|
||||||
bool connect (const char *path = NULL, const bool &sync = false,
|
bool connect (const char *path = NULL, const bool &sync = false,
|
||||||
QWidget* parent = NULL);
|
QWidget* parent = NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue