OTHER: Make 'Quit server on close' option work
This commit is contained in:
parent
ef687a9375
commit
5e8d83ca8e
8 changed files with 102 additions and 37 deletions
38
src/application.h
Normal file
38
src/application.h
Normal 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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue