mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-18 06:37:12 +02:00
Put ModelUploder on a different thread, not to block the rendering of the main window
This commit is contained in:
parent
cec99caa47
commit
b21fe02fa2
1 changed files with 6 additions and 3 deletions
|
@ -3245,9 +3245,12 @@ void Application::toggleRunningScriptsWidget()
|
|||
|
||||
void Application::uploadFST(bool isHead) {
|
||||
ModelUploader* uploader = new ModelUploader(isHead);
|
||||
if (uploader->zip()) {
|
||||
uploader->send();
|
||||
}
|
||||
QThread* thread = new QThread();
|
||||
thread->connect(uploader, SIGNAL(destroyed()), SLOT(quit()));
|
||||
thread->connect(thread, SIGNAL(finished()), SLOT(deleteLater()));
|
||||
uploader->connect(thread, SIGNAL(started()), SLOT(send()));
|
||||
|
||||
thread->start();
|
||||
}
|
||||
|
||||
void Application::uploadHead() {
|
||||
|
|
Loading…
Reference in a new issue