mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
Merge branch 'kpmcore-3.2'
- Bumps requireed KPMCore to 3.3 (in spite of the branch name) - Cleans up some dependencies Thanks to Andrius Stikonas.
This commit is contained in:
commit
1a42b8af41
16 changed files with 125 additions and 323 deletions
|
@ -43,6 +43,8 @@
|
|||
#include <QDir>
|
||||
#include <QListWidgetItem>
|
||||
#include <QPushButton>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegularExpressionValidator>
|
||||
#include <QSet>
|
||||
|
||||
static QSet< FileSystem::Type > s_unmountableFS(
|
||||
|
@ -66,6 +68,19 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par
|
|||
m_ui->encryptWidget->setText( tr( "En&crypt" ) );
|
||||
m_ui->encryptWidget->hide();
|
||||
|
||||
if (m_device->type() == Device::Disk_Device) {
|
||||
m_ui->lvNameLabel->hide();
|
||||
m_ui->lvNameLineEdit->hide();
|
||||
}
|
||||
if (m_device->type() == Device::LVM_Device) {
|
||||
/* LVM logical volume name can consist of: letters numbers _ . - +
|
||||
* It cannot start with underscore _ and must not be equal to . or .. or any entry in /dev/
|
||||
* QLineEdit accepts QValidator::Intermediate, so we just disable . at the beginning */
|
||||
QRegularExpression re(QStringLiteral(R"(^(?!_|\.)[\w\-.+]+)"));
|
||||
QRegularExpressionValidator *validator = new QRegularExpressionValidator(re, this);
|
||||
m_ui->lvNameLineEdit->setValidator(validator);
|
||||
}
|
||||
|
||||
QStringList mountPoints = { "/", "/boot", "/home", "/opt", "/usr", "/var" };
|
||||
if ( PartUtils::isEfiSystem() )
|
||||
mountPoints << Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString();
|
||||
|
@ -227,6 +242,10 @@ CreatePartitionDialog::createPartition()
|
|||
);
|
||||
}
|
||||
|
||||
if (m_device->type() == Device::LVM_Device) {
|
||||
partition->setPartitionPath(m_device->deviceNode() + QStringLiteral("/") + m_ui->lvNameLineEdit->text().trimmed());
|
||||
}
|
||||
|
||||
PartitionInfo::setMountPoint( partition, m_ui->mountPointComboBox->currentText() );
|
||||
PartitionInfo::setFormat( partition, true );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue