Compare commits
2 Commits
v1.3.12
...
1d4f50fb9f
Author | SHA1 | Date | |
---|---|---|---|
1d4f50fb9f | |||
a78040a037 |
@@ -83,10 +83,17 @@ bool GitClient::gitCloneCustomerRepository() {
|
||||
QRegularExpressionMatch match = re.match(result);
|
||||
if (match.hasMatch()) {
|
||||
if (re.captureCount() == 3) { // start with full match (0), then the other 3 matches
|
||||
if (match.captured(2).trimmed() == m_customerNr) {
|
||||
QString const &customerNr = match.captured(2).trimmed();
|
||||
if (customerNr == m_customerNr) {
|
||||
qInfo() << "CLONING" << m_repositoryPath << "OK";
|
||||
return true;
|
||||
}
|
||||
Utils::printCriticalErrorMsg(
|
||||
QString("ERROR CLONE RESULT HAS WRONG CUSTOMER-NR. rcc=%1 customer=%2 CLONE_RESULT=%3")
|
||||
.arg(re.captureCount())
|
||||
.arg(customerNr)
|
||||
.arg(result));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Utils::printCriticalErrorMsg(
|
||||
|
21
utils.cpp
21
utils.cpp
@@ -52,9 +52,19 @@ void Utils::printCriticalErrorMsg(QString const &errorMsg) {
|
||||
qCritical() << QString(80, 'E');
|
||||
}
|
||||
|
||||
void Utils::printUpdateStatusMsg(QString const &updateMsg) {
|
||||
void Utils::printCriticalErrorMsg(QStringList const &errorMsg) {
|
||||
qCritical() << QString(80, 'E');
|
||||
for (int i = 0; i < errorMsg.size(); ++i) {
|
||||
qCritical() << errorMsg.at(i);
|
||||
}
|
||||
qCritical() << QString(80, 'E');
|
||||
}
|
||||
|
||||
void Utils::printUpdateStatusMsg(QStringList const &updateMsg) {
|
||||
qCritical() << QString(80, 'U');
|
||||
qCritical() << updateMsg;
|
||||
for (int i = 0; i < updateMsg.size(); ++i) {
|
||||
qCritical() << updateMsg.at(i);
|
||||
}
|
||||
qCritical() << QString(80, 'U');
|
||||
}
|
||||
|
||||
@@ -62,7 +72,14 @@ void Utils::printInfoMsg(QString const &infoMsg) {
|
||||
qCritical() << QString(80, 'I');
|
||||
qCritical() << infoMsg;
|
||||
qCritical() << QString(80, 'I');
|
||||
}
|
||||
|
||||
void Utils::printInfoMsg(QStringList const &infoMsg) {
|
||||
qCritical() << QString(80, 'I');
|
||||
for (int i = 0; i < infoMsg.size(); ++i) {
|
||||
qCritical() << infoMsg.at(i);
|
||||
}
|
||||
qCritical() << QString(80, 'I');
|
||||
}
|
||||
|
||||
void Utils::printLineEditInfo(QStringList const &lines) {
|
||||
|
4
utils.h
4
utils.h
@@ -13,8 +13,10 @@ namespace Utils {
|
||||
int read1stLineOfFile(QString fileName);
|
||||
QString zoneName(quint8 i);
|
||||
void printCriticalErrorMsg(QString const &errorMsg);
|
||||
void printCriticalErrorMsg(QStringList const &errorMsg);
|
||||
void printInfoMsg(QString const &infoMsg);
|
||||
void printUpdateStatusMsg(QString const &updateMsg);
|
||||
void printInfoMsg(QStringList const &infoMsg);
|
||||
void printUpdateStatusMsg(QStringList const &updateMsg);
|
||||
void printLineEditInfo(QStringList const &lines);
|
||||
QString getTariffLoadTime(QString fileName);
|
||||
QString rstrip(QString const &str);
|
||||
|
Reference in New Issue
Block a user