Scaffolding for exiting partition reformating
This commit is contained in:
parent
4e49f59333
commit
d7a853ee06
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <EditExistingPartitionDialog.h>
|
#include <EditExistingPartitionDialog.h>
|
||||||
|
|
||||||
|
#include <PartitionCoreModule.h>
|
||||||
#include <PartitionInfo.h>
|
#include <PartitionInfo.h>
|
||||||
#include <ui_EditExistingPartitionDialog.h>
|
#include <ui_EditExistingPartitionDialog.h>
|
||||||
#include <utils/Logger.h>
|
#include <utils/Logger.h>
|
||||||
@ -58,7 +59,11 @@ EditExistingPartitionDialog::mbSizeForSectorRange( qint64 first, qint64 last ) c
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EditExistingPartitionDialog::applyChanges( PartitionCoreModule* module )
|
EditExistingPartitionDialog::applyChanges( PartitionCoreModule* core )
|
||||||
{
|
{
|
||||||
PartitionInfo::setMountPoint( m_partition, m_ui->mountPointComboBox->currentText() );
|
PartitionInfo::setMountPoint( m_partition, m_ui->mountPointComboBox->currentText() );
|
||||||
|
if ( m_ui->formatRadioButton->isChecked() )
|
||||||
|
core->formatPartition( m_device, m_partition );
|
||||||
|
else
|
||||||
|
core->refresh( m_device );
|
||||||
}
|
}
|
||||||
|
@ -47,10 +47,13 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Content:</string>
|
<string>Content:</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>keepRadioButton</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QRadioButton" name="radioButton">
|
<widget class="QRadioButton" name="keepRadioButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Keep</string>
|
<string>Keep</string>
|
||||||
</property>
|
</property>
|
||||||
@ -60,7 +63,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QRadioButton" name="radioButton_2">
|
<widget class="QRadioButton" name="formatRadioButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Format</string>
|
<string>Format</string>
|
||||||
</property>
|
</property>
|
||||||
@ -142,8 +145,8 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>sizeSpinBox</tabstop>
|
<tabstop>sizeSpinBox</tabstop>
|
||||||
<tabstop>radioButton</tabstop>
|
<tabstop>keepRadioButton</tabstop>
|
||||||
<tabstop>radioButton_2</tabstop>
|
<tabstop>formatRadioButton</tabstop>
|
||||||
<tabstop>mountPointComboBox</tabstop>
|
<tabstop>mountPointComboBox</tabstop>
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
@ -265,6 +265,11 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition )
|
|||||||
refresh( device );
|
refresh( device );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PartitionCoreModule::formatPartition( Device* device, Partition* partition )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
QList< Calamares::job_ptr >
|
QList< Calamares::job_ptr >
|
||||||
PartitionCoreModule::jobs() const
|
PartitionCoreModule::jobs() const
|
||||||
{
|
{
|
||||||
|
@ -55,6 +55,8 @@ public:
|
|||||||
|
|
||||||
void deletePartition( Device* device, Partition* partition );
|
void deletePartition( Device* device, Partition* partition );
|
||||||
|
|
||||||
|
void formatPartition( Device* device, Partition* partition );
|
||||||
|
|
||||||
QList< Calamares::job_ptr > jobs() const;
|
QList< Calamares::job_ptr > jobs() const;
|
||||||
|
|
||||||
bool hasRootMountPoint() const
|
bool hasRootMountPoint() const
|
||||||
|
Loading…
Reference in New Issue
Block a user