[partition] Improve type-constness

- Don't bother copying the vector of available PVs, we need the
   contained pointers.
This commit is contained in:
Adriaan de Groot 2019-04-01 07:50:59 -04:00
parent 7806ccbe72
commit b55a6cf716
2 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2018, Caio Jordão Carvalho <caiojcarvalho@gmail.com>
* Copyright 2019, Adriaan de Groot <groot@kde.org>
*
* 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 <QSpinBox>
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 )

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2018, Caio Jordão Carvalho <caiojcarvalho@gmail.com>
* Copyright 2019, Adriaan de Groot <groot@kde.org>
*
* 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