checkin for saving current state

This commit is contained in:
2025-02-14 13:20:42 +01:00
parent ef9cc23093
commit 8db818f6cd
37 changed files with 1063 additions and 131 deletions

View File

@@ -5,23 +5,35 @@
CheckUpdateActivationCommand::CheckUpdateActivationCommand(QString const &command,
Worker *worker,
int nextCommandIndex,
int start_timeout,
int finish_timeout)
: UpdateCommand(command, worker, start_timeout, finish_timeout) {
: UpdateCommand(command, worker, nextCommandIndex, start_timeout, finish_timeout) {
}
void CheckUpdateActivationCommand::finished(int exitCode, QProcess::ExitStatus exitStatus) {
qCritical() << __func__ << ":" << __LINE__ << command() << exitCode << exitStatus;
return UpdateCommand::finished(exitCode, exitStatus);
}
void CheckUpdateActivationCommand::readyReadStandardOutput() {
QProcess *p = (QProcess *)sender();
if (p) {
QString s = p->readAllStandardOutput();
// TODO
Worker *w = worker();
if (w) {
//static constexpr const char *UPDATE_NOT_NECESSARY{"not necessary"};
//static constexpr const char *UPDATE_NOT_REQUESTED{"not requested"};
//static constexpr const char *UPDATE_REQUESTED{"requested"};
emit w->showUpdateRequest(UpdateCommand::UPDATE_REQUESTED);
QString s = p->readAllStandardOutput().trimmed();
if (s == UpdateCommand::UPDATE_REQUESTED) {
emit w->showUpdateRequest(UpdateCommand::UPDATE_REQUESTED);
} else
if (s == UpdateCommand::UPDATE_NOT_NECESSARY) {
emit w->showUpdateRequest(UpdateCommand::UPDATE_NOT_NECESSARY);
} else
if (s == UpdateCommand::UPDATE_NOT_REQUESTED) {
emit w->showUpdateRequest(UpdateCommand::UPDATE_NOT_REQUESTED);
} else
if (s == UpdateCommand::NO_CUSTOMER_REPOSITORY) {
emit w->showUpdateRequest(UpdateCommand::NO_CUSTOMER_REPOSITORY);
}
}
}
}