clean ups: whitespace, add some q_disable_copy macros, add props to class
headers svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1046695
This commit is contained in:
parent
455d667da4
commit
3dce0a78aa
|
@ -35,6 +35,7 @@ class BackupFileSystemJob;
|
|||
class BackupOperation : public Operation
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(BackupOperation)
|
||||
|
||||
public:
|
||||
BackupOperation(Device& targetDevice, Partition& backupPartition, const QString& filename);
|
||||
|
|
|
@ -36,6 +36,7 @@ class ResizeFileSystemJob;
|
|||
class CheckOperation : public Operation
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(CheckOperation)
|
||||
|
||||
public:
|
||||
CheckOperation(Device& targetDevice, Partition& checkedPartition);
|
||||
|
|
|
@ -47,6 +47,7 @@ class CopyOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(CopyOperation)
|
||||
|
||||
public:
|
||||
CopyOperation(Device& targetdevice, Partition* copiedpartition, Device& sourcedevice, Partition* sourcepartition);
|
||||
|
@ -64,7 +65,7 @@ class CopyOperation : public Operation
|
|||
static bool canPaste(const Partition* p, const Partition* source);
|
||||
|
||||
static Partition* createCopy(const Partition& target, const Partition& source);
|
||||
|
||||
|
||||
protected:
|
||||
Partition& copiedPartition() { return *m_CopiedPartition; }
|
||||
const Partition& copiedPartition() const { return *m_CopiedPartition; }
|
||||
|
@ -92,7 +93,7 @@ class CopyOperation : public Operation
|
|||
CopyFileSystemJob* copyFSJob() { return m_CopyFSJob; }
|
||||
CheckFileSystemJob* checkTargetJob() { return m_CheckTargetJob; }
|
||||
ResizeFileSystemJob* maximizeJob() { return m_MaximizeJob; }
|
||||
|
||||
|
||||
private:
|
||||
Device& m_TargetDevice;
|
||||
Partition* m_CopiedPartition;
|
||||
|
|
|
@ -45,6 +45,7 @@ class CreateFileSystemOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(CreateFileSystemOperation)
|
||||
|
||||
public:
|
||||
CreateFileSystemOperation(Device& d, Partition& p, FileSystem::Type newType);
|
||||
|
|
|
@ -35,6 +35,7 @@ class PartitionTable;
|
|||
class CreatePartitionTableOperation : public Operation
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(CreatePartitionTableOperation)
|
||||
|
||||
public:
|
||||
CreatePartitionTableOperation(Device& d);
|
||||
|
|
|
@ -40,6 +40,7 @@ class DeleteOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(DeleteOperation)
|
||||
|
||||
public:
|
||||
DeleteOperation(Device& d, Partition* p);
|
||||
|
@ -66,7 +67,7 @@ class DeleteOperation : public Operation
|
|||
|
||||
DeleteFileSystemJob* deleteFileSystemJob() { return m_DeleteFileSystemJob; }
|
||||
DeletePartitionJob* deletePartitionJob() { return m_DeletePartitionJob; }
|
||||
|
||||
|
||||
private:
|
||||
Device& m_TargetDevice;
|
||||
Partition* m_DeletedPartition;
|
||||
|
|
|
@ -44,6 +44,7 @@ class NewOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(NewOperation)
|
||||
|
||||
public:
|
||||
NewOperation(Device& d, Partition* p);
|
||||
|
@ -57,7 +58,7 @@ class NewOperation : public Operation
|
|||
|
||||
static bool canCreateNew(const Partition* p);
|
||||
static Partition* createNew(const Partition& cloneFrom);
|
||||
|
||||
|
||||
protected:
|
||||
Partition& newPartition() { return *m_NewPartition; }
|
||||
const Partition& newPartition() const { return *m_NewPartition; }
|
||||
|
@ -69,7 +70,7 @@ class NewOperation : public Operation
|
|||
CreateFileSystemJob* createFileSystemJob() { return m_CreateFileSystemJob; }
|
||||
SetFileSystemLabelJob* setLabelJob() { return m_SetFileSystemLabelJob; }
|
||||
CheckFileSystemJob* checkJob() { return m_CheckFileSystemJob; }
|
||||
|
||||
|
||||
private:
|
||||
Device& m_TargetDevice;
|
||||
Partition* m_NewPartition;
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
Operation::Operation() :
|
||||
m_Status(StatusNone),
|
||||
m_Jobs(),
|
||||
m_ProgressBase(0)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ class ResizeOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(ResizeOperation)
|
||||
|
||||
protected:
|
||||
/** A ResizeOperation can do a combination of things; this enum is used to determine what
|
||||
|
@ -69,7 +70,7 @@ class ResizeOperation : public Operation
|
|||
MoveLeftShrink = 9, /**< Shrink then move to the left */
|
||||
MoveRightShrink = 10 /**< Shrink then move to the right */
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
ResizeOperation(Device& d, Partition& p, qint64 newfirst, qint64 newlast);
|
||||
|
||||
|
@ -94,7 +95,7 @@ class ResizeOperation : public Operation
|
|||
bool shrink(Report& report);
|
||||
bool move(Report& report);
|
||||
bool grow(Report& report);
|
||||
|
||||
|
||||
ResizeAction resizeAction() const;
|
||||
|
||||
qint64 origFirstSector() const { return m_OrigFirstSector; }
|
||||
|
@ -104,7 +105,7 @@ class ResizeOperation : public Operation
|
|||
qint64 newFirstSector() const { return m_NewFirstSector; }
|
||||
qint64 newLastSector() const { return m_NewLastSector; }
|
||||
qint64 newLength() const { return newLastSector() - newFirstSector() + 1; }
|
||||
|
||||
|
||||
CheckFileSystemJob* checkOriginalJob() { return m_CheckOriginalJob; }
|
||||
SetPartGeometryJob* moveExtendedJob() { return m_MoveExtendedJob; }
|
||||
ResizeFileSystemJob* shrinkResizeJob() { return m_ShrinkResizeJob; }
|
||||
|
@ -114,7 +115,7 @@ class ResizeOperation : public Operation
|
|||
ResizeFileSystemJob* growResizeJob() { return m_GrowResizeJob; }
|
||||
SetPartGeometryJob* growSetGeomJob() { return m_GrowSetGeomJob; }
|
||||
CheckFileSystemJob* checkResizedJob() { return m_CheckResizedJob; }
|
||||
|
||||
|
||||
private:
|
||||
Device& m_TargetDevice;
|
||||
Partition& m_Partition;
|
||||
|
|
|
@ -48,6 +48,7 @@ class RestoreOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(RestoreOperation)
|
||||
|
||||
public:
|
||||
RestoreOperation(Device& d, Partition* p, const QString& filename);
|
||||
|
@ -58,7 +59,7 @@ class RestoreOperation : public Operation
|
|||
QString description() const;
|
||||
bool execute(Report& parent);
|
||||
void undo();
|
||||
|
||||
|
||||
void preview();
|
||||
|
||||
static bool canRestore(const Partition* p);
|
||||
|
@ -86,7 +87,7 @@ class RestoreOperation : public Operation
|
|||
RestoreFileSystemJob* restoreJob() { return m_RestoreJob; }
|
||||
CheckFileSystemJob* checkTargetJob() { return m_CheckTargetJob; }
|
||||
ResizeFileSystemJob* maximizeJob() { return m_MaximizeJob; }
|
||||
|
||||
|
||||
private:
|
||||
Device& m_TargetDevice;
|
||||
Partition* m_RestorePartition;
|
||||
|
|
|
@ -41,6 +41,7 @@ class SetFileSystemLabelOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(SetFileSystemLabelOperation)
|
||||
|
||||
public:
|
||||
SetFileSystemLabelOperation(Partition& p, const QString& newlabel);
|
||||
|
@ -61,7 +62,7 @@ class SetFileSystemLabelOperation : public Operation
|
|||
void setOldLabel(const QString& l) { m_OldLabel = l; }
|
||||
|
||||
SetFileSystemLabelJob* labelJob() { return m_LabelJob; }
|
||||
|
||||
|
||||
private:
|
||||
Partition& m_LabeledPartition;
|
||||
QString m_OldLabel;
|
||||
|
|
|
@ -44,6 +44,7 @@ class SetPartFlagsOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(SetPartFlagsOperation)
|
||||
|
||||
public:
|
||||
SetPartFlagsOperation(Device& d, Partition& p, const PartitionTable::Flags& flags);
|
||||
|
@ -63,11 +64,11 @@ class SetPartFlagsOperation : public Operation
|
|||
|
||||
const PartitionTable::Flags& oldFlags() const { return m_OldFlags; }
|
||||
const PartitionTable::Flags& newFlags() const { return m_NewFlags; }
|
||||
|
||||
|
||||
void setOldFlags(PartitionTable::Flags f) { m_OldFlags = f; }
|
||||
|
||||
SetPartFlagsJob* flagsJob() { return m_FlagsJob; }
|
||||
|
||||
|
||||
private:
|
||||
Device& m_TargetDevice;
|
||||
Partition& m_FlagPartition;
|
||||
|
|
Loading…
Reference in New Issue