Make failed external commands reset
This commit is contained in:
parent
567135d0ec
commit
f09bfe37d4
@ -85,7 +85,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent), ui(new Ui::Se
|
||||
#endif
|
||||
ui->fpsMax->setValue(settings::settings().value("recording/framerate", 30).toInt());
|
||||
ui->focusedCapture->setText(settings::settings().value("command/activeCommand", "").toString());
|
||||
ui->fullscreenCapture->setText(settings::settings().value("command/fullscreenCommand", 0).toString());
|
||||
ui->fullscreenCapture->setText(settings::settings().value("command/fullscreenCommand", "").toString());
|
||||
}
|
||||
|
||||
void SettingsDialog::setScheme(QString scheme) {
|
||||
|
@ -148,6 +148,9 @@ void utils::externalScreenshot(std::function<void(QPixmap)> callback) {
|
||||
}
|
||||
QFile(tempPath).remove();
|
||||
});
|
||||
QObject::connect(process, &QProcess::errorOccurred, [](QProcess::ProcessError err) {
|
||||
if (err == QProcess::FailedToStart) settings::settings().remove("command/fullscreenCommand");
|
||||
});
|
||||
process->start(args.takeFirst(), args);
|
||||
}
|
||||
|
||||
@ -177,5 +180,8 @@ void utils::externalScreenshotActive(std::function<void(QPixmap)> callback) {
|
||||
}
|
||||
QFile(tempPath).remove();
|
||||
});
|
||||
QObject::connect(process, &QProcess::errorOccurred, [](QProcess::ProcessError err) {
|
||||
if (err == QProcess::FailedToStart) settings::settings().remove("command/activeCommand");
|
||||
});
|
||||
process->start(args.takeFirst(), args);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user