mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:57:57 +00:00
UI: Fix LogManager closing.
This commit is contained in:
parent
a24fc5a678
commit
bc37a34142
@ -38,8 +38,6 @@ void DriverManager::setupWorker()
|
||||
|
||||
void DriverManager::abortWorker()
|
||||
{
|
||||
m_driverWorker->disconnect(this);
|
||||
|
||||
m_driverWorker->abort();
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,8 @@ void DriverWorker::cancelAsyncIo()
|
||||
|
||||
void DriverWorker::abort()
|
||||
{
|
||||
if (m_aborted) return;
|
||||
|
||||
m_aborted = true;
|
||||
|
||||
cancelAsyncIo();
|
||||
|
@ -136,6 +136,7 @@ void FortManager::closeDriver()
|
||||
updateLogManager(false);
|
||||
|
||||
m_driverManager->closeDevice();
|
||||
m_logManager->close();
|
||||
}
|
||||
|
||||
void FortManager::setupDatabaseManager()
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "logmanager.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "../driver/driverworker.h"
|
||||
#include "../fortcommon.h"
|
||||
#include "logbuffer.h"
|
||||
@ -49,6 +51,13 @@ void LogManager::initialize()
|
||||
m_appStatModel->initialize();
|
||||
}
|
||||
|
||||
void LogManager::close()
|
||||
{
|
||||
QCoreApplication::sendPostedEvents(this);
|
||||
|
||||
m_driverWorker->disconnect(this);
|
||||
}
|
||||
|
||||
void LogManager::setupDriverWorker()
|
||||
{
|
||||
connect(m_driverWorker, &DriverWorker::readLogResult,
|
||||
|
@ -36,6 +36,7 @@ signals:
|
||||
void errorMessageChanged();
|
||||
|
||||
public slots:
|
||||
void close();
|
||||
|
||||
private slots:
|
||||
void processLogBuffer(LogBuffer *logBuffer, bool success,
|
||||
|
Loading…
Reference in New Issue
Block a user