mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-07 13:42:02 +01:00
fix #466
This commit is contained in:
parent
ed925b6143
commit
b05484b57d
@ -11,6 +11,10 @@
|
||||
SingleApplication::SingleApplication(const QString& id, int& argc, char** argv)
|
||||
: QApplication(argc, argv), m_id(id), m_server(new QLocalServer(this)) {}
|
||||
|
||||
SingleApplication::~SingleApplication() {
|
||||
finish();
|
||||
}
|
||||
|
||||
void SingleApplication::finish() {
|
||||
if (m_server->isListening()) {
|
||||
m_server->close();
|
||||
@ -40,6 +44,7 @@ bool SingleApplication::isOtherInstanceRunning(const QString& message) {
|
||||
return true;
|
||||
}
|
||||
|
||||
QLocalServer::removeServer(m_id);
|
||||
auto i_am_first = m_server->listen(m_id);
|
||||
|
||||
if (i_am_first) {
|
||||
|
@ -12,6 +12,7 @@ class SingleApplication : public QApplication {
|
||||
|
||||
public:
|
||||
explicit SingleApplication(const QString& id, int& argc, char** argv);
|
||||
virtual ~SingleApplication();
|
||||
|
||||
void finish();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user