Check first selection of mountpoint too.
When opening the dialog.
This commit is contained in:
parent
f51b05e8aa
commit
8c1199df2d
@ -110,6 +110,8 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par
|
|||||||
updateMountPointUi();
|
updateMountPointUi();
|
||||||
|
|
||||||
setupFlagsList();
|
setupFlagsList();
|
||||||
|
// Checks the initial selection.
|
||||||
|
checkMountPointSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatePartitionDialog::~CreatePartitionDialog()
|
CreatePartitionDialog::~CreatePartitionDialog()
|
||||||
@ -257,10 +259,12 @@ CreatePartitionDialog::updateMountPointUi()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CreatePartitionDialog::checkMountPointSelection(const QString& selection)
|
CreatePartitionDialog::checkMountPointSelection()
|
||||||
{
|
{
|
||||||
|
const QString& selection = m_ui->mountPointComboBox->currentText();
|
||||||
|
|
||||||
if (m_usedMountPoints.contains(selection)) {
|
if (m_usedMountPoints.contains(selection)) {
|
||||||
m_ui->labelMountPoint->setText("Mountpoint already used. Please select another one.");
|
m_ui->labelMountPoint->setText("Mountpoint already in use. Please select another one.");
|
||||||
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
m_ui->labelMountPoint->setText( QString() );
|
m_ui->labelMountPoint->setText( QString() );
|
||||||
|
@ -61,7 +61,7 @@ public:
|
|||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void updateMountPointUi();
|
void updateMountPointUi();
|
||||||
void checkMountPointSelection(const QString &);
|
void checkMountPointSelection();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupFlagsList();
|
void setupFlagsList();
|
||||||
|
Loading…
Reference in New Issue
Block a user