Sandboxie/SandboxiePlus/SandMan/main.cpp

41 lines
911 B
C++
Raw Normal View History

2020-06-01 17:11:56 +01:00
#include "stdafx.h"
#include "SandMan.h"
#include <QtWidgets/QApplication>
#include "../QSbieAPI/SbieAPI.h"
2020-06-08 16:17:37 +01:00
#include "../QtSingleApp/src/qtsingleapplication.h"
#include "../QSbieAPI/SbieUtils.h"
2020-06-01 17:11:56 +01:00
CSettings* theConf = NULL;
int main(int argc, char *argv[])
{
2020-06-08 16:17:37 +01:00
QtSingleApplication app(argc, argv);
SB_STATUS Status = CSbieUtils::DoAssist();
if (Status.GetStatus()) {
app.sendMessage("Status:" + Status.GetText());
return 0;
}
if (app.sendMessage("ShowWnd"))
return 0;
2020-06-01 17:11:56 +01:00
theConf = new CSettings("Sandboxie-Plus");
//QThreadPool::globalInstance()->setMaxThreadCount(theConf->GetInt("Options/MaxThreadPool", 10));
CSandMan* pWnd = new CSandMan();
2020-06-08 16:17:37 +01:00
QObject::connect(&app, SIGNAL(messageReceived(const QString&)), pWnd, SLOT(OnMessage(const QString&)));
2020-06-01 17:11:56 +01:00
pWnd->show();
int ret = app.exec();
delete pWnd;
delete theConf;
theConf = NULL;
return ret;
}