OTHER: Call disconnect from XClient destructor

Make valgrind happy
This commit is contained in:
Thomas Frauendorfer 2009-10-16 00:46:15 +02:00
parent 43516c9431
commit 7dbdf3bb65
2 changed files with 8 additions and 0 deletions

View file

@ -80,6 +80,13 @@ XClient::XClient (QObject *parent, const std::string &name) : QObject (parent),
m_name = name;
}
XClient::~XClient ()
{
// make sure we disconnect, to make valgrind happy
if (m_isconnected)
disconnect ();
}
void XClient::disconnect ()
{
delete m_client;

View file

@ -43,6 +43,7 @@ class XClient : public QObject {
Q_OBJECT
public:
XClient (QObject *, const std::string &);
~XClient ();
bool connect (const char *path = NULL, const bool &sync = false,
QWidget* parent = NULL);