Browse Source

don't demonize

pull/520/head
orignal 9 years ago
parent
commit
ff38a3bbfe
  1. 17
      qt/i2pd_qt/main.cpp

17
qt/i2pd_qt/main.cpp

@ -3,20 +3,31 @@
#include <stdlib.h> #include <stdlib.h>
#include "../../Daemon.h" #include "../../Daemon.h"
class DaemonQT: public i2p::util::Daemon_Singleton
{
public:
static DaemonQT& Instance()
{
static DaemonQT instance;
return instance;
}
};
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication a(argc, argv); QApplication a(argc, argv);
MainWindow w; MainWindow w;
int ret = -1; int ret = -1;
if (Daemon.init(argc, argv)) if (DaemonQT::Instance ().init(argc, argv))
{ {
if (Daemon.start()) if (DaemonQT::Instance ().start())
{ {
w.show(); w.show();
ret = a.exec(); ret = a.exec();
} }
Daemon.stop(); DaemonQT::Instance ().stop();
} }
return ret; return ret;

Loading…
Cancel
Save