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

38
src/application.h Normal file
View file

@ -0,0 +1,38 @@
/**
* This file is a part of Promoe, an XMMS2 Client.
*
* Copyright (C) 2005-2008 XMMS2 Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <QApplication>
class Application;
#if defined(qApp)
#undef qApp
#endif
#define qApp (static_cast<Application *>(QCoreApplication::instance()))
class Application : public QApplication
{
Q_OBJECT
public:
Application (int &argc, char **argv);
public slots:
void quit ();
void handleDisconnected ();
private:
bool m_want_quit;
};