mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
QT doesn't depend on Linux daemon anymore
This commit is contained in:
parent
ff38a3bbfe
commit
70e502e55d
5 changed files with 27 additions and 30 deletions
|
@ -22,8 +22,6 @@ SOURCES += main.cpp\
|
|||
../../BOB.cpp \
|
||||
../../ClientContext.cpp \
|
||||
../../Crypto.cpp \
|
||||
../../DaemonLinux.cpp \
|
||||
../../DaemonWin32.cpp \
|
||||
../../Datagram.cpp \
|
||||
../../Destination.cpp \
|
||||
../../Family.cpp \
|
||||
|
|
|
@ -3,31 +3,20 @@
|
|||
#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 (DaemonQT::Instance ().init(argc, argv))
|
||||
if (Daemon.init(argc, argv))
|
||||
{
|
||||
if (DaemonQT::Instance ().start())
|
||||
if (Daemon.start())
|
||||
{
|
||||
w.show();
|
||||
ret = a.exec();
|
||||
}
|
||||
DaemonQT::Instance ().stop();
|
||||
Daemon.stop();
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue