mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
feat: connection thread
This commit is contained in:
@@ -22,9 +22,8 @@ void MainWindow::Initialize()
|
||||
ui->startButton->setEnabled(false);
|
||||
|
||||
updateControllerThread = new QThread;
|
||||
updateControllerThread->setPriority(QThread::LowPriority);
|
||||
connectionThread = new QThread;
|
||||
connectionThread->setPriority(QThread::HighestPriority);
|
||||
|
||||
|
||||
client = new TCPClient;
|
||||
client->moveToThread(connectionThread);
|
||||
@@ -44,17 +43,20 @@ void MainWindow::Initialize()
|
||||
connect(recognizeSystem,&RecognizeSystem::onSendDebugLog,this,&MainWindow::DebugLog);
|
||||
connect(recognizeSystem,&RecognizeSystem::SockedDisabled,this,&MainWindow::LostConnection);
|
||||
connect(recognizeSystem,&RecognizeSystem::SaveLoginData,this,&MainWindow::CheckLoginResult);
|
||||
connect(recognizeSystem,&RecognizeSystem::SocketWaitForReadyRead,client,&TCPClient::WaitRead);
|
||||
connect(recognizeSystem,&RecognizeSystem::SocketWaitForReadyRead,client,&TCPClient::WaitRead,Qt::AutoConnection);
|
||||
|
||||
connectionThread->start();
|
||||
updateControllerThread->start();
|
||||
|
||||
connect(client,&TCPClient::onSendDebugLog,this,&MainWindow::DebugLog);
|
||||
updateControllerThread->setPriority(QThread::LowPriority);
|
||||
connectionThread->setPriority(QThread::HighestPriority);
|
||||
|
||||
connect(this,&MainWindow::onInitializeClient,client,&TCPClient::Initialize);
|
||||
connect(this,&MainWindow::onSetConnect,client,&TCPClient::SetConnect);
|
||||
connect(this,&MainWindow::onSendMessage,client,&TCPClient::MessageEntered);
|
||||
connect(this,&MainWindow::SendClientAuthorization,client,&TCPClient::SendClientAutorization);
|
||||
connect(client,&TCPClient::onSendDebugLog,this,&MainWindow::DebugLog,Qt::AutoConnection);
|
||||
|
||||
connect(this,&MainWindow::onInitializeClient,client,&TCPClient::Initialize,Qt::AutoConnection);
|
||||
connect(this,&MainWindow::onSetConnect,client,&TCPClient::SetConnect,Qt::AutoConnection); //умирает
|
||||
connect(this,&MainWindow::onSendMessage,client,&TCPClient::MessageEntered,Qt::AutoConnection);
|
||||
connect(this,&MainWindow::SendClientAuthorization,client,&TCPClient::SendClientAutorization,Qt::AutoConnection);
|
||||
|
||||
connect(this,&MainWindow::onCalculateHash,updateController,&UpdateController::CalculateHash);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user