- Passing list of pending operations as argument to ResizeOperation::canGrow.
- Access LVM::pvList through static list attribute.
This commit is contained in:
parent
556a5a22ba
commit
dfca46250e
|
@ -58,7 +58,7 @@ CreateVolumeGroupDialog::CreateVolumeGroupDialog(QWidget* parent, QString& vgNam
|
||||||
|
|
||||||
void CreateVolumeGroupDialog::setupDialog()
|
void CreateVolumeGroupDialog::setupDialog()
|
||||||
{
|
{
|
||||||
for (const auto &p : qAsConst(LVM::pvList)) {
|
for (const auto &p : qAsConst(LVM::pvList::list())) {
|
||||||
bool toBeDeleted = false;
|
bool toBeDeleted = false;
|
||||||
|
|
||||||
// Ignore partitions that are going to be deleted
|
// Ignore partitions that are going to be deleted
|
||||||
|
|
|
@ -535,7 +535,7 @@ void MainWindow::enableActions()
|
||||||
actionCollection()->action(QStringLiteral("newPartition"))
|
actionCollection()->action(QStringLiteral("newPartition"))
|
||||||
->setEnabled(!readOnly && NewOperation::canCreateNew(part));
|
->setEnabled(!readOnly && NewOperation::canCreateNew(part));
|
||||||
|
|
||||||
const bool canResize = ResizeOperation::canGrow(part) ||
|
const bool canResize = ResizeOperation::canGrow(part, m_OperationStack->operations()) ||
|
||||||
ResizeOperation::canShrink(part, m_OperationStack->operations()) ||
|
ResizeOperation::canShrink(part, m_OperationStack->operations()) ||
|
||||||
ResizeOperation::canMove(part, m_OperationStack->operations());
|
ResizeOperation::canMove(part, m_OperationStack->operations());
|
||||||
actionCollection()->action(QStringLiteral("resizePartition"))
|
actionCollection()->action(QStringLiteral("resizePartition"))
|
||||||
|
|
|
@ -51,7 +51,7 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog(QWidget* parent, VolumeManagerD
|
||||||
void ResizeVolumeGroupDialog::setupDialog()
|
void ResizeVolumeGroupDialog::setupDialog()
|
||||||
{
|
{
|
||||||
if (dialogWidget().volumeType().currentText() == QStringLiteral("LVM")) {
|
if (dialogWidget().volumeType().currentText() == QStringLiteral("LVM")) {
|
||||||
for (const auto &p : qAsConst(LVM::pvList)) {
|
for (const auto &p : qAsConst(LVM::pvList::list())) {
|
||||||
if (p.isLuks())
|
if (p.isLuks())
|
||||||
continue;
|
continue;
|
||||||
if (p.vgName() == device()->name())
|
if (p.vgName() == device()->name())
|
||||||
|
|
Loading…
Reference in New Issue