This commit is contained in:
orignal 2016-06-15 12:20:31 -04:00
parent 70e502e55d
commit b0e3339370
4 changed files with 46 additions and 32 deletions

39
qt/i2pd_qt/DaemonQT.cpp Normal file
View file

@ -0,0 +1,39 @@
#include <memory>
#include "mainwindow.h"
#include <QApplication>
#include <stdlib.h>
#include "../../Daemon.h"
namespace i2p
{
namespace util
{
std::unique_ptr<QApplication> app;
bool DaemonQT::init(int argc, char* argv[])
{
app.reset (new QApplication (argc, argv));
return Daemon_Singleton::init(argc, argv);
}
bool DaemonQT::start()
{
return Daemon_Singleton::start();
}
bool DaemonQT::stop()
{
return Daemon_Singleton::stop();
}
void DaemonQT::run ()
{
MainWindow w;
w.show ();
if (app)
{
app->exec();
app.reset (nullptr);
}
}
}
}