Compare commits
No commits in common. "b25b66395fda5fcc09b02ad08c0562ff95142c67" and "8db818f6cd478cf6b52c3fd9577c34bdbf78e982" have entirely different histories.
b25b66395f
...
8db818f6cd
@ -1,6 +1,6 @@
|
|||||||
QT += core
|
QT += core
|
||||||
|
|
||||||
TARGET = ATBUpdateOpkg
|
TARGET = ExecOpkgCmds
|
||||||
|
|
||||||
VERSION="1.0.0"
|
VERSION="1.0.0"
|
||||||
win32 {
|
win32 {
|
||||||
@ -64,17 +64,9 @@ contains( CONFIG, DesktopLinux ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
main.cpp \
|
main.cpp
|
||||||
message_handler.cpp \
|
|
||||||
../common/src/utils_internal.cpp \
|
|
||||||
../common/src/command.cpp \
|
|
||||||
opkg_command.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
# HEADERS += \
|
||||||
message_handler.h \
|
|
||||||
../common/include/utils_internal.h \
|
|
||||||
../common/include/command.h \
|
|
||||||
opkg_command.h
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# for running program on target through QtCreator
|
# for running program on target through QtCreator
|
||||||
|
@ -4,66 +4,11 @@
|
|||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <QCommandLineOption>
|
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "message_handler.h"
|
|
||||||
#include "utils_internal.h"
|
|
||||||
#include "opkg_command.h"
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
QByteArray const value = qgetenv("LC_ALL");
|
|
||||||
if (value.isEmpty() || value != "C") {
|
|
||||||
qputenv("LC_ALL", "C");
|
|
||||||
}
|
|
||||||
|
|
||||||
openlog("ATB-UPDATE-OPKG", LOG_PERROR | LOG_PID | LOG_CONS, LOG_USER);
|
|
||||||
|
|
||||||
QCoreApplication a(argc, argv);
|
|
||||||
QCoreApplication::setApplicationName("ATBUpdateOpkg");
|
|
||||||
QCoreApplication::setApplicationVersion(APP_VERSION);
|
|
||||||
|
|
||||||
if (!messageHandlerInstalled()) { // change internal qt-QDebug-handling
|
|
||||||
atbInstallMessageHandler(nullptr);
|
|
||||||
//atbInstallMessageHandler(atbDebugOutput);
|
|
||||||
setDebugLevel(LOG_NOTICE);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
QString s = "<OPKG>\n\naaa<OPKG>bbb<OPKG>ccc<OPKG>\n";
|
|
||||||
QString m_standardOutput{};
|
|
||||||
if (!s.isEmpty()) {
|
|
||||||
m_standardOutput += s.replace(QChar('\n'), "");
|
|
||||||
qCritical() << m_standardOutput;
|
|
||||||
|
|
||||||
int startIndex, endIndex{};
|
|
||||||
while (((startIndex = m_standardOutput.indexOf("<OPKG>")) == 0) &&
|
|
||||||
((endIndex = m_standardOutput.indexOf("<OPKG>", 1)) != -1)) {
|
|
||||||
QString str = m_standardOutput.mid(0, endIndex);
|
|
||||||
qCritical() << "str" << str << str.mid(6);
|
|
||||||
m_standardOutput = m_standardOutput.mid(endIndex);
|
|
||||||
// qCritical() << "m" << m_standardOutput;
|
|
||||||
}
|
|
||||||
qCritical() << "m" << m_standardOutput;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QCommandLineParser parser;
|
|
||||||
QCommandLineOption noactionOption("noaction");
|
|
||||||
QCommandLineOption verboseOption("verbose");
|
|
||||||
parser.addOption(noactionOption);
|
|
||||||
parser.addOption(verboseOption);
|
|
||||||
parser.process(a);
|
|
||||||
|
|
||||||
bool noaction = parser.isSet(noactionOption);
|
|
||||||
OpkgCommand opkgCmd(noaction);
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
#include "message_handler.h"
|
|
||||||
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <cstring>
|
|
||||||
#include <QString>
|
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QMessageLogContext>
|
|
||||||
|
|
||||||
|
|
||||||
static char const *DBG_NAME[] = { "DBG ", "WARN ", "CRIT ", "FATAL", "INFO " };
|
|
||||||
static bool installedMsgHandler = false;
|
|
||||||
static int debugLevel = LOG_NOTICE;
|
|
||||||
|
|
||||||
int getDebugLevel() { return debugLevel; }
|
|
||||||
void setDebugLevel(int newDebugLevel) {
|
|
||||||
debugLevel = newDebugLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool messageHandlerInstalled() {
|
|
||||||
return installedMsgHandler;
|
|
||||||
}
|
|
||||||
|
|
||||||
QtMessageHandler atbInstallMessageHandler(QtMessageHandler handler) {
|
|
||||||
installedMsgHandler = (handler != 0);
|
|
||||||
static QtMessageHandler prevHandler = nullptr;
|
|
||||||
if (handler) {
|
|
||||||
prevHandler = qInstallMessageHandler(handler);
|
|
||||||
return prevHandler;
|
|
||||||
} else {
|
|
||||||
return qInstallMessageHandler(prevHandler);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
///
|
|
||||||
/// \brief Print message according to given debug level.
|
|
||||||
///
|
|
||||||
/// \note Install this function using qInstallMsgHandler().
|
|
||||||
///
|
|
||||||
/// int main(int argc, char **argv) {
|
|
||||||
/// installMsgHandler(atbDebugOutput);
|
|
||||||
/// QApplication app(argc, argv);
|
|
||||||
/// ...
|
|
||||||
/// return app.exec();
|
|
||||||
/// }
|
|
||||||
///
|
|
||||||
#if (QT_VERSION > QT_VERSION_CHECK(5, 0, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
|
||||||
void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) {
|
|
||||||
Q_UNUSED(context);
|
|
||||||
QString const localMsg = QString(DBG_NAME[type]) + msg.toLocal8Bit();
|
|
||||||
|
|
||||||
switch (debugLevel) {
|
|
||||||
case LOG_DEBUG: { // debug-level message
|
|
||||||
syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
|
|
||||||
} break;
|
|
||||||
case LOG_INFO: { // informational message
|
|
||||||
if (type != QtDebugMsg) {
|
|
||||||
syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case LOG_NOTICE: { // normal, but significant, condition
|
|
||||||
if (type != QtDebugMsg) {
|
|
||||||
syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case LOG_WARNING: { // warning conditions
|
|
||||||
if (type != QtInfoMsg && type != QtDebugMsg) {
|
|
||||||
syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case LOG_ERR: { // error conditions
|
|
||||||
if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
|
|
||||||
syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case LOG_CRIT: { // critical conditions
|
|
||||||
if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
|
|
||||||
syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case LOG_ALERT: { // action must be taken immediately
|
|
||||||
if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
|
|
||||||
syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case LOG_EMERG: { // system is unusable
|
|
||||||
if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
|
|
||||||
syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
default: {
|
|
||||||
//fprintf(stderr, "%s No ErrorLevel defined! %s\n",
|
|
||||||
// datetime.toStdString().c_str(), msg.toStdString().c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
#ifndef MESSAGE_HANDLER_H_INCLUDED
|
|
||||||
#define MESSAGE_HANDLER_H_INCLUDED
|
|
||||||
|
|
||||||
#include <QtGlobal>
|
|
||||||
#ifdef __linux__
|
|
||||||
#include <syslog.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int getDebugLevel();
|
|
||||||
void setDebugLevel(int newDebugLevel);
|
|
||||||
|
|
||||||
bool messageHandlerInstalled();
|
|
||||||
QtMessageHandler atbInstallMessageHandler(QtMessageHandler handler);
|
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
|
||||||
// typedef void (*QtMessageHandler)(QtMsgType, const char *);
|
|
||||||
void atbDebugOutput(QtMsgType type, const char *msg);
|
|
||||||
#elif QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
// typedef void (*QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &);
|
|
||||||
void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // MESSAGE_HANDLER_H_INCLUDED
|
|
@ -1,176 +0,0 @@
|
|||||||
#include "opkg_command.h"
|
|
||||||
|
|
||||||
#include "command.h"
|
|
||||||
#include "utils_internal.h"
|
|
||||||
using namespace internal;
|
|
||||||
|
|
||||||
#include <QDir>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QFlags>
|
|
||||||
#include <QRegularExpression>
|
|
||||||
|
|
||||||
OpkgCommand::OpkgCommand(bool noaction, QString const &opkg_commands_filename)
|
|
||||||
: m_noaction(noaction)
|
|
||||||
, m_opkg_commands_filename(opkg_commands_filename) {
|
|
||||||
cleanUpOpkgCache();
|
|
||||||
execCommandsInternal();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OpkgCommand::readCommands() {
|
|
||||||
QFile opkgFile(QDir::cleanPath(m_opkg_commands_dir + QDir::separator() + m_opkg_commands_filename));
|
|
||||||
if (!opkgFile.exists()) {
|
|
||||||
qCritical() << __func__ << ":" << __LINE__
|
|
||||||
<< opkgFile.fileName() << "does not exists";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_commands.clear();
|
|
||||||
|
|
||||||
if (opkgFile.open(QIODevice::ReadOnly)) {
|
|
||||||
QTextStream in(&opkgFile);
|
|
||||||
while (!in.atEnd()) {
|
|
||||||
QString line = in.readLine();
|
|
||||||
// TODO: "^\\s*[#]{0,}$" : empty line or comment line starting with #
|
|
||||||
static const QRegularExpression comment("^\\s*[#].*$");
|
|
||||||
static const QRegularExpression emptyLine("^\\s*$");
|
|
||||||
if (line.indexOf(emptyLine, 0) == -1 &&
|
|
||||||
line.indexOf(comment, 0) == -1) {
|
|
||||||
QString const &commandLine = line.trimmed();
|
|
||||||
if (!commandLine.isEmpty()) {
|
|
||||||
m_commands << commandLine;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
qCritical() << __func__ << ":" << __LINE__
|
|
||||||
<< "error opening" << opkgFile.fileName();
|
|
||||||
}
|
|
||||||
|
|
||||||
return m_commands.size() > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OpkgCommand::execCommandsInternal() {
|
|
||||||
if (readCommands()) {
|
|
||||||
// command lines are located between markers: <OPKG>...<OPKG>
|
|
||||||
// they are later removed when used by the update-tool.
|
|
||||||
qCritical().noquote() << "<OPKG>";
|
|
||||||
QListIterator<QString> it(m_commands);
|
|
||||||
while (it.hasNext()) {
|
|
||||||
QString command = it.next();
|
|
||||||
QStringList cmdAndOptions = command.split(u' ', QString::SkipEmptyParts);
|
|
||||||
if (cmdAndOptions.size() > 0) {
|
|
||||||
QString const &cmd = cmdAndOptions.takeFirst();
|
|
||||||
if (m_noaction) {
|
|
||||||
if (cmd.contains("opkg")) {
|
|
||||||
cmdAndOptions.prepend("--noaction");
|
|
||||||
} else continue; // only opkg has the --noaction option
|
|
||||||
}
|
|
||||||
QStringList const &options = cmdAndOptions;
|
|
||||||
if (exec(cmd, options)) {
|
|
||||||
qCritical().noquote() << cmd << options.join(" ") << "ok" << "<OPKG>";
|
|
||||||
} else {
|
|
||||||
qCritical().noquote() << cmd << options.join(" ") << "FAIL" << "<OPKG>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OpkgCommand::execCommands() {
|
|
||||||
if (readCommands()) {
|
|
||||||
QListIterator<QString> it(m_commands);
|
|
||||||
while (it.hasNext()) {
|
|
||||||
QString command = it.next();
|
|
||||||
QStringList cmdAndOptions = command.split(u' ', QString::SkipEmptyParts);
|
|
||||||
if (cmdAndOptions.size() > 0) {
|
|
||||||
QString const &cmd = cmdAndOptions.takeFirst();
|
|
||||||
if (m_noaction) {
|
|
||||||
cmdAndOptions.prepend("--noaction");
|
|
||||||
}
|
|
||||||
QStringList const &options = cmdAndOptions;
|
|
||||||
if (exec(cmd, options)) {
|
|
||||||
qCritical().noquote() << cmd << options.join(" ");
|
|
||||||
} else {
|
|
||||||
qCritical().noquote() << cmd << options.join(" ") << "FAIL";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
QFile opkgFile(QDir::cleanPath(m_opkg_commands_dir + QDir::separator() + m_opkg_commands_filename));
|
|
||||||
if (!opkgFile.exists()) {
|
|
||||||
qCritical() << __func__ << ":" << __LINE__
|
|
||||||
<< opkgFile.fileName() << "does not exists";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (opkgFile.open(QIODevice::ReadOnly)) {
|
|
||||||
QTextStream in(&opkgFile);
|
|
||||||
while (!in.atEnd()) {
|
|
||||||
QString line = in.readLine();
|
|
||||||
// TODO: "^\\s*[#]{0,}$" : empty line or comment line starting with #
|
|
||||||
static const QRegularExpression comment("^\\s*[#].*$");
|
|
||||||
static const QRegularExpression emptyLine("^\\s*$");
|
|
||||||
if (line.indexOf(emptyLine, 0) == -1 &&
|
|
||||||
line.indexOf(comment, 0) == -1) {
|
|
||||||
QString const &commandLine = line.trimmed();
|
|
||||||
if (!commandLine.isEmpty()) {
|
|
||||||
QStringList cmdAndOptions = commandLine.split(u' ', QString::SkipEmptyParts);
|
|
||||||
if (cmdAndOptions.size() > 0) {
|
|
||||||
QString const &cmd = cmdAndOptions.takeFirst();
|
|
||||||
if (m_noaction) {
|
|
||||||
cmdAndOptions.prepend("--noaction");
|
|
||||||
}
|
|
||||||
QStringList const &options = cmdAndOptions;
|
|
||||||
if (exec(cmd, options)) {
|
|
||||||
qCritical().noquote() << cmd << options.join(" ") << "ok";
|
|
||||||
} else {
|
|
||||||
qCritical().noquote() << cmd << options.join(" ") << "FAIL";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
qCritical() << __func__ << ":" << __LINE__
|
|
||||||
<< "error opening" << opkgFile.fileName();
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OpkgCommand::exec(QString const &cmd, QStringList const &options,
|
|
||||||
int start_timeout, int finish_timeout) {
|
|
||||||
bool const verbose = false;
|
|
||||||
return Command(cmd, options, "/tmp", verbose, start_timeout, finish_timeout).exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OpkgCommand::cleanUpOpkgCache() {
|
|
||||||
bool removedFiles = true;
|
|
||||||
QDir dir("/var/cache/opkg/");
|
|
||||||
if (dir.exists()) {
|
|
||||||
dir.setNameFilters(QStringList() << ".gz" << ".ipk");
|
|
||||||
dir.setFilter(QDir::Files);
|
|
||||||
foreach(QString dirFile, dir.entryList()) {
|
|
||||||
removedFiles &= dir.remove(dirFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (removedFiles == false) {
|
|
||||||
qCritical() << "some errors while cleaning up opkg-cache";
|
|
||||||
}
|
|
||||||
|
|
||||||
return removedFiles;
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
#ifndef OPKG_COMMND_H_INCLUDED
|
|
||||||
#define OPKG_COMMND_H_INCLUDED
|
|
||||||
|
|
||||||
#include <QStringList>
|
|
||||||
|
|
||||||
class OpkgCommand {
|
|
||||||
QString const m_opkg_commands_dir{"/etc/psa_update/"};
|
|
||||||
bool m_noaction;
|
|
||||||
QString m_opkg_commands_filename;
|
|
||||||
QStringList m_commands;
|
|
||||||
|
|
||||||
bool execCommands();
|
|
||||||
bool execCommandsInternal();
|
|
||||||
bool cleanUpOpkgCache();
|
|
||||||
|
|
||||||
public:
|
|
||||||
OpkgCommand(bool noaction = false,
|
|
||||||
QString const &opkg_commands_file_name="opkg_commands");
|
|
||||||
|
|
||||||
bool exec(QString const &cmd, QStringList const &options,
|
|
||||||
int start_timeout = 100000, int finish_timeout = 100000);
|
|
||||||
|
|
||||||
QStringList commands() { return m_commands; }
|
|
||||||
QStringList const &commands() const { return m_commands; }
|
|
||||||
|
|
||||||
bool readCommands();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // OPKG_COMMND_H_INCLUDED
|
|
@ -95,8 +95,6 @@ MainWindow::MainWindow(Worker *worker, QWidget *parent)
|
|||||||
connect(m_worker, SIGNAL(showUpdateRequest(QString)),this,SLOT(onShowUpdateRequest(QString)));
|
connect(m_worker, SIGNAL(showUpdateRequest(QString)),this,SLOT(onShowUpdateRequest(QString)));
|
||||||
connect(m_worker, SIGNAL(showCustRepoStatus(QString)),this,SLOT(onShowCustRepoStatus(QString)));
|
connect(m_worker, SIGNAL(showCustRepoStatus(QString)),this,SLOT(onShowCustRepoStatus(QString)));
|
||||||
connect(m_worker, SIGNAL(showExecOpkgStatus(QString)),this,SLOT(onShowExecOpkgStatus(QString)));
|
connect(m_worker, SIGNAL(showExecOpkgStatus(QString)),this,SLOT(onShowExecOpkgStatus(QString)));
|
||||||
connect(m_worker, SIGNAL(showExecOpkgCommand(QString)),this,SLOT(onShowExecOpkgCommand(QString)));
|
|
||||||
connect(m_worker, SIGNAL(showExecOpkgOverallResult(QString, bool)),this,SLOT(onShowExecOpkgOverallResult(QString,bool)));
|
|
||||||
connect(m_worker, SIGNAL(showDownloadDCJsonFilesStatus(QString)),this,SLOT(onShowDownloadDCJsonFilesStatus(QString)));
|
connect(m_worker, SIGNAL(showDownloadDCJsonFilesStatus(QString)),this,SLOT(onShowDownloadDCJsonFilesStatus(QString)));
|
||||||
connect(m_worker, SIGNAL(showSyncCustRepoStatus(QString)),this,SLOT(onShowSyncCustRepoStatus(QString)));
|
connect(m_worker, SIGNAL(showSyncCustRepoStatus(QString)),this,SLOT(onShowSyncCustRepoStatus(QString)));
|
||||||
connect(m_worker, SIGNAL(showUpdateDCFirmware(QString)),this,SLOT(onShowUpdateDCFirmware(QString)));
|
connect(m_worker, SIGNAL(showUpdateDCFirmware(QString)),this,SLOT(onShowUpdateDCFirmware(QString)));
|
||||||
@ -151,12 +149,11 @@ void MainWindow::onShowTariffUpdate(QString) {
|
|||||||
void MainWindow::onShowISMASConnectivity(QString status) {
|
void MainWindow::onShowISMASConnectivity(QString status) {
|
||||||
// ausgabe: connected, not connected, connecting
|
// ausgabe: connected, not connected, connecting
|
||||||
|
|
||||||
m_stepLabelChopCount = 0;
|
|
||||||
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
||||||
|
|
||||||
QString s = ui->stepLabel->text();
|
QString s = ui->stepLabel->text();
|
||||||
|
|
||||||
QString tmp("Check backend connection (ISMAS) ");
|
QString tmp("backend connection (ISMAS) ");
|
||||||
int len = m_showLineLength - tmp.length();
|
int len = m_showLineLength - tmp.length();
|
||||||
while (--len > 0) {
|
while (--len > 0) {
|
||||||
tmp += " ";
|
tmp += " ";
|
||||||
@ -187,10 +184,6 @@ void MainWindow::onShowISMASConnectivity(QString status) {
|
|||||||
s += QString( "%1 <font color='Red'>UNKNOWN STATUS</font><br />").arg(tmp);
|
s += QString( "%1 <font color='Red'>UNKNOWN STATUS</font><br />").arg(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_stepLabelChopCount = -s.length();
|
|
||||||
s += "Check update request";
|
|
||||||
m_stepLabelChopCount += s.length();
|
|
||||||
|
|
||||||
ui->stepLabel->setText(s);
|
ui->stepLabel->setText(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,9 +191,8 @@ void MainWindow::onShowCustRepoStatus(QString status) {
|
|||||||
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
||||||
|
|
||||||
QString s = ui->stepLabel->text();
|
QString s = ui->stepLabel->text();
|
||||||
s.chop(m_stepLabelChopCount);
|
|
||||||
|
|
||||||
QString tmp("Check customer repository ");
|
QString tmp("customer repository ");
|
||||||
int len = m_showLineLength - tmp.length();
|
int len = m_showLineLength - tmp.length();
|
||||||
while (--len > 0) {
|
while (--len > 0) {
|
||||||
tmp += " ";
|
tmp += " ";
|
||||||
@ -212,10 +204,6 @@ void MainWindow::onShowCustRepoStatus(QString status) {
|
|||||||
s += QString( "%1 <font color='Red'>UNKNOWN STATUS</font><br />").arg(tmp);
|
s += QString( "%1 <font color='Red'>UNKNOWN STATUS</font><br />").arg(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_stepLabelChopCount = -s.length();
|
|
||||||
s += "Install SW packets (dry run)";
|
|
||||||
m_stepLabelChopCount += s.length();
|
|
||||||
|
|
||||||
ui->stepLabel->setText(s);
|
ui->stepLabel->setText(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,57 +228,12 @@ void MainWindow::onShowExecOpkgStatus(QString status) {
|
|||||||
ui->stepLabel->setText(s);
|
ui->stepLabel->setText(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onShowExecOpkgCommand(QString cmd) {
|
|
||||||
qCritical() << __func__ << ":" << __LINE__ << "cmd" << cmd;
|
|
||||||
|
|
||||||
if (cmd.back() != QChar('\n')) {
|
|
||||||
cmd += "\n";
|
|
||||||
}
|
|
||||||
onInsertText(cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::onShowExecOpkgOverallResult(QString status, bool noaction) {
|
|
||||||
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
|
||||||
|
|
||||||
QString s = ui->stepLabel->text();
|
|
||||||
s.chop(m_stepLabelChopCount);
|
|
||||||
|
|
||||||
QString tmp = noaction ? "Install SW packets (dry run) " : "Install SW packets ";
|
|
||||||
int len = m_showLineLength - tmp.length();
|
|
||||||
|
|
||||||
while (--len > 0) {
|
|
||||||
tmp += " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (status.contains(internal::EXEC_OPKG_COMMANDS_SUCCESS, Qt::CaseInsensitive)) {
|
|
||||||
s += QString("%1 <font color='Green'>success</font><br />").arg(tmp);
|
|
||||||
} else
|
|
||||||
if (status.contains(internal::EXEC_OPKG_COMMANDS_FAIL, Qt::CaseInsensitive)) {
|
|
||||||
s += QString("%1 <font color='Red'>%2</font><br />").arg(tmp).arg(internal::EXEC_OPKG_COMMANDS_FAIL);
|
|
||||||
} else {
|
|
||||||
s += QString( "%1 <font color='Red'>UNKNOWN STATUS</font><br />").arg(tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (noaction) {
|
|
||||||
m_stepLabelChopCount = -s.length();
|
|
||||||
s += "Install SW packets";
|
|
||||||
m_stepLabelChopCount += s.length();
|
|
||||||
} else {
|
|
||||||
m_stepLabelChopCount = -s.length();
|
|
||||||
s += "Install DC configuration";
|
|
||||||
m_stepLabelChopCount += s.length();
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->stepLabel->setText(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::onShowDownloadDCJsonFilesStatus(QString status) {
|
void MainWindow::onShowDownloadDCJsonFilesStatus(QString status) {
|
||||||
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
||||||
|
|
||||||
QString s = ui->stepLabel->text();
|
QString s = ui->stepLabel->text();
|
||||||
s.chop(m_stepLabelChopCount);
|
|
||||||
|
|
||||||
QString tmp = "Install DC configuration ";
|
QString tmp = "configure device controller ";
|
||||||
int len = m_showLineLength - tmp.length();
|
int len = m_showLineLength - tmp.length();
|
||||||
|
|
||||||
while (--len > 0) {
|
while (--len > 0) {
|
||||||
@ -303,10 +246,6 @@ void MainWindow::onShowDownloadDCJsonFilesStatus(QString status) {
|
|||||||
s += QString( "%1 <font color='Red'>UNKNOWN STATUS</font><br />").arg(tmp);
|
s += QString( "%1 <font color='Red'>UNKNOWN STATUS</font><br />").arg(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_stepLabelChopCount = -s.length();
|
|
||||||
s += "Synchronize repository/filesystem";
|
|
||||||
m_stepLabelChopCount += s.length();
|
|
||||||
|
|
||||||
ui->stepLabel->setText(s);
|
ui->stepLabel->setText(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,9 +253,8 @@ void MainWindow::onShowSyncCustRepoStatus(QString status) {
|
|||||||
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
||||||
|
|
||||||
QString s = ui->stepLabel->text();
|
QString s = ui->stepLabel->text();
|
||||||
s.chop(m_stepLabelChopCount);
|
|
||||||
|
|
||||||
QString tmp = "Synchronize repository/filesystem ";
|
QString tmp = "synchronize repository/filesystem ";
|
||||||
int len = m_showLineLength - tmp.length();
|
int len = m_showLineLength - tmp.length();
|
||||||
|
|
||||||
while (--len > 0) {
|
while (--len > 0) {
|
||||||
@ -329,10 +267,6 @@ void MainWindow::onShowSyncCustRepoStatus(QString status) {
|
|||||||
s += QString( "%1 <font color='Red'>UNKNOWN STATUS</font><br />").arg(tmp);
|
s += QString( "%1 <font color='Red'>UNKNOWN STATUS</font><br />").arg(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_stepLabelChopCount = -s.length();
|
|
||||||
s += "Update DC";
|
|
||||||
m_stepLabelChopCount += s.length();
|
|
||||||
|
|
||||||
ui->stepLabel->setText(s);
|
ui->stepLabel->setText(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -340,9 +274,8 @@ void MainWindow::onShowUpdateDCFirmware(QString status) {
|
|||||||
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
||||||
|
|
||||||
QString s = ui->stepLabel->text();
|
QString s = ui->stepLabel->text();
|
||||||
s.chop(m_stepLabelChopCount);
|
|
||||||
|
|
||||||
QString tmp = "Update DC ";
|
QString tmp = "device controller update ";
|
||||||
int len = m_showLineLength - tmp.length();
|
int len = m_showLineLength - tmp.length();
|
||||||
|
|
||||||
while (--len > 0) {
|
while (--len > 0) {
|
||||||
@ -364,9 +297,8 @@ void MainWindow::onShowUpdateRequest(QString status) {
|
|||||||
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
qCritical() << __func__ << ":" << __LINE__ << "status" << status;
|
||||||
|
|
||||||
QString s = ui->stepLabel->text();
|
QString s = ui->stepLabel->text();
|
||||||
s.chop(m_stepLabelChopCount);
|
|
||||||
|
|
||||||
QString tmp = "Check update request ";
|
QString tmp = "update request ";
|
||||||
int len = m_showLineLength - tmp.length();
|
int len = m_showLineLength - tmp.length();
|
||||||
|
|
||||||
while (--len > 0) {
|
while (--len > 0) {
|
||||||
@ -398,10 +330,6 @@ void MainWindow::onShowUpdateRequest(QString status) {
|
|||||||
s += QString( "%1 <font color='Red'>UNKNOWN</font><br />").arg(tmp);
|
s += QString( "%1 <font color='Red'>UNKNOWN</font><br />").arg(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_stepLabelChopCount = -s.length();
|
|
||||||
s += "Check customer repository";
|
|
||||||
m_stepLabelChopCount += s.length();
|
|
||||||
|
|
||||||
ui->stepLabel->setText(s);
|
ui->stepLabel->setText(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,8 +59,6 @@ public slots:
|
|||||||
void onShowUpdateRequest(QString);
|
void onShowUpdateRequest(QString);
|
||||||
void onShowCustRepoStatus(QString);
|
void onShowCustRepoStatus(QString);
|
||||||
void onShowExecOpkgStatus(QString);
|
void onShowExecOpkgStatus(QString);
|
||||||
void onShowExecOpkgCommand(QString);
|
|
||||||
void onShowExecOpkgOverallResult(QString,bool);
|
|
||||||
void onShowDownloadDCJsonFilesStatus(QString);
|
void onShowDownloadDCJsonFilesStatus(QString);
|
||||||
void onShowSyncCustRepoStatus(QString);
|
void onShowSyncCustRepoStatus(QString);
|
||||||
void onShowUpdateDCFirmware(QString);
|
void onShowUpdateDCFirmware(QString);
|
||||||
@ -96,6 +94,5 @@ private:
|
|||||||
UpdateDcEvent::UpdateStep m_updateStep;
|
UpdateDcEvent::UpdateStep m_updateStep;
|
||||||
QTimer *m_statusTimer;
|
QTimer *m_statusTimer;
|
||||||
QString m_targetDcVersion;
|
QString m_targetDcVersion;
|
||||||
int m_stepLabelChopCount{};
|
|
||||||
};
|
};
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#include "process/exec_opkg_command.h"
|
#include "process/exec_opkg_command.h"
|
||||||
#include "worker.h"
|
#include "worker.h"
|
||||||
#include "utils_internal.h"
|
|
||||||
|
|
||||||
#include <QStringList>
|
|
||||||
|
|
||||||
ExecOpkgCommand::ExecOpkgCommand(QString const &command,
|
ExecOpkgCommand::ExecOpkgCommand(QString const &command,
|
||||||
Worker *worker,
|
Worker *worker,
|
||||||
@ -11,75 +8,23 @@ ExecOpkgCommand::ExecOpkgCommand(QString const &command,
|
|||||||
int start_timeout,
|
int start_timeout,
|
||||||
int finish_timeout)
|
int finish_timeout)
|
||||||
: UpdateCommand(command, worker, nextCommandIndex, start_timeout, finish_timeout)
|
: UpdateCommand(command, worker, nextCommandIndex, start_timeout, finish_timeout)
|
||||||
, m_noaction(noaction)
|
, m_noaction(noaction) {
|
||||||
, m_ok_count{0}
|
|
||||||
, m_fail_count{0} {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecOpkgCommand::finished(int exitCode, QProcess::ExitStatus exitStatus) {
|
void ExecOpkgCommand::finished(int exitCode, QProcess::ExitStatus exitStatus) {
|
||||||
QProcess *p = (QProcess *)sender();
|
|
||||||
if (p) {
|
|
||||||
Worker *w = worker();
|
|
||||||
if (w) {
|
|
||||||
if (m_fail_count == 0 && m_ok_count > 0) {
|
|
||||||
emit w->showExecOpkgOverallResult(internal::EXEC_OPKG_COMMANDS_SUCCESS, m_noaction);
|
|
||||||
} else
|
|
||||||
if (m_ok_count == 0 && m_fail_count > 0) {
|
|
||||||
emit w->showExecOpkgOverallResult(internal::EXEC_OPKG_COMMANDS_FAIL, m_noaction);
|
|
||||||
} else {
|
|
||||||
// TODO
|
|
||||||
emit w->showExecOpkgOverallResult(internal::EXEC_OPKG_COMMANDS_SUCCESS, m_noaction);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return UpdateCommand::finished(exitCode, exitStatus);
|
return UpdateCommand::finished(exitCode, exitStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecOpkgCommand::readyReadStandardOutput() {
|
void ExecOpkgCommand::readyReadStandardOutput() {
|
||||||
QProcess *p = (QProcess *)sender();
|
QProcess *p = (QProcess *)sender();
|
||||||
if (p) {
|
if (p) {
|
||||||
|
QString s = p->readAllStandardOutput();
|
||||||
|
|
||||||
|
// TODO
|
||||||
Worker *w = worker();
|
Worker *w = worker();
|
||||||
if (w) {
|
if (w) {
|
||||||
QString s = p->readAllStandardOutput().trimmed();
|
// static constexpr const char *EXEC_OPKG_COMMANDS_SUCCESS{"success"};
|
||||||
if (!s.isEmpty()) {
|
emit w->showExecOpkgStatus(UpdateCommand::EXEC_OPKG_COMMANDS_SUCCESS);
|
||||||
m_standardOutput += s.replace(QChar('\n'), "");
|
|
||||||
|
|
||||||
// the command lines in etc/psa_update/opkg_commands are
|
|
||||||
// separated by "<OPKG>" markers. Note that the file opkg_commands
|
|
||||||
// itself is *not* changed, of course.
|
|
||||||
|
|
||||||
int startIndex, endIndex{};
|
|
||||||
while (((startIndex = m_standardOutput.indexOf(internal::OPKG_MARKER)) == 0) &&
|
|
||||||
((endIndex = m_standardOutput.indexOf(internal::OPKG_MARKER, 1)) != -1)) {
|
|
||||||
|
|
||||||
QString result = m_standardOutput.mid(0, endIndex).mid(6);
|
|
||||||
m_standardOutput = m_standardOutput.mid(endIndex);
|
|
||||||
|
|
||||||
if (!s.isEmpty()) {
|
|
||||||
QStringList const lst = result.split(u' ', QString::SkipEmptyParts);
|
|
||||||
|
|
||||||
if (lst.size() >= 2) {
|
|
||||||
if (lst.last() == "ok") {
|
|
||||||
m_ok_count += 1;
|
|
||||||
if (lst.contains("noaction")) {
|
|
||||||
emit w->showExecOpkgCommand(result);
|
|
||||||
} else {
|
|
||||||
emit w->showExecOpkgCommand(result);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
m_fail_count += 1;
|
|
||||||
if (lst.contains("noaction")) {
|
|
||||||
emit w->showExecOpkgCommand(result);
|
|
||||||
} else {
|
|
||||||
emit w->showExecOpkgCommand(result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
emit w->showExecOpkgCommand(result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,6 @@
|
|||||||
|
|
||||||
class ExecOpkgCommand : public UpdateCommand {
|
class ExecOpkgCommand : public UpdateCommand {
|
||||||
bool m_noaction{false};
|
bool m_noaction{false};
|
||||||
QString m_standardOutput{};
|
|
||||||
int m_ok_count{};
|
|
||||||
int m_fail_count{};
|
|
||||||
public:
|
public:
|
||||||
explicit ExecOpkgCommand(QString const &command,
|
explicit ExecOpkgCommand(QString const &command,
|
||||||
Worker *worker,
|
Worker *worker,
|
||||||
|
@ -229,17 +229,15 @@ Worker::Worker(int customerNr,
|
|||||||
// NOTE: first run the opkg commands with no action -> dry-run
|
// NOTE: first run the opkg commands with no action -> dry-run
|
||||||
m_workList.push_back(
|
m_workList.push_back(
|
||||||
std::make_unique<ExecOpkgCommand>(
|
std::make_unique<ExecOpkgCommand>(
|
||||||
// QString("echo ExecOpkgCommand noaction")
|
QString("echo ExecOpkgCommand dry-run")
|
||||||
QString("/opt/app/tools/atbupdate/ATBUpdateOpkg --noaction")
|
|
||||||
, this, ++next, true));
|
, this, ++next, true));
|
||||||
|
|
||||||
// *** exec opkg-commands ***
|
// *** exec opkg-commands ***
|
||||||
// NOTE: first run the opkg commands with action -> no dry-run
|
// NOTE: first run the opkg commands with action -> no dry-run
|
||||||
m_workList.push_back(
|
m_workList.push_back(
|
||||||
std::make_unique<ExecOpkgCommand>(
|
std::make_unique<ExecOpkgCommand>(
|
||||||
//QString("echo ExecOpkgCommand run")
|
QString("echo ExecOpkgCommand run")
|
||||||
QString("/opt/app/tools/atbupdate/ATBUpdateOpkg")
|
, this, ++next, true));
|
||||||
, this, ++next, false));
|
|
||||||
|
|
||||||
// *** send json files down to device controller ***
|
// *** send json files down to device controller ***
|
||||||
m_workList.push_back(
|
m_workList.push_back(
|
||||||
|
@ -497,8 +497,6 @@ signals:
|
|||||||
void showCustRepoStatus(QString);
|
void showCustRepoStatus(QString);
|
||||||
void showUpdateRequest(QString);
|
void showUpdateRequest(QString);
|
||||||
void showExecOpkgStatus(QString);
|
void showExecOpkgStatus(QString);
|
||||||
void showExecOpkgCommand(QString);
|
|
||||||
void showExecOpkgOverallResult(QString,bool);
|
|
||||||
void showDownloadDCJsonFilesStatus(QString);
|
void showDownloadDCJsonFilesStatus(QString);
|
||||||
void showSyncCustRepoStatus(QString);
|
void showSyncCustRepoStatus(QString);
|
||||||
void showUpdateDCFirmware(QString);
|
void showUpdateDCFirmware(QString);
|
||||||
|
@ -16,7 +16,6 @@ class Command : public QObject {
|
|||||||
|
|
||||||
int m_waitForStartTimeout;
|
int m_waitForStartTimeout;
|
||||||
int m_waitForFinishTimeout;
|
int m_waitForFinishTimeout;
|
||||||
bool m_verbose;
|
|
||||||
int m_exitCode;
|
int m_exitCode;
|
||||||
QString m_workingDirectory;
|
QString m_workingDirectory;
|
||||||
|
|
||||||
@ -28,7 +27,6 @@ public:
|
|||||||
Command(QString command,
|
Command(QString command,
|
||||||
QStringList args,
|
QStringList args,
|
||||||
QString workingDirectory,
|
QString workingDirectory,
|
||||||
bool verbose = true,
|
|
||||||
int start_timeout = 100000,
|
int start_timeout = 100000,
|
||||||
int finish_timeout = 100000);
|
int finish_timeout = 100000);
|
||||||
|
|
||||||
|
@ -18,15 +18,10 @@ namespace internal {
|
|||||||
static constexpr const char *GIT_CUSTOMER_REPO_PULL_ERROR{"pull error"};
|
static constexpr const char *GIT_CUSTOMER_REPO_PULL_ERROR{"pull error"};
|
||||||
static constexpr const char *GIT_CUSTOMER_REPO_UP_TO_DATE{"up to date"};
|
static constexpr const char *GIT_CUSTOMER_REPO_UP_TO_DATE{"up to date"};
|
||||||
static constexpr const char *EXEC_OPKG_COMMANDS_SUCCESS{"success"};
|
static constexpr const char *EXEC_OPKG_COMMANDS_SUCCESS{"success"};
|
||||||
static constexpr const char *EXEC_OPKG_COMMANDS_FAIL{"FAIL"};
|
|
||||||
static constexpr const char *EXEC_OPKG_COMMANDS_NOACTION_SUCCESS{"success"};
|
|
||||||
static constexpr const char *EXEC_OPKG_COMMANDS_NOACTION_FAIL{"FAIL"};
|
|
||||||
static constexpr const char *UPDATE_DC_JSON_FILES_SUCCESS{"success"};
|
static constexpr const char *UPDATE_DC_JSON_FILES_SUCCESS{"success"};
|
||||||
static constexpr const char *SYNC_CUSTOMER_REPO_FILES_SUCCESS{"success"};
|
static constexpr const char *SYNC_CUSTOMER_REPO_FILES_SUCCESS{"success"};
|
||||||
static constexpr const char *UPDATE_DC_FIRMARE_SUCCESS{"success"};
|
static constexpr const char *UPDATE_DC_FIRMARE_SUCCESS{"success"};
|
||||||
|
|
||||||
static constexpr const char *OPKG_MARKER{"<OPKG>"};
|
|
||||||
|
|
||||||
int read1stLineOfFile(QString fileName);
|
int read1stLineOfFile(QString fileName);
|
||||||
QString customerRepoRoot();
|
QString customerRepoRoot();
|
||||||
QString customerRepoDir();
|
QString customerRepoDir();
|
||||||
|
@ -7,12 +7,11 @@
|
|||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
Command::Command(QString command, QStringList args, QString workingDirectory,
|
Command::Command(QString command, QStringList args, QString workingDirectory,
|
||||||
bool verbose, int start_timeout, int finish_timeout)
|
int start_timeout, int finish_timeout)
|
||||||
: m_command(command.trimmed())
|
: m_command(command.trimmed())
|
||||||
, m_commandResult("")
|
, m_commandResult("")
|
||||||
, m_waitForStartTimeout(start_timeout)
|
, m_waitForStartTimeout(start_timeout)
|
||||||
, m_waitForFinishTimeout(finish_timeout)
|
, m_waitForFinishTimeout(finish_timeout)
|
||||||
, m_verbose(verbose)
|
|
||||||
, m_exitCode(-1)
|
, m_exitCode(-1)
|
||||||
, m_workingDirectory(workingDirectory)
|
, m_workingDirectory(workingDirectory)
|
||||||
, m_args(args) {
|
, m_args(args) {
|
||||||
@ -29,10 +28,7 @@ Command::Command(QString command, QStringList args, QString workingDirectory,
|
|||||||
void Command::readyReadStandardOutput() {
|
void Command::readyReadStandardOutput() {
|
||||||
QProcess *p = (QProcess *)sender();
|
QProcess *p = (QProcess *)sender();
|
||||||
if (p) {
|
if (p) {
|
||||||
QString s = p->readAllStandardOutput();
|
qCritical().noquote() << p->readAllStandardOutput();
|
||||||
if (m_verbose) {
|
|
||||||
qCritical().noquote() << s;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user