OTHER: Make 'Quit server on close' option work

This commit is contained in:
Thomas Frauendorfer 2008-10-14 03:56:27 +02:00
parent ef687a9375
commit 5e8d83ca8e
8 changed files with 102 additions and 37 deletions

View file

@ -31,19 +31,6 @@
#include "xmmsqt4.h"
#include "debug.h"
/*
XSettings::XSettings (QObject *parent) : QObject (parent)
{
// * dummy *
}
void
XSettings::change_settings ()
{
emit settingsChanged ();
}
*/
QString
XClient::stdToQ (const std::string &str)
{
@ -94,6 +81,15 @@ void XClient::disconnect ()
emit disconnected (this);
}
bool
XClient::quit ()
{
if (!m_client)
return false;
m_client->quit ();
return true;
}
bool
XClient::connect (const char *ipcpath, const bool &sync, QWidget *parent)
{
@ -137,10 +133,10 @@ try_again:
}
}
m_isconnected = true;
// useing normal disconnect callback, if that causes problems,
// an own method schould be created
setDisconnectCallback (boost::bind (&XClient::disconnect, this));
m_isconnected = true;
emit gotConnection (this);
return true;

View file

@ -93,6 +93,7 @@ class XClient : public QObject {
public slots:
void disconnect ();
bool quit ();
protected:
Xmms::Client *m_client;