From b55a6cf7167e844f5d96ffd20b99740000c01670 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 1 Apr 2019 07:50:59 -0400 Subject: [PATCH] [partition] Improve type-constness - Don't bother copying the vector of available PVs, we need the contained pointers. --- src/modules/partition/gui/ResizeVolumeGroupDialog.cpp | 5 +++-- src/modules/partition/gui/ResizeVolumeGroupDialog.h | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp b/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp index 35b6bbdf1..1c5eef0ab 100644 --- a/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp +++ b/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2018, Caio Jordão Carvalho + * Copyright 2019, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,8 +30,8 @@ #include ResizeVolumeGroupDialog::ResizeVolumeGroupDialog( LvmDevice *device, - QVector< const Partition* > availablePVs, - QVector< const Partition* >& selectedPVs, + const PartitionVector& availablePVs, + PartitionVector& selectedPVs, QWidget* parent ) : VolumeGroupBaseDialog( device->name(), device->physicalVolumes(), parent ) , m_selectedPVs( selectedPVs ) diff --git a/src/modules/partition/gui/ResizeVolumeGroupDialog.h b/src/modules/partition/gui/ResizeVolumeGroupDialog.h index 1d6015329..82231f885 100644 --- a/src/modules/partition/gui/ResizeVolumeGroupDialog.h +++ b/src/modules/partition/gui/ResizeVolumeGroupDialog.h @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2018, Caio Jordão Carvalho + * Copyright 2019, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,15 +27,17 @@ class LvmDevice; class ResizeVolumeGroupDialog : public VolumeGroupBaseDialog { public: + using PartitionVector = QVector< const Partition* >; + ResizeVolumeGroupDialog( LvmDevice *device, - QVector< const Partition* > availablePVs, - QVector< const Partition* >& selectedPVs, + const PartitionVector& availablePVs, + PartitionVector& selectedPVs, QWidget* parent ); void accept() override; private: - QVector< const Partition* >& m_selectedPVs; + PartitionVector& m_selectedPVs; }; #endif // RESIZEVOLUMEGROUPDIALOG_H