View Single Post
Old 11-20-2019, 03:01 PM   #30
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,958
Karma: 6361444
Join Date: Nov 2009
Device: many
Hi Becky,
Based on your testing, I just pushed the following to master:

Code:
void PluginRunner::cancelPlugin()
{
    // qDebug() << "in cancelPlugin()";
    if (m_process.state() == QProcess::Running) {
        m_process.terminate();
    }
    m_process.waitForFinished(2000);

    if (m_process.state() == QProcess::Running) {
        m_process.kill();
    }
    m_process.waitForFinished(2000);

    ui.okButton->setEnabled(true);

    ui.progressBar->setRange(0,100);
    ui.progressBar->reset();

    ui.textEdit->append(tr("Plugin cancelled"));
    ui.statusLbl->setText(tr("Status: cancelled"));
    ui.cancelButton->setEnabled(false);
}
Does this at least close all of the python windows? Any more crashes?

Combined it waits for 4 seconds to be a bit safer.
KevinH is offline   Reply With Quote