Add some trace messages

This commit is contained in:
Gres 2020-05-01 15:20:21 +03:00
parent 63a008d067
commit b1655775bd
4 changed files with 10 additions and 2 deletions

View File

@ -31,8 +31,10 @@ Corrector::~Corrector()
{
workerThread_->quit();
const auto timeoutMs = 2000;
if (!workerThread_->wait(timeoutMs))
if (!workerThread_->wait(timeoutMs)) {
LTRACE() << "terminating hunspell thread";
workerThread_->terminate();
}
}
void Corrector::correct(const TaskPtr &task)

View File

@ -79,6 +79,7 @@ Manager::~Manager()
if (updateAutoChecker_ && updateAutoChecker_->isLastCheckDateChanged()) {
settings_->lastUpdateCheck = updateAutoChecker_->lastCheckDate();
settings_->saveLastUpdateCheck();
LTRACE() << "saved last update time";
}
}

View File

@ -62,8 +62,10 @@ Recognizer::~Recognizer()
{
workerThread_->quit();
const auto timeoutMs = 2000;
if (!workerThread_->wait(timeoutMs))
if (!workerThread_->wait(timeoutMs)) {
LTRACE() << "terminating tesseract thread";
workerThread_->terminate();
}
}
void Recognizer::updateSettings()

View File

@ -176,6 +176,7 @@ void Loader::handleReply(QNetworkReply *reply)
void Loader::checkForUpdates()
{
LTRACE() << "Loader::checkForUpdates";
startDownloadUpdates({});
}
@ -373,6 +374,7 @@ bool Loader::handleComponentReply(QNetworkReply *reply)
void Loader::finishUpdate(const QString &error)
{
LTRACE() << "Loader::finishUpdate";
currentActions_.clear();
for (const auto &i : downloads_) i.first->deleteLater();
downloads_.clear();
@ -385,6 +387,7 @@ void Loader::finishUpdate(const QString &error)
void Loader::commitUpdate()
{
LTRACE() << "Loader::commitUpdate";
SOFT_ASSERT(!currentActions_.empty(), return );
Installer installer(currentActions_);
if (installer.commit()) {