Put ModelUploder on a different thread, not to block the rendering of the main window

This commit is contained in:
Atlante45 2014-04-07 13:46:38 -07:00
parent cec99caa47
commit b21fe02fa2

View file

@ -3245,9 +3245,12 @@ void Application::toggleRunningScriptsWidget()
void Application::uploadFST(bool isHead) { void Application::uploadFST(bool isHead) {
ModelUploader* uploader = new ModelUploader(isHead); ModelUploader* uploader = new ModelUploader(isHead);
if (uploader->zip()) { QThread* thread = new QThread();
uploader->send(); 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() { void Application::uploadHead() {