Set version to 1.3.7: wait forever for git-commands to finish in QProcess.

This commit is contained in:
Gerhard Hoffmann 2023-10-05 10:54:19 +02:00
parent 2a2751f6f3
commit 2e7d33c4c8
2 changed files with 9 additions and 4 deletions

View File

@ -21,6 +21,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
# Fixed sending messages to ISMAS.
# Always execute contents of opkg_commands-file (even if there are no
# changes).
# 1.3.7 : Wait forever for git-commands to finish in QProcess executing such
# a command.
win32 {
BUILD_DATE=$$system("date /t")
@ -30,7 +32,7 @@ win32 {
BUILD_TIME=$$system("date +%H:%M:%S")
}
VERSION="1.3.6"
VERSION="1.3.7"
INCLUDEPATH += plugins

View File

@ -69,7 +69,10 @@ bool Command::execute(QString workingDirectory, QStringList args) {
qDebug() << "PROCESS" << m_command << "STARTED IN" << p->workingDirectory();
if (p->state() == QProcess::ProcessState::Running) {
qDebug() << "PROCESS" << m_command << "RUNNING IN" << p->workingDirectory();
if (p->waitForFinished(m_waitForFinishTimeout)) {
// wait forever fot git-commands to finish
int const wait = m_command.trimmed().startsWith("git", Qt::CaseInsensitive) ? -1 : m_waitForFinishTimeout;
bool const no_timeout = p->waitForFinished(wait);
if (no_timeout) {
qDebug() << "PROCESS" << m_command << "FINISHED IN" << p->workingDirectory();
if (p->exitStatus() == QProcess::NormalExit) {
if ((m_exitCode = p->exitCode()) == 0) {
@ -89,8 +92,8 @@ bool Command::execute(QString workingDirectory, QStringList args) {
}
} else {
qCritical() << "PROCESS" << m_command
<< "DID NOT FINISH"
<< "IN" << p->workingDirectory();
<< "DID NOT FINISH WITH" << wait
<< "MS IN" << p->workingDirectory();
}
} else {
qCritical() << "WRONG PROCESS STATE" << p->state()