mirror of
https://github.com/tnodir/fort
synced 2024-11-15 07:25:18 +00:00
UI: Restart on profile drive's reattach
This commit is contained in:
parent
906dd7ec8d
commit
4a1a8ca574
@ -145,6 +145,8 @@ void ConfAppManager::setUp()
|
||||
purgeAppsOnStart();
|
||||
|
||||
setupAppEndTimer();
|
||||
|
||||
setupDbDriveMask();
|
||||
}
|
||||
|
||||
void ConfAppManager::purgeAppsOnStart()
|
||||
@ -180,6 +182,13 @@ void ConfAppManager::updateAppEndTimer()
|
||||
}
|
||||
}
|
||||
|
||||
void ConfAppManager::setupDbDriveMask()
|
||||
{
|
||||
const QString filePath = sqliteDb()->filePath();
|
||||
|
||||
m_dbDriveMask = FileUtil::driveMaskByPath(filePath);
|
||||
}
|
||||
|
||||
void ConfAppManager::emitAppAlerted()
|
||||
{
|
||||
m_appAlertedTimer.startTrigger();
|
||||
@ -497,10 +506,14 @@ bool ConfAppManager::updateDriverConf(bool onlyFlags)
|
||||
|
||||
void ConfAppManager::updateDriverConfByDriveMask(quint32 driveMask)
|
||||
{
|
||||
if ((m_driveMask & driveMask) == 0)
|
||||
if ((m_dbDriveMask & driveMask) != 0) {
|
||||
IoC<WindowManager>()->restart();
|
||||
return;
|
||||
}
|
||||
|
||||
updateDriverConf();
|
||||
if ((m_driveMask & driveMask) != 0) {
|
||||
updateDriverConf();
|
||||
}
|
||||
}
|
||||
|
||||
bool ConfAppManager::addOrUpdateApp(const App &app)
|
||||
|
@ -61,6 +61,8 @@ protected:
|
||||
virtual void setupAppEndTimer();
|
||||
void updateAppEndTimer();
|
||||
|
||||
void setupDbDriveMask();
|
||||
|
||||
private:
|
||||
bool deleteApp(qint64 appId, bool &isWildcard);
|
||||
|
||||
@ -86,6 +88,7 @@ private:
|
||||
bool checkEndTransaction(bool ok);
|
||||
|
||||
private:
|
||||
quint32 m_dbDriveMask = 0;
|
||||
quint32 m_driveMask = 0;
|
||||
|
||||
ConfManager *m_confManager = nullptr;
|
||||
|
@ -323,10 +323,9 @@ void FortManager::checkInstallDriver()
|
||||
const bool canInstallDriver = (settings->canInstallDriver() || settings->isPortable())
|
||||
&& settings->isMaster() && settings->isUserAdmin();
|
||||
|
||||
if (!canInstallDriver)
|
||||
return;
|
||||
|
||||
installDriver();
|
||||
if (canInstallDriver) {
|
||||
installDriver();
|
||||
}
|
||||
}
|
||||
|
||||
void FortManager::setupEnvManager()
|
||||
|
Loading…
Reference in New Issue
Block a user