Use of pointer m_update.
This commit is contained in:
parent
978e98b2ee
commit
80712964ef
@ -165,8 +165,8 @@ Worker::Worker(int customerNr,
|
||||
|
||||
// TODO: turn object into singleton
|
||||
instance = this;
|
||||
|
||||
m_lastFailedUpdateStep = UPDATE_STEP::NONE;
|
||||
m_update = nullptr;
|
||||
|
||||
this->setObjectName("worker-object");
|
||||
QDir::setCurrent(m_workingDirectory);
|
||||
@ -752,7 +752,7 @@ bool Worker::filesToUpdate() {
|
||||
}
|
||||
m_filesToUpdate.removeDuplicates();
|
||||
|
||||
qCritical() << __PRETTY_FUNCTION__ << "FILES-TO-UPDATE" << m_filesToUpdate;
|
||||
qCritical() << "(" << __func__ << ":" << __LINE__ << ") FILES-TO-UPDATE" << m_filesToUpdate;
|
||||
|
||||
GUI(m_filesToUpdate) << (CONSOLE(m_filesToUpdate) << UPDATE_STEP::FILES_TO_UPDATE);
|
||||
setProgress(_FILES_TO_UPDATE);
|
||||
@ -889,7 +889,7 @@ bool Worker::downloadFilesToPSAHardware() {
|
||||
QStringList lst = m_filesToDownload;
|
||||
ISMAS(lst) << (CONSOLE(lst) << UPDATE_STEP::FILES_TO_DOWNLOAD);
|
||||
|
||||
Update update(this,
|
||||
m_update = new Update(this,
|
||||
QDir::cleanPath(m_workingDirectory + QDir::separator() + m_customerNrStr),
|
||||
m_customerNrStr,
|
||||
m_branchName,
|
||||
@ -897,7 +897,7 @@ bool Worker::downloadFilesToPSAHardware() {
|
||||
m_pluginName,
|
||||
m_workingDirectory);
|
||||
|
||||
if (update.doUpdate(m_displayIndex, m_filesToDownload)) {
|
||||
if (m_update->doUpdate(m_displayIndex, m_filesToDownload)) {
|
||||
// prepared for use: at the moment, the dc-library does not work
|
||||
// as expected.
|
||||
|
||||
|
5
worker.h
5
worker.h
@ -249,7 +249,10 @@ class Worker : public QThread{
|
||||
<< UPDATE_STEP::SEND_LAST_VERSION));
|
||||
}
|
||||
m_worker->stopProgressLoop();
|
||||
|
||||
if (m_worker->m_update != nullptr) {
|
||||
delete m_worker->m_update;
|
||||
m_worker->m_update = nullptr;
|
||||
}
|
||||
m_worker->m_updateProcessRunning = false;
|
||||
emit m_worker->enableExit();
|
||||
emit m_worker->restartExitTimer();
|
||||
|
Loading…
Reference in New Issue
Block a user