QList->QVector.
This commit is contained in:
parent
756c5b5beb
commit
d797a47229
|
@ -62,7 +62,7 @@ LvmDevice::LvmDevice(const QString& vgName, const QString& iconName)
|
|||
* shared list of PV's paths that will be added to any VGs.
|
||||
* (have been added to an operation, but not yet applied)
|
||||
*/
|
||||
QList<const Partition*> LvmDevice::s_DirtyPVs;
|
||||
QVector<const Partition*> LvmDevice::s_DirtyPVs;
|
||||
|
||||
LvmDevice::~LvmDevice()
|
||||
{
|
||||
|
@ -416,7 +416,7 @@ bool LvmDevice::movePV(Report& report, const QString& pvPath, const QStringList&
|
|||
return (cmd.run(-1) && cmd.exitCode() == 0);
|
||||
}
|
||||
|
||||
bool LvmDevice::createVG(Report& report, const QString vgName, const QList<const Partition*>& pvList, const qint32 peSize)
|
||||
bool LvmDevice::createVG(Report& report, const QString vgName, const QVector<const Partition*>& pvList, const qint32 peSize)
|
||||
{
|
||||
QStringList args = QStringList();
|
||||
args << QStringLiteral("vgcreate") << QStringLiteral("--physicalextentsize") << QString::number(peSize);
|
||||
|
|
|
@ -27,8 +27,9 @@
|
|||
#include <QHash>
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
#include <QVector>
|
||||
|
||||
class PartitionTable;
|
||||
class Report;
|
||||
|
@ -54,7 +55,7 @@ public:
|
|||
const QStringList partitionNodes() const override;
|
||||
qint64 partitionSize(QString& partitionPath) const override;
|
||||
|
||||
static QList<const Partition*> s_DirtyPVs;
|
||||
static QVector<const Partition*> s_DirtyPVs;
|
||||
|
||||
public:
|
||||
static QList<LvmDevice*> scanSystemLVM();
|
||||
|
@ -83,7 +84,7 @@ public:
|
|||
static bool movePV(Report& report, const QString& pvPath, const QStringList& destinations = QStringList());
|
||||
|
||||
static bool removeVG(Report& report, LvmDevice& d);
|
||||
static bool createVG(Report& report, const QString vgName, const QList<const Partition*>& pvList, const qint32 peSize = 4); // peSize in megabytes
|
||||
static bool createVG(Report& report, const QString vgName, const QVector<const Partition*>& pvList, const qint32 peSize = 4); // peSize in megabytes
|
||||
static bool deactivateVG(Report& report, const LvmDevice& d);
|
||||
static bool activateVG(Report& report, const LvmDevice& d);
|
||||
|
||||
|
@ -113,10 +114,10 @@ public:
|
|||
QStringList* LVPathList() const {
|
||||
return m_LVPathList;
|
||||
}
|
||||
QList <const Partition*>& physicalVolumes() {
|
||||
QVector <const Partition*>& physicalVolumes() {
|
||||
return m_PVs;
|
||||
}
|
||||
const QList <const Partition*>& physicalVolumes() const {
|
||||
const QVector <const Partition*>& physicalVolumes() const {
|
||||
return m_PVs;
|
||||
}
|
||||
|
||||
|
@ -133,7 +134,7 @@ private:
|
|||
QString m_UUID;
|
||||
|
||||
mutable QStringList* m_LVPathList;
|
||||
QList <const Partition*> m_PVs;
|
||||
QVector <const Partition*> m_PVs;
|
||||
mutable QHash<QString, qint64>* m_LVSizeMap;
|
||||
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* @param pvList List of LVM Physical Volumes used to create Volume Group
|
||||
* @param peSize LVM Physical Extent size in MiB
|
||||
*/
|
||||
CreateVolumeGroupJob::CreateVolumeGroupJob(const QString& vgName, const QList<const Partition*>& pvList, const qint32 peSize) :
|
||||
CreateVolumeGroupJob::CreateVolumeGroupJob(const QString& vgName, const QVector<const Partition*>& pvList, const qint32 peSize) :
|
||||
Job(),
|
||||
m_vgName(vgName),
|
||||
m_pvList(pvList),
|
||||
|
|
|
@ -20,9 +20,10 @@
|
|||
#define CREATEVOLUMEGROUPJOB_H
|
||||
|
||||
#include "core/partition.h"
|
||||
|
||||
#include "jobs/job.h"
|
||||
|
||||
#include <QVector>
|
||||
|
||||
class LvmDevice;
|
||||
class Report;
|
||||
|
||||
|
@ -31,7 +32,7 @@ class QString;
|
|||
class CreateVolumeGroupJob : public Job
|
||||
{
|
||||
public:
|
||||
CreateVolumeGroupJob(const QString& vgName, const QList<const Partition*>& pvList, const qint32 peSize);
|
||||
CreateVolumeGroupJob(const QString& vgName, const QVector<const Partition*>& pvList, const qint32 peSize);
|
||||
|
||||
public:
|
||||
bool run(Report& parent) override;
|
||||
|
@ -44,10 +45,10 @@ protected:
|
|||
const QString vgName() const {
|
||||
return m_vgName;
|
||||
}
|
||||
QList<const Partition*>& pvList() {
|
||||
QVector<const Partition*>& pvList() {
|
||||
return m_pvList;
|
||||
}
|
||||
const QList<const Partition*>& pvList() const {
|
||||
const QVector<const Partition*>& pvList() const {
|
||||
return m_pvList;
|
||||
}
|
||||
|
||||
|
@ -57,7 +58,7 @@ protected:
|
|||
|
||||
private:
|
||||
QString m_vgName;
|
||||
QList<const Partition*> m_pvList;
|
||||
QVector<const Partition*> m_pvList;
|
||||
qint32 m_PESize;
|
||||
};
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* @param pvList List of LVM Physical Volumes used to create Volume Group
|
||||
* @param peSize LVM Physical Extent size in MiB
|
||||
*/
|
||||
CreateVolumeGroupOperation::CreateVolumeGroupOperation(const QString& vgName, const QList<const Partition*>& pvList, const qint32 peSize) :
|
||||
CreateVolumeGroupOperation::CreateVolumeGroupOperation(const QString& vgName, const QVector<const Partition*>& pvList, const qint32 peSize) :
|
||||
Operation(),
|
||||
m_CreateVolumeGroupJob(new CreateVolumeGroupJob(vgName, pvList, peSize)),
|
||||
m_PVList(pvList)
|
||||
|
|
|
@ -38,7 +38,7 @@ class LIBKPMCORE_EXPORT CreateVolumeGroupOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
public:
|
||||
CreateVolumeGroupOperation(const QString& vgName, const QList<const Partition*>& pvList, const qint32 peSize = 4);
|
||||
CreateVolumeGroupOperation(const QString& vgName, const QVector<const Partition*>& pvList, const qint32 peSize = 4);
|
||||
|
||||
public:
|
||||
QString iconName() const override {
|
||||
|
@ -62,13 +62,13 @@ protected:
|
|||
return m_CreateVolumeGroupJob;
|
||||
}
|
||||
|
||||
const QList<const Partition*>& PVList() {
|
||||
const QVector<const Partition*>& PVList() {
|
||||
return m_PVList;
|
||||
}
|
||||
|
||||
private:
|
||||
CreateVolumeGroupJob* m_CreateVolumeGroupJob;
|
||||
const QList<const Partition*> m_PVList;
|
||||
const QVector<const Partition*> m_PVList;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
@param d the Device to create the new PartitionTable on
|
||||
@param partList list of LVM Physical Volumes that should be in LVM Volume Group
|
||||
*/
|
||||
ResizeVolumeGroupOperation::ResizeVolumeGroupOperation(LvmDevice& d, const QList<const Partition*>& partList)
|
||||
ResizeVolumeGroupOperation::ResizeVolumeGroupOperation(LvmDevice& d, const QVector<const Partition*>& partList)
|
||||
: Operation()
|
||||
, m_Device(d)
|
||||
, m_TargetList(partList)
|
||||
|
|
|
@ -40,7 +40,7 @@ class LIBKPMCORE_EXPORT ResizeVolumeGroupOperation : public Operation
|
|||
friend class OperationStack;
|
||||
|
||||
public:
|
||||
ResizeVolumeGroupOperation(LvmDevice& dev, const QList<const Partition*>& partlist);
|
||||
ResizeVolumeGroupOperation(LvmDevice& dev, const QVector<const Partition*>& partlist);
|
||||
|
||||
public:
|
||||
QString iconName() const override {
|
||||
|
@ -65,11 +65,11 @@ protected:
|
|||
const LvmDevice& device() const {
|
||||
return m_Device;
|
||||
}
|
||||
const QList<const Partition*>& targetList() const {
|
||||
const QVector<const Partition*>& targetList() const {
|
||||
return m_TargetList;
|
||||
}
|
||||
|
||||
const QList<const Partition*>& currentList() const {
|
||||
const QVector<const Partition*>& currentList() const {
|
||||
return m_CurrentList;
|
||||
}
|
||||
|
||||
|
@ -96,8 +96,8 @@ protected:
|
|||
private:
|
||||
LvmDevice& m_Device;
|
||||
|
||||
QList<const Partition*> m_TargetList;
|
||||
QList<const Partition*> m_CurrentList;
|
||||
QVector<const Partition*> m_TargetList;
|
||||
QVector<const Partition*> m_CurrentList;
|
||||
qint64 m_TargetSize;
|
||||
qint64 m_CurrentSize;
|
||||
|
||||
|
|
Loading…
Reference in New Issue