Skip to content

Commit

Permalink
concurrency issue is in version checker - disable temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
squinky86 committed Feb 23, 2021
1 parent 7b48149 commit 2890b17
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/stigqter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ STIGQter::STIGQter(QWidget *parent) :
UpdateRemapButton();

//check version number
auto *c = new WorkerCheckVersion();
ConnectThreads(c, false)->start(); //WorkerCheckVersion()
/*auto *c = new WorkerCheckVersion();
ConnectThreads(c, false)->start(); //WorkerCheckVersion()*/
}

/**
Expand Down Expand Up @@ -612,22 +612,22 @@ void STIGQter::closeEvent(QCloseEvent *event)
*/
void STIGQter::CleanThreads()
{
Q_FOREACH (auto *t, threads)
Q_FOREACH (auto *o, workers)
{
auto *t = o->thread();

if (t->isRunning())
continue;

t->wait();

QString connName = QString::number(reinterpret_cast<quint64>(t->currentThreadId()));
if (QSqlDatabase::connectionNames().contains(connName))
QSqlDatabase::removeDatabase(connName);
}
Q_FOREACH (const QObject *o, workers)
{

workers.removeOne(o);
threads.removeOne(t);
delete o;
}
workers.clear();
while (!threads.isEmpty())
{
auto *t = threads.takeFirst();
delete t;
}
}
Expand Down

0 comments on commit 2890b17

Please sign in to comment.