Extended displayed messages in text-edit.

This commit is contained in:
Gerhard Hoffmann 2023-08-04 13:48:40 +02:00
parent 44ad3caf2b
commit 4ad370ea46

View File

@ -132,6 +132,8 @@ void Worker::privateUpdate() {
QDir customerRepository(m_customerRepository); QDir customerRepository(m_customerRepository);
if (!customerRepository.exists()) { if (!customerRepository.exists()) {
if (m_gc.gitCloneAndCheckoutBranch()) { if (m_gc.gitCloneAndCheckoutBranch()) {
emit appendText("\nInitializing customer environment", UPDATE_STEP_DONE);
m_updateStatus = UpdateStatus(UPDATE_STATUS::UPDATE_PROCESS_SUCCESS, m_updateStatus = UpdateStatus(UPDATE_STATUS::UPDATE_PROCESS_SUCCESS,
QString("CLONED AND CHECKED OUT: ") + m_customerRepository); QString("CLONED AND CHECKED OUT: ") + m_customerRepository);
@ -144,13 +146,17 @@ void Worker::privateUpdate() {
QString("#M=APISM#C=CMD_EVENT#J=") + QString("#M=APISM#C=CMD_EVENT#J=") +
m_ismasClient.updateOfPSASucceeded("")); m_ismasClient.updateOfPSASucceeded(""));
emit setProgress(95); emit appendText(QString(""), UPDATE_STEP_SUCCESS);
m_ismasClient.setProgressInPercent(95);
emit setProgress(100);
m_ismasClient.setProgressInPercent(100);
IsmasClient::sendRequestReceiveResponse(IsmasClient::APISM::DB_PORT, IsmasClient::sendRequestReceiveResponse(IsmasClient::APISM::DB_PORT,
QString("#M=APISM#C=CMD_EVENT#J=") + m_ismasClient.updateOfPSAActivated()); QString("#M=APISM#C=CMD_EVENT#J=") + m_ismasClient.updateOfPSAActivated());
m_returnCode = 0; m_returnCode = 0;
} }
} else { } else {
qCritical() << "CHECKOUT BRANCH...";
// checkout branch // checkout branch
if (m_gc.gitCheckoutBranch()) { if (m_gc.gitCheckoutBranch()) {
int progress = 10; int progress = 10;
@ -228,21 +234,17 @@ void Worker::privateUpdate() {
m_returnCode = -1; m_returnCode = -1;
} }
} }
if (!sentIsmasLastVersionNotification) {
// try even if the backend is not connected
emit setProgress(100); emit setProgress(100);
m_ismasClient.setProgressInPercent(100); m_ismasClient.setProgressInPercent(100);
if (m_returnCode == 0) { if (!sentIsmasLastVersionNotification) {
IsmasClient::sendRequestReceiveResponse(IsmasClient::APISM::DB_PORT, // try even if the backend is not connected
QString("#M=APISM#C=CMD_EVENT#J=") + sendIsmasLastVersionNotification();
m_ismasClient.updateOfPSASucceeded(""));
emit appendText(QString(""), UPDATE_STEP_SUCCESS);
} else {
emit appendText(QString(""), UPDATE_STEP_FAIL);
} }
sendIsmasLastVersionNotification(); if (m_returnCode != 0) {
emit appendText(QString("Update process "), UPDATE_STEP_FAIL);
} }
m_updateProcessRunning = false; m_updateProcessRunning = false;