Compare commits
9 Commits
5577cc5d6d
...
d2e11d8f07
Author | SHA1 | Date | |
---|---|---|---|
d2e11d8f07 | |||
fbffdc923f | |||
8faf5af2bf | |||
1d532c13a4 | |||
d2d3afc28e | |||
f4bb201633 | |||
b68cf1fd1d | |||
0888c1b525 | |||
a6faf9ce21 |
@ -63,8 +63,9 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
# 1.3.17: Add ATBUpdateTool.ini and custom command line parser. Settings
|
||||
# given in ATBUpdateTool.ini can be overwritten on the command-line.
|
||||
# 1.3.18: Bug fixes found during testing.
|
||||
VERSION="1.3.19"
|
||||
# 1.3.19: Bug fixes found during testing.
|
||||
VERSION="1.3.20"
|
||||
# 1.3.20: Bug fixes found during testing.
|
||||
|
||||
# PLANNED TODOS:
|
||||
# 1: Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
|
||||
|
14
main.cpp
14
main.cpp
@ -85,6 +85,12 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
QString const rtPath = QCoreApplication::applicationDirPath();
|
||||
|
||||
int const machineNr = Utils::read1stLineOfFile("/mnt/system_data/machine_nr");
|
||||
int const customerNr = Utils::read1stLineOfFile("/mnt/system_data/cust_nr");
|
||||
int const zoneNr = Utils::read1stLineOfFile("/mnt/system_data/zone_nr");
|
||||
QString const branchName = (zoneNr != 0)
|
||||
? QString("zg1/zone%1").arg(zoneNr) : "master";
|
||||
|
||||
qInfo() << "pwd ......................" << rtPath;
|
||||
qInfo() << "repositoryUrl ............" << repositoryUrl;
|
||||
qInfo() << "plugInDir ................" << plugInDir;
|
||||
@ -99,6 +105,9 @@ int main(int argc, char *argv[]) {
|
||||
qInfo() << "showExtendedVersion ......" << showExtendedVersion;
|
||||
qInfo() << "iniFileName .............." << iniFileName;
|
||||
qInfo() << "extended-version ........." << APP_EXTENDED_VERSION;
|
||||
qInfo() << "machineNr ................" << machineNr;
|
||||
qInfo() << "customerNr ..............." << customerNr;
|
||||
qInfo() << "zoneNr ..................." << zoneNr;
|
||||
|
||||
if (showExtendedVersion) {
|
||||
printf(APP_EXTENDED_VERSION"\n");
|
||||
@ -113,11 +122,6 @@ int main(int argc, char *argv[]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int machineNr = Utils::read1stLineOfFile("/etc/machine_nr");
|
||||
int customerNr = Utils::read1stLineOfFile("/etc/cust_nr");
|
||||
int zoneNr = Utils::read1stLineOfFile("/etc/zone_nr");
|
||||
QString const branchName = (zoneNr != 0)
|
||||
? QString("zg1/zone%1").arg(zoneNr) : "master";
|
||||
|
||||
QThread::currentThread()->setObjectName("main thread");
|
||||
qInfo() << "Main thread" << QThread::currentThreadId();
|
||||
|
@ -208,13 +208,12 @@ void MainWindow::onAppendText(QString text, QString suffix) {
|
||||
// Utils::printLineEditInfo(editText.split('\n', QString::SplitBehavior::SkipEmptyParts));
|
||||
// ui->updateStatus->setText(editText.trimmed());
|
||||
|
||||
// scrollDownTextEdit();
|
||||
scrollDownTextEdit();
|
||||
}
|
||||
|
||||
void MainWindow::onReplaceLast(QStringList newTextLines, QString suffix) {
|
||||
// Utils::printInfoMsg(QString("ON REPLACE LAST (LIST) CALLED AT ")
|
||||
// + QDateTime::currentDateTime().toString(Qt::ISODateWithMs));
|
||||
|
||||
int const s = newTextLines.size();
|
||||
if (s > 0) {
|
||||
QString editText = ui->updateStatus->toPlainText();
|
||||
@ -249,11 +248,15 @@ void MainWindow::onReplaceLast(QStringList newTextLines, QString suffix) {
|
||||
void MainWindow::onReplaceLast(QString text, QString suffix) {
|
||||
// Utils::printInfoMsg(QString("ON REPLACE LAST (TEXT) CALLED AT ")
|
||||
// + QDateTime::currentDateTime().toString(Qt::ISODateWithMs));
|
||||
|
||||
QString editText = ui->updateStatus->toPlainText();
|
||||
QStringList lines = editText.split('\n', QString::SplitBehavior::SkipEmptyParts);
|
||||
if (lines.size() > 0) {
|
||||
// removing the last line is really meant for refreshing the last line
|
||||
// with a string very similar than the original one, typically only
|
||||
// followed by a suffix.
|
||||
if (lines.last().contains(text)) {
|
||||
lines.removeLast();
|
||||
}
|
||||
if (!suffix.isNull() && suffix.size() > 0 && suffix != "\n") {
|
||||
QString const add = text.leftJustified(m_width-10) + suffix;
|
||||
if (!add.isEmpty()) {
|
||||
|
@ -457,7 +457,7 @@ bool Worker::updateTriggerSet() {
|
||||
|
||||
GUI() << (ISMAS() << (CONSOLE() << UPDATE_STEP::CHECK_ISMAS_TRIGGER));
|
||||
|
||||
QString triggerValue("");
|
||||
QString triggerValue("NOT CHECKED YET");
|
||||
|
||||
for (int repeat = 1; repeat <= 100; ++repeat) {
|
||||
|
||||
@ -682,6 +682,9 @@ bool Worker::filesToUpdate() {
|
||||
}
|
||||
}
|
||||
m_filesToUpdate.removeDuplicates();
|
||||
|
||||
qCritical() << __PRETTY_FUNCTION__ << "FILES-TO-UPDATE" << m_filesToUpdate;
|
||||
|
||||
GUI(m_filesToUpdate) << (CONSOLE(m_filesToUpdate) << UPDATE_STEP::FILES_TO_UPDATE);
|
||||
setProgress(_FILES_TO_UPDATE);
|
||||
} else {
|
||||
@ -809,7 +812,7 @@ bool Worker::execOpkgCommands() {
|
||||
bool Worker::downloadFilesToPSAHardware() {
|
||||
m_displayIndex = 0;
|
||||
|
||||
GUI(m_filesToUpdate) << (CONSOLE(m_filesToUpdate) << UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE);
|
||||
GUI(m_filesToDownload) << (CONSOLE(m_filesToDownload) << UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE);
|
||||
setProgress(_DOWNLOAD_FILES_TO_PSA_HARDWARE);
|
||||
|
||||
if (m_noUpdatePsaHardware == false) {
|
||||
|
9
worker.h
9
worker.h
@ -520,8 +520,10 @@ private:
|
||||
break;
|
||||
case UPDATE_STEP::CHECK_FOR_REPOSITORY_CHANGES_FAILURE:
|
||||
break;
|
||||
case UPDATE_STEP::FILES_TO_UPDATE:
|
||||
break;
|
||||
case UPDATE_STEP::FILES_TO_UPDATE: {
|
||||
lst << instance->m_debugMsg;
|
||||
Utils::printUpdateStatusMsg(debug, lst);
|
||||
} break;
|
||||
case UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE: {
|
||||
lst << instance->m_debugMsg;
|
||||
Utils::printUpdateStatusMsg(debug, lst);
|
||||
@ -1173,7 +1175,8 @@ private:
|
||||
for (int i = 0; i < size; ++i) {
|
||||
emit worker->appendText(QString("\n ") + worker->m_filesToUpdate.at(i));
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (size == 1) {
|
||||
emit worker->appendText("Found 1 file to update :", UPDATE_STEP_DONE);
|
||||
emit worker->appendText(QString("\n ") + worker->m_filesToUpdate.at(0));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user