UI: TaskManager uses model.

This commit is contained in:
Nodir Temirkhodjaev 2021-04-24 18:10:55 +03:00
parent 3a8e2c2762
commit a8d1142907
2 changed files with 24 additions and 23 deletions

View File

@ -104,12 +104,13 @@ void FortManager::initialize()
setupLogManager();
setupDriver();
setupTaskManager();
setupAppInfoCache();
setupHostInfoCache();
setupModels();
setupTaskManager();
loadConf();
}
@ -218,6 +219,17 @@ void FortManager::closeLogManager()
logManager()->close();
}
void FortManager::setupLogger()
{
Logger *logger = Logger::instance();
logger->setPath(settings()->logsPath());
logger->setActive(true);
logger->setDebug(settings()->debug());
logger->setConsole(settings()->console());
}
void FortManager::setupEventFilter()
{
m_nativeEventFilter = new NativeEventFilter(this);
@ -253,25 +265,6 @@ void FortManager::setupAppInfoManager()
appInfoManager()->initialize();
}
void FortManager::setupLogger()
{
Logger *logger = Logger::instance();
logger->setPath(settings()->logsPath());
logger->setActive(true);
logger->setDebug(settings()->debug());
logger->setConsole(settings()->console());
}
void FortManager::setupTaskManager()
{
connect(taskManager()->taskInfoZoneDownloader(), &TaskInfoZoneDownloader::zonesUpdated,
confManager(), &ConfManager::updateDriverZones);
taskManager()->initialize();
}
void FortManager::setupAppInfoCache()
{
m_appInfoCache = new AppInfoCache(this);
@ -301,6 +294,14 @@ void FortManager::setupModels()
connListModel()->setHostInfoCache(hostInfoCache());
}
void FortManager::setupTaskManager()
{
connect(taskManager()->taskInfoZoneDownloader(), &TaskInfoZoneDownloader::zonesUpdated,
confManager(), &ConfManager::updateDriverZones);
taskManager()->initialize();
}
void FortManager::setupMainWindow()
{
m_mainWindow = new MainWindow();

View File

@ -151,6 +151,7 @@ private:
void setupLogManager();
void closeLogManager();
void setupLogger();
void setupEventFilter();
void setupEnvManager();
@ -159,13 +160,12 @@ private:
void setupConfManager();
void setupAppInfoManager();
void setupLogger();
void setupTaskManager();
void setupAppInfoCache();
void setupHostInfoCache();
void setupModels();
void setupTaskManager();
void setupMainWindow();
void closeMainWindow();