From b73017f6809a9c0ec253b0eeca59739776fa93f6 Mon Sep 17 00:00:00 2001 From: Adam Banasiak Date: Tue, 10 Sep 2013 14:04:31 +0200 Subject: [PATCH] Change function and variable name (UndoType -> abortStarted) [Issue#] LINUXWRT-358 [Problem] Incorrect names of variable and function [Cause] N/A [Solution] Rename function and variable names Change-Id: Iea9bb7fecd8ec57f54d90bebb2e906abd4a8cde7 --- src/jobs/job.cpp | 10 +++++----- src/jobs/job.h | 6 +++--- src/logic/installer_logic.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/jobs/job.cpp b/src/jobs/job.cpp index 335ab76..ec2bb7f 100644 --- a/src/jobs/job.cpp +++ b/src/jobs/job.cpp @@ -20,7 +20,7 @@ namespace Jobs { Job::Job(InstallationType installType) : m_handle(0), m_installationType(installType), - m_UndoType(false), + m_abortStarted(false), m_paused(false) {} @@ -29,14 +29,14 @@ InstallationType Job::GetInstallationType() const return m_installationType; } -bool Job::GetUndoType() const +bool Job::GetAbortStarted() const { - return m_UndoType; + return m_abortStarted; } -void Job::SetUndoType(bool flag) +void Job::SetAbortStarted(bool flag) { - m_UndoType = flag; + m_abortStarted = flag; } bool Job::IsPaused() const diff --git a/src/jobs/job.h b/src/jobs/job.h index df81e5f..982b961 100644 --- a/src/jobs/job.h +++ b/src/jobs/job.h @@ -41,8 +41,8 @@ class Job : InstallationType GetInstallationType() const; // Undo - void SetUndoType(bool flag); - bool GetUndoType() const; + void SetAbortStarted(bool flag); + bool GetAbortStarted() const; // Pause/resume support bool IsPaused() const; @@ -61,7 +61,7 @@ class Job : private: JobHandle m_handle; InstallationType m_installationType; - bool m_UndoType; //TODO change name to m_AbortStarted + bool m_abortStarted; bool m_paused; }; } //namespace Jobs diff --git a/src/logic/installer_logic.cpp b/src/logic/installer_logic.cpp index a7927ce..5af7000 100644 --- a/src/logic/installer_logic.cpp +++ b/src/logic/installer_logic.cpp @@ -145,7 +145,7 @@ bool InstallerLogic::NextStep(Jobs::Job *job) return !job->IsPaused(); } - if (!job->GetUndoType()) { + if (!job->GetAbortStarted()) { //job successfully finished //send finished callback @@ -174,7 +174,7 @@ bool InstallerLogic::NextStep(Jobs::Job *job) LogDebug("Exception occured: " << exc.getParam() << ". Reverting job..."); bool hasAbortSteps = job->Abort(); - job->SetUndoType(true); + job->SetAbortStarted(true); job->SaveExceptionData(exc); if (!hasAbortSteps) { -- 2.7.4