diff --git a/main.cpp b/main.cpp index 2209392..2ed518c 100644 --- a/main.cpp +++ b/main.cpp @@ -12,9 +12,6 @@ int main(int argc, char *argv[]) QCoreApplication::setApplicationName("RepRaptor"); QCoreApplication::setApplicationVersion(REPRAPTOR_VERSION); - //Set the priority, so the OS would not mess up serial communication - QThread::currentThread()->setPriority(QThread::HighestPriority); - MainWindow w; w.show(); diff --git a/mainwindow.cpp b/mainwindow.cpp index fbad59d..b7e74ed 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -129,6 +129,7 @@ MainWindow::MainWindow(QWidget *parent) : connect(parserWorker, &Parser::receivedSDDone, this, &MainWindow::receivedSDDone); connect(parserWorker, &Parser::receivedSDUpdate, this, &MainWindow::updateSDStatus); parserThread->start(); + parserThread->setPriority(QThread::HighestPriority); //Sender thread signal-slots and init senderWorker->moveToThread(senderThread);