mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
XMRig: fix stop on windows
This commit is contained in:
parent
70f1846de6
commit
ff78b5a6c2
3 changed files with 7 additions and 8 deletions
|
@ -32,13 +32,13 @@ void XmRig::prepare() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmRig::stop() {
|
void XmRig::stop() {
|
||||||
if(m_process.state() == QProcess::Running)
|
if(m_process.state() == QProcess::Running) {
|
||||||
m_process.kill();
|
#if defined(Q_OS_WIN)
|
||||||
}
|
m_process.kill(); // https://doc.qt.io/qt-5/qprocess.html#terminate
|
||||||
|
#else
|
||||||
void XmRig::terminate() {
|
|
||||||
if(m_process.state() == QProcess::Running)
|
|
||||||
m_process.terminate();
|
m_process.terminate();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmRig::start(const QString &path,
|
void XmRig::start(const QString &path,
|
||||||
|
|
|
@ -25,7 +25,6 @@ public:
|
||||||
|
|
||||||
void start(const QString &path, unsigned int threads, const QString &address, const QString &username, const QString &password, bool tor = false, bool tls = true);
|
void start(const QString &path, unsigned int threads, const QString &address, const QString &username, const QString &password, bool tor = false, bool tls = true);
|
||||||
void stop();
|
void stop();
|
||||||
void terminate();
|
|
||||||
bool unpackBins();
|
bool unpackBins();
|
||||||
|
|
||||||
QString rigDir;
|
QString rigDir;
|
||||||
|
|
|
@ -185,7 +185,7 @@ void XMRigWidget::onStartClicked() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void XMRigWidget::onStopClicked() {
|
void XMRigWidget::onStopClicked() {
|
||||||
m_ctx->XMRig->terminate();
|
m_ctx->XMRig->stop();
|
||||||
ui->btn_start->setEnabled(true);
|
ui->btn_start->setEnabled(true);
|
||||||
ui->btn_stop->setEnabled(false);
|
ui->btn_stop->setEnabled(false);
|
||||||
ui->label_status->hide();
|
ui->label_status->hide();
|
||||||
|
|
Loading…
Reference in a new issue