Use QHash instead of QMap for storing LVM LV sizes.
This commit is contained in:
parent
db13a4bab9
commit
756c5b5beb
|
@ -53,7 +53,7 @@ LvmDevice::LvmDevice(const QString& vgName, const QString& iconName)
|
||||||
m_allocPE = m_totalPE - m_freePE;
|
m_allocPE = m_totalPE - m_freePE;
|
||||||
m_UUID = getUUID(vgName);
|
m_UUID = getUUID(vgName);
|
||||||
m_LVPathList = new QStringList(getLVs(vgName));
|
m_LVPathList = new QStringList(getLVs(vgName));
|
||||||
m_LVSizeMap = new QMap<QString, qint64>();
|
m_LVSizeMap = new QHash<QString, qint64>();
|
||||||
|
|
||||||
initPartitions();
|
initPartitions();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "core/volumemanagerdevice.h"
|
#include "core/volumemanagerdevice.h"
|
||||||
#include "util/libpartitionmanagerexport.h"
|
#include "util/libpartitionmanagerexport.h"
|
||||||
|
|
||||||
|
#include <QHash>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
@ -120,7 +121,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QMap<QString, qint64>* LVSizeMap() const {
|
QHash<QString, qint64>* LVSizeMap() const {
|
||||||
return m_LVSizeMap;
|
return m_LVSizeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +134,8 @@ private:
|
||||||
|
|
||||||
mutable QStringList* m_LVPathList;
|
mutable QStringList* m_LVPathList;
|
||||||
QList <const Partition*> m_PVs;
|
QList <const Partition*> m_PVs;
|
||||||
mutable QMap<QString, qint64>* m_LVSizeMap;
|
mutable QHash<QString, qint64>* m_LVSizeMap;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue