mirror of
https://github.com/tnodir/fort
synced 2024-11-15 03:36:07 +00:00
UI: Portable: Uninstall driver on exit
If there is no installed Service or boot-filter.
This commit is contained in:
parent
be47b3f6b3
commit
13ecc14775
@ -135,7 +135,7 @@ FortManager::FortManager(QObject *parent) : QObject(parent) { }
|
||||
FortManager::~FortManager()
|
||||
{
|
||||
if (m_initialized) {
|
||||
closeDriver();
|
||||
closeOrRemoveDriver();
|
||||
}
|
||||
|
||||
deleteManagers();
|
||||
@ -334,6 +334,20 @@ void FortManager::closeDriver()
|
||||
QCoreApplication::sendPostedEvents(this);
|
||||
}
|
||||
|
||||
void FortManager::closeOrRemoveDriver()
|
||||
{
|
||||
if (canInstallDriver() && !IoC<FortSettings>()->hasService()) {
|
||||
const FirewallConf *conf = IoC<ConfManager>()->conf();
|
||||
|
||||
if (!conf->bootFilter()) {
|
||||
removeDriver();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
closeDriver();
|
||||
}
|
||||
|
||||
bool FortManager::canInstallDriver() const
|
||||
{
|
||||
const auto settings = IoC<FortSettings>();
|
||||
|
@ -44,7 +44,10 @@ private:
|
||||
bool setupDriver();
|
||||
void closeDriver();
|
||||
|
||||
void closeOrRemoveDriver();
|
||||
|
||||
bool canInstallDriver() const;
|
||||
|
||||
void checkReinstallDriver();
|
||||
void checkDriverOpened();
|
||||
void checkStartService();
|
||||
|
Loading…
Reference in New Issue
Block a user