|
|
@ -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; |
|
|
|