mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
35 lines
531 B
C++
35 lines
531 B
C++
#include "mainwindow.h"
|
|
#include <QApplication>
|
|
#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 (DaemonQT::Instance ().start())
|
|
{
|
|
w.show();
|
|
ret = a.exec();
|
|
}
|
|
DaemonQT::Instance ().stop();
|
|
}
|
|
|
|
return ret;
|
|
}
|