|
|
|
@ -3,20 +3,31 @@
@@ -3,20 +3,31 @@
|
|
|
|
|
#include <stdlib.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[]) |
|
|
|
|
{ |
|
|
|
|
QApplication a(argc, argv); |
|
|
|
|
MainWindow w; |
|
|
|
|
|
|
|
|
|
int ret = -1; |
|
|
|
|
if (Daemon.init(argc, argv)) |
|
|
|
|
if (DaemonQT::Instance ().init(argc, argv)) |
|
|
|
|
{ |
|
|
|
|
if (Daemon.start()) |
|
|
|
|
if (DaemonQT::Instance ().start()) |
|
|
|
|
{ |
|
|
|
|
w.show(); |
|
|
|
|
ret = a.exec(); |
|
|
|
|
} |
|
|
|
|
Daemon.stop(); |
|
|
|
|
DaemonQT::Instance ().stop(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ret; |
|
|
|
|