From c6297f1db5c47eb08c1e04fe195992663c83238e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 Sep 2017 06:34:07 -0400 Subject: [PATCH] Clang: warnings-- --- src/libcalamaresui/viewpages/ViewStep.h | 2 +- src/modules/dracutlukscfg/DracutLuksCfgJob.h | 2 +- .../interactiveterminal/InteractiveTerminalViewStep.h | 2 +- src/modules/partition/jobs/CreatePartitionJob.cpp | 7 ++++--- src/modules/partition/jobs/CreatePartitionTableJob.cpp | 2 +- src/modules/partition/jobs/DeletePartitionJob.cpp | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/libcalamaresui/viewpages/ViewStep.h b/src/libcalamaresui/viewpages/ViewStep.h index 2c07dace5..617d64fe1 100644 --- a/src/libcalamaresui/viewpages/ViewStep.h +++ b/src/libcalamaresui/viewpages/ViewStep.h @@ -45,7 +45,7 @@ class UIDLLEXPORT ViewStep : public QObject Q_OBJECT public: explicit ViewStep( QObject* parent = nullptr ); - virtual ~ViewStep(); + virtual ~ViewStep() override; virtual QString prettyName() const = 0; diff --git a/src/modules/dracutlukscfg/DracutLuksCfgJob.h b/src/modules/dracutlukscfg/DracutLuksCfgJob.h index ce981850c..71994e2b6 100644 --- a/src/modules/dracutlukscfg/DracutLuksCfgJob.h +++ b/src/modules/dracutlukscfg/DracutLuksCfgJob.h @@ -34,7 +34,7 @@ class PLUGINDLLEXPORT DracutLuksCfgJob : public Calamares::CppJob public: explicit DracutLuksCfgJob( QObject* parent = nullptr ); - virtual ~DracutLuksCfgJob(); + virtual ~DracutLuksCfgJob() override; QString prettyName() const override; diff --git a/src/modules/interactiveterminal/InteractiveTerminalViewStep.h b/src/modules/interactiveterminal/InteractiveTerminalViewStep.h index 77f7bdf34..025c6cec3 100644 --- a/src/modules/interactiveterminal/InteractiveTerminalViewStep.h +++ b/src/modules/interactiveterminal/InteractiveTerminalViewStep.h @@ -34,7 +34,7 @@ class PLUGINDLLEXPORT InteractiveTerminalViewStep : public Calamares::ViewStep public: explicit InteractiveTerminalViewStep( QObject* parent = nullptr ); - virtual ~InteractiveTerminalViewStep(); + virtual ~InteractiveTerminalViewStep() override; QString prettyName() const override; diff --git a/src/modules/partition/jobs/CreatePartitionJob.cpp b/src/modules/partition/jobs/CreatePartitionJob.cpp index 9fc1b86a2..6c4fc5259 100644 --- a/src/modules/partition/jobs/CreatePartitionJob.cpp +++ b/src/modules/partition/jobs/CreatePartitionJob.cpp @@ -20,6 +20,7 @@ #include "jobs/CreatePartitionJob.h" #include "utils/Logger.h" +#include "utils/Units.h" // KPMcore #include @@ -47,7 +48,7 @@ CreatePartitionJob::prettyName() const { return tr( "Create new %2MB partition on %4 (%3) with file system %1." ) .arg( m_partition->fileSystem().name() ) - .arg( m_partition->capacity() / 1024 / 1024 ) + .arg( CalamaresUtils::BytesToMiB( m_partition->capacity() ) .arg( m_device->name() ) .arg( m_device->deviceNode() ); } @@ -59,7 +60,7 @@ CreatePartitionJob::prettyDescription() const return tr( "Create new %2MB partition on %4 " "(%3) with file system %1." ) .arg( m_partition->fileSystem().name() ) - .arg( m_partition->capacity() / 1024 / 1024 ) + .arg( CalamaresUtils::BytesToMiB( m_partition->capacity() ) .arg( m_device->name() ) .arg( m_device->deviceNode() ); } @@ -79,7 +80,7 @@ CreatePartitionJob::exec() int step = 0; const qreal stepCount = 4; - Report report( 0 ); + Report report( nullptr ); QString message = tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() ); progress( step++ / stepCount ); diff --git a/src/modules/partition/jobs/CreatePartitionTableJob.cpp b/src/modules/partition/jobs/CreatePartitionTableJob.cpp index 5a0c4cd66..eaa2fe712 100644 --- a/src/modules/partition/jobs/CreatePartitionTableJob.cpp +++ b/src/modules/partition/jobs/CreatePartitionTableJob.cpp @@ -72,7 +72,7 @@ CreatePartitionTableJob::prettyStatusMessage() const Calamares::JobResult CreatePartitionTableJob::exec() { - Report report( 0 ); + Report report( nullptr ); QString message = tr( "The installer failed to create a partition table on %1." ).arg( m_device->name() ); CoreBackend* backend = CoreBackendManager::self()->backend(); diff --git a/src/modules/partition/jobs/DeletePartitionJob.cpp b/src/modules/partition/jobs/DeletePartitionJob.cpp index 0aafc542e..43f2d94c6 100644 --- a/src/modules/partition/jobs/DeletePartitionJob.cpp +++ b/src/modules/partition/jobs/DeletePartitionJob.cpp @@ -63,7 +63,7 @@ DeletePartitionJob::prettyStatusMessage() const Calamares::JobResult DeletePartitionJob::exec() { - Report report( 0 ); + Report report( nullptr ); QString message = tr( "The installer failed to delete partition %1." ).arg( m_partition->devicePath() ); if ( m_device->deviceNode() != m_partition->devicePath() )