Fix minor EBN issues
This commit is contained in:
parent
59269f63df
commit
62aaa90a29
|
@ -39,7 +39,7 @@ class Report;
|
||||||
class CoreBackendDevice
|
class CoreBackendDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CoreBackendDevice(const QString& deviceNode);
|
explicit CoreBackendDevice(const QString& deviceNode);
|
||||||
virtual ~CoreBackendDevice() {}
|
virtual ~CoreBackendDevice() {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -36,7 +36,7 @@ class CopyTarget;
|
||||||
class CopySourceFile : public CopySource
|
class CopySourceFile : public CopySource
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CopySourceFile(const QString& filename);
|
explicit CopySourceFile(const QString& filename);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool open() override;
|
bool open() override;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
class CopyTargetByteArray : public CopyTarget
|
class CopyTargetByteArray : public CopyTarget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CopyTargetByteArray(QByteArray& array);
|
explicit CopyTargetByteArray(QByteArray& array);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool open() override {
|
bool open() override {
|
||||||
|
|
|
@ -36,7 +36,7 @@ class QString;
|
||||||
class CopyTargetFile : public CopyTarget
|
class CopyTargetFile : public CopyTarget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CopyTargetFile(const QString& filename);
|
explicit CopyTargetFile(const QString& filename);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool open() override;
|
bool open() override;
|
||||||
|
|
|
@ -171,7 +171,7 @@ Partition* LvmDevice::scanPartition(const QString& lvPath, PartitionTable* pTabl
|
||||||
mountPoint = FileSystem::detectMountPoint(fs, lvPath);
|
mountPoint = FileSystem::detectMountPoint(fs, lvPath);
|
||||||
mounted = FileSystem::detectMountStatus(fs, lvPath);
|
mounted = FileSystem::detectMountStatus(fs, lvPath);
|
||||||
|
|
||||||
if (mountPoint != QString() && fs->type() != FileSystem::Type::LinuxSwap) {
|
if (!mountPoint.isEmpty() && fs->type() != FileSystem::Type::LinuxSwap) {
|
||||||
const QStorageInfo storage = QStorageInfo(mountPoint);
|
const QStorageInfo storage = QStorageInfo(mountPoint);
|
||||||
if (logicalSize() > 0 && fs->type() != FileSystem::Type::Luks && mounted && storage.isValid())
|
if (logicalSize() > 0 && fs->type() != FileSystem::Type::Luks && mounted && storage.isValid())
|
||||||
fs->setSectorsUsed( (storage.bytesTotal() - storage.bytesFree()) / logicalSize() );
|
fs->setSectorsUsed( (storage.bytesTotal() - storage.bytesFree()) / logicalSize() );
|
||||||
|
|
|
@ -48,7 +48,7 @@ class LIBKPMCORE_EXPORT LvmDevice : public VolumeManagerDevice
|
||||||
friend class VolumeManagerDevice;
|
friend class VolumeManagerDevice;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LvmDevice(const QString& name, const QString& iconName = QString());
|
explicit LvmDevice(const QString& name, const QString& iconName = QString());
|
||||||
~LvmDevice();
|
~LvmDevice();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
typedef QList<Operation*> Operations;
|
typedef QList<Operation*> Operations;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OperationStack(QObject* parent = nullptr);
|
explicit OperationStack(QObject* parent = nullptr);
|
||||||
~OperationStack();
|
~OperationStack();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
Recovery,
|
Recovery,
|
||||||
};
|
};
|
||||||
|
|
||||||
SoftwareRAID(const QString& name,
|
explicit SoftwareRAID(const QString& name,
|
||||||
SoftwareRAID::Status status = SoftwareRAID::Status::Active,
|
SoftwareRAID::Status status = SoftwareRAID::Status::Active,
|
||||||
const QString& iconName = QString());
|
const QString& iconName = QString());
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SmartAttribute(const SmartAttributeParsedData& a);
|
explicit SmartAttribute(const SmartAttributeParsedData& a);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
qint32 id() const {
|
qint32 id() const {
|
||||||
|
|
|
@ -32,7 +32,7 @@ class SmartDiskInformation;
|
||||||
class SmartParser
|
class SmartParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SmartParser(const QString &device_path);
|
explicit SmartParser(const QString &device_path);
|
||||||
~SmartParser();
|
~SmartParser();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
typedef QList<SmartAttribute> Attributes;
|
typedef QList<SmartAttribute> Attributes;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SmartStatus(const QString &device_path);
|
explicit SmartStatus(const QString &device_path);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void update();
|
void update();
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "core/device_p.h"
|
|
||||||
#include "core/volumemanagerdevice.h"
|
#include "core/volumemanagerdevice.h"
|
||||||
#include "core/volumemanagerdevice_p.h"
|
#include "core/volumemanagerdevice_p.h"
|
||||||
|
#include "core/device_p.h"
|
||||||
#include "core/lvmdevice.h"
|
#include "core/lvmdevice.h"
|
||||||
#include "core/raid/softwareraid.h"
|
#include "core/raid/softwareraid.h"
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
|
#include "fs/filesystem.h"
|
||||||
#include "core/fstab.h"
|
#include "core/fstab.h"
|
||||||
|
|
||||||
#include "fs/filesystem.h"
|
|
||||||
#include "fs/lvm2_pv.h"
|
#include "fs/lvm2_pv.h"
|
||||||
|
|
||||||
#include "backend/corebackend.h"
|
#include "backend/corebackend.h"
|
||||||
|
@ -174,7 +174,7 @@ bool FileSystem::detectMountStatus(FileSystem* fs, const QString& partitionPath)
|
||||||
bool mounted = false;
|
bool mounted = false;
|
||||||
|
|
||||||
if (fs->type() == FileSystem::Type::Lvm2_PV) {
|
if (fs->type() == FileSystem::Type::Lvm2_PV) {
|
||||||
mounted = FS::lvm2_pv::getVGName(partitionPath) != QString();
|
mounted = !FS::lvm2_pv::getVGName(partitionPath).isEmpty();
|
||||||
} else {
|
} else {
|
||||||
mounted = isMounted(partitionPath);
|
mounted = isMounted(partitionPath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ class LIBKPMCORE_EXPORT PartResizerWidget : public QWidget
|
||||||
Q_DISABLE_COPY(PartResizerWidget)
|
Q_DISABLE_COPY(PartResizerWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PartResizerWidget(QWidget* parent);
|
explicit PartResizerWidget(QWidget* parent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void init(Device& d, Partition& p, qint64 minFirst, qint64 maxLast, bool read_only = false, bool move_allowed = true);
|
void init(Device& d, Partition& p, qint64 minFirst, qint64 maxLast, bool read_only = false, bool move_allowed = true);
|
||||||
|
|
|
@ -32,7 +32,7 @@ class QString;
|
||||||
class CheckFileSystemJob : public Job
|
class CheckFileSystemJob : public Job
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CheckFileSystemJob(Partition& p);
|
explicit CheckFileSystemJob(Partition& p);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool run(Report& parent) override;
|
bool run(Report& parent) override;
|
||||||
|
|
|
@ -59,7 +59,7 @@ bool CreatePartitionJob::run(Report& parent)
|
||||||
if (backendPartitionTable) {
|
if (backendPartitionTable) {
|
||||||
QString partitionPath = backendPartitionTable->createPartition(*report, partition());
|
QString partitionPath = backendPartitionTable->createPartition(*report, partition());
|
||||||
|
|
||||||
if (partitionPath != QString()) {
|
if (!partitionPath.isEmpty()) {
|
||||||
rval = true;
|
rval = true;
|
||||||
partition().setPartitionPath(partitionPath);
|
partition().setPartitionPath(partitionPath);
|
||||||
partition().setState(Partition::State::None);
|
partition().setState(Partition::State::None);
|
||||||
|
|
|
@ -32,7 +32,7 @@ class QString;
|
||||||
class CreatePartitionTableJob : public Job
|
class CreatePartitionTableJob : public Job
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CreatePartitionTableJob(Device& d);
|
explicit CreatePartitionTableJob(Device& d);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool run(Report& parent) override;
|
bool run(Report& parent) override;
|
||||||
|
|
|
@ -30,7 +30,7 @@ class QString;
|
||||||
class DeactivateLogicalVolumeJob : public Job
|
class DeactivateLogicalVolumeJob : public Job
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DeactivateLogicalVolumeJob(const VolumeManagerDevice& dev, const QStringList lvPaths = {});
|
explicit DeactivateLogicalVolumeJob(const VolumeManagerDevice& dev, const QStringList lvPaths = {});
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool run(Report& parent) override;
|
bool run(Report& parent) override;
|
||||||
|
|
|
@ -30,7 +30,7 @@ class QString;
|
||||||
class DeactivateVolumeGroupJob : public Job
|
class DeactivateVolumeGroupJob : public Job
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DeactivateVolumeGroupJob(VolumeManagerDevice& dev);
|
explicit DeactivateVolumeGroupJob(VolumeManagerDevice& dev);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool run(Report& parent) override;
|
bool run(Report& parent) override;
|
||||||
|
|
|
@ -39,7 +39,7 @@ class LIBKPMCORE_EXPORT DeactivateVolumeGroupOperation : public Operation
|
||||||
friend class OperationStack;
|
friend class OperationStack;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeactivateVolumeGroupOperation(VolumeManagerDevice& d);
|
explicit DeactivateVolumeGroupOperation(VolumeManagerDevice& d);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QString iconName() const override {
|
QString iconName() const override {
|
||||||
|
|
|
@ -37,7 +37,7 @@ class LIBKPMCORE_EXPORT RemoveVolumeGroupOperation : public Operation
|
||||||
friend class OperationStack;
|
friend class OperationStack;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RemoveVolumeGroupOperation(VolumeManagerDevice& d);
|
explicit RemoveVolumeGroupOperation(VolumeManagerDevice& d);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QString iconName() const override {
|
QString iconName() const override {
|
||||||
|
|
|
@ -33,7 +33,7 @@ class DummyDevice : public CoreBackendDevice
|
||||||
Q_DISABLE_COPY(DummyDevice)
|
Q_DISABLE_COPY(DummyDevice)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DummyDevice(const QString& deviceNode);
|
explicit DummyDevice(const QString& deviceNode);
|
||||||
~DummyDevice();
|
~DummyDevice();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -34,7 +34,7 @@ class SfdiskDevice : public CoreBackendDevice
|
||||||
Q_DISABLE_COPY(SfdiskDevice);
|
Q_DISABLE_COPY(SfdiskDevice);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SfdiskDevice(const Device& d);
|
explicit SfdiskDevice(const Device& d);
|
||||||
~SfdiskDevice();
|
~SfdiskDevice();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Partition;
|
||||||
class SfdiskPartitionTable : public CoreBackendPartitionTable
|
class SfdiskPartitionTable : public CoreBackendPartitionTable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SfdiskPartitionTable(const Device *d);
|
explicit SfdiskPartitionTable(const Device *d);
|
||||||
~SfdiskPartitionTable();
|
~SfdiskPartitionTable();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
|
#include "util/externalcommand.h"
|
||||||
#include "backend/corebackendmanager.h"
|
#include "backend/corebackendmanager.h"
|
||||||
#include "core/device.h"
|
#include "core/device.h"
|
||||||
#include "core/copysource.h"
|
#include "core/copysource.h"
|
||||||
|
@ -24,7 +25,6 @@
|
||||||
#include "core/copysourcedevice.h"
|
#include "core/copysourcedevice.h"
|
||||||
#include "core/copytargetdevice.h"
|
#include "core/copytargetdevice.h"
|
||||||
#include "util/globallog.h"
|
#include "util/globallog.h"
|
||||||
#include "util/externalcommand.h"
|
|
||||||
#include "util/report.h"
|
#include "util/report.h"
|
||||||
|
|
||||||
#include "externalcommandhelper_interface.h"
|
#include "externalcommandhelper_interface.h"
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0+
|
// SPDX-License-Identifier: GPL-3.0+
|
||||||
|
|
||||||
#include "helpers.h"
|
|
||||||
#include "testdevice.h"
|
#include "testdevice.h"
|
||||||
|
#include "helpers.h"
|
||||||
|
|
||||||
#include "backend/corebackend.h"
|
#include "backend/corebackend.h"
|
||||||
#include "backend/corebackendmanager.h"
|
#include "backend/corebackendmanager.h"
|
||||||
|
@ -81,7 +81,7 @@ void TestDevice::testDeviceName()
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
} else {
|
} else {
|
||||||
for (const auto &device : devices) {
|
for (const auto &device : devices) {
|
||||||
if (device->name() == QString())
|
if (device->name().isEmpty())
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue