Connect slots
void onReportDCDownloadStatus(QString const &status); void onReportDCDownloadSuccess(QString const &msg); void onReportDCDownloadFailure(QString const &errorMsg);
This commit is contained in:
parent
e2e7c0772d
commit
8d2d7bbb15
41
update.cpp
41
update.cpp
@ -123,6 +123,9 @@ Update::Update(Worker *worker,
|
|||||||
, m_dryRun(dryRun)
|
, m_dryRun(dryRun)
|
||||||
, m_sys_areDCdataValid(false) {
|
, m_sys_areDCdataValid(false) {
|
||||||
|
|
||||||
|
if (!m_hw) {
|
||||||
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") m_hw == nullptr -> ca-slave plugin loaded ???";
|
||||||
|
} else {
|
||||||
int tries = 20;
|
int tries = 20;
|
||||||
while ((m_sys_areDCdataValid = m_hw->sys_areDCdataValid()) == false) {
|
while ((m_sys_areDCdataValid = m_hw->sys_areDCdataValid()) == false) {
|
||||||
// must deliver 'true', only then are all data from hwapi valid
|
// must deliver 'true', only then are all data from hwapi valid
|
||||||
@ -134,15 +137,37 @@ Update::Update(Worker *worker,
|
|||||||
QThread::msleep(500);
|
QThread::msleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
qCritical() << __PRETTY_FUNCTION__ << "m_sys_areDCDataValid ..." << m_sys_areDCdataValid;
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") m_sys_areDCDataValid ..."
|
||||||
|
<< m_sys_areDCdataValid;
|
||||||
|
|
||||||
//qInfo() << "UPDATE: m_serialInterface ..." << m_serialInterface;
|
QObject const *obj = m_hw->getAPI();
|
||||||
//qInfo() << "UPDATE: m_baudrate ..." << m_baudrate;
|
Q_ASSERT(obj != nullptr);
|
||||||
//qInfo() << "UPDATE: m_customerRepository ..." << m_customerRepository;
|
|
||||||
//qInfo() << "UPDATE: m_customerNr ..........." << m_customerNrStr;
|
QDebug critical = qCritical();
|
||||||
//qInfo() << "UPDATE: m_branchName ..........." << m_branchName;
|
critical << "connect() to onReportDCDownloadStatus() ...";
|
||||||
//qInfo() << "UPDATE: m_pluginName ..........." << m_pluginName;
|
if (!connect(obj,
|
||||||
//qInfo() << "UPDATE: m_workingDirectory ....." << m_workingDir;
|
SIGNAL(hwapi_reportDCDownloadStatus(QString const&)), this,
|
||||||
|
SLOT(onReportDCDownloadStatus(QString const &)))) {
|
||||||
|
critical << "FAILED";
|
||||||
|
}
|
||||||
|
critical << "DONE";
|
||||||
|
critical = qCritical();
|
||||||
|
critical << "connect() to onReportDCDownloadSuccess() ...";
|
||||||
|
if (!connect(obj,
|
||||||
|
SIGNAL(hwapi_reportDCDownloadSuccess(QString const&)), this,
|
||||||
|
SLOT(onReportDCDownloadSuccess(QString const &)))) {
|
||||||
|
critical << "FAILED";
|
||||||
|
}
|
||||||
|
critical << "DONE";
|
||||||
|
critical = qCritical();
|
||||||
|
critical << "connect() to onReportDCDownloadFailure() ...";
|
||||||
|
if (!connect(obj,
|
||||||
|
SIGNAL(hwapi_reportDCDownloadFailure(QString const &)), this,
|
||||||
|
SLOT(onReportDCDownloadFailure(QString const &)))) {
|
||||||
|
critical << "FAILED";
|
||||||
|
}
|
||||||
|
critical << "DONE";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Update::~Update() {
|
Update::~Update() {
|
||||||
|
Loading…
Reference in New Issue
Block a user