feat: Change quit move thread logic.
This commit is contained in:
@@ -15,7 +15,7 @@ MoveWorker::MoveWorker(unsigned long ourPort, const std::string& ourTitle, QObje
|
||||
|
||||
MoveWorker::~MoveWorker()
|
||||
{
|
||||
mMoveStoreThread->quit();
|
||||
mMoveStoreThread->terminate();
|
||||
mMoveStoreThread->wait();
|
||||
mMoveStoreThread->deleteLater();
|
||||
return;
|
||||
@@ -106,6 +106,10 @@ void MoveWorker::moveByStudyInstanceUID(const QString& studyInstanceUID)
|
||||
{
|
||||
emit notifyMoveDone(0, mStrOutputDirectory);
|
||||
}
|
||||
else
|
||||
{
|
||||
emit notifyMoveDone(1, "");
|
||||
}
|
||||
}
|
||||
mScu->releaseAssociation();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ ImportWidget::~ImportWidget()
|
||||
|
||||
if (mMoveWorkerThread != nullptr && !mMoveWorkerThread->isFinished())
|
||||
{
|
||||
mMoveWorkerThread->exit();
|
||||
mMoveWorkerThread->terminate();
|
||||
mMoveWorkerThread->wait();
|
||||
delete mMoveWorkerThread;
|
||||
mMoveWorkerThread = nullptr;
|
||||
@@ -645,6 +645,7 @@ void ImportWidget::executeCMove(const QModelIndex ¤t)
|
||||
return;
|
||||
}
|
||||
mMoveWorker->setPacsInfo(peerIP,peerPort,peerTitle);
|
||||
mMoveWorker->setListenInfo(ourTitle, ourPort);
|
||||
mMoveWorker->setOutputDirectory(QString::fromStdString(outDirectory));
|
||||
|
||||
QMetaObject::invokeMethod(mMoveWorker, "moveByStudyInstanceUID", Qt::QueuedConnection, Q_ARG(QString, QString::fromStdString(studyInstanceUID)));
|
||||
|
||||
Reference in New Issue
Block a user