Join all threads before destructing the renaming engine
This commit is contained in:
parent
246f4898df
commit
4387e50202
|
@ -36,6 +36,17 @@ RenamingEngine::RenamingEngine(QObject *parent)
|
||||||
connect(this, &RenamingEngine::changingsApplied, this, &RenamingEngine::processChangingsApplied);
|
connect(this, &RenamingEngine::changingsApplied, this, &RenamingEngine::processChangingsApplied);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RenamingEngine::~RenamingEngine()
|
||||||
|
{
|
||||||
|
#ifndef TAGEDITOR_NO_JSENGINE
|
||||||
|
for (auto *const child : children()) {
|
||||||
|
if (auto *const childThread = qobject_cast<QThread *>(child)) {
|
||||||
|
childThread->wait();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef TAGEDITOR_NO_JSENGINE
|
#ifndef TAGEDITOR_NO_JSENGINE
|
||||||
bool RenamingEngine::setProgram(const TAGEDITOR_JS_VALUE &program)
|
bool RenamingEngine::setProgram(const TAGEDITOR_JS_VALUE &program)
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,6 +56,7 @@ class RenamingEngine : public QObject {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RenamingEngine(QObject *parent = nullptr);
|
explicit RenamingEngine(QObject *parent = nullptr);
|
||||||
|
~RenamingEngine() override;
|
||||||
|
|
||||||
FileSystemItem *rootItem() const;
|
FileSystemItem *rootItem() const;
|
||||||
#ifndef TAGEDITOR_NO_JSENGINE
|
#ifndef TAGEDITOR_NO_JSENGINE
|
||||||
|
|
Loading…
Reference in New Issue