From 8801c9ccaeaab68174312cf025bce771e2ea77df Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 17 Nov 2023 21:49:40 -0600 Subject: Qt UI: Remove "Use available space" option Way too buggy in its present state, unfortunately. Needs a lot more logic. Closes: #377, #376 --- ui/qt5/advoptsdialog.cc | 2 +- ui/qt5/horizonwizard.cc | 13 +------------ ui/qt5/partitionchoicepage.cc | 12 ------------ ui/qt5/partitionchoicepage.hh | 2 -- 4 files changed, 2 insertions(+), 27 deletions(-) (limited to 'ui/qt5') diff --git a/ui/qt5/advoptsdialog.cc b/ui/qt5/advoptsdialog.cc index 598f093..a79cf6c 100644 --- a/ui/qt5/advoptsdialog.cc +++ b/ui/qt5/advoptsdialog.cc @@ -41,7 +41,7 @@ inline void configTextEdit(QTextEdit *edit) { AdvOptsDialog::AdvOptsDialog(HorizonWizard *wizard, QWidget *parent) : QDialog(parent) { setWindowTitle(tr("System Installation Advanced Options")); - + auto warnLabel = new QLabel(tr("WARNING: Modifying any of the settings on this page may cause installation to fail.")); warnLabel->setTextFormat(Qt::RichText); diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc index 97b2939..8cd1941 100644 --- a/ui/qt5/horizonwizard.cc +++ b/ui/qt5/horizonwizard.cc @@ -608,19 +608,8 @@ QString HorizonWizard::toHScript() { if(erase) { lines << eraseDiskForArch(chosen_disk, arch, subarch); } else { -#ifdef HAS_INSTALL_ENV - Disk *disk = nullptr; - for(auto &d_iter : disks) { - if(d_iter.node() == chosen_disk) { - disk = &d_iter; - break; - } - } - Q_ASSERT(disk != nullptr); - start = disk->partitions().size() + 1; -#else /* !HAS_INSTALL_ENV */ + /* This branch will be taken when "use available space" is back. */ Q_ASSERT(false); -#endif /* HAS_INSTALL_ENV */ } if(this->grub) { diff --git a/ui/qt5/partitionchoicepage.cc b/ui/qt5/partitionchoicepage.cc index 71979f2..383d50c 100644 --- a/ui/qt5/partitionchoicepage.cc +++ b/ui/qt5/partitionchoicepage.cc @@ -37,18 +37,6 @@ PartitionChoicePage::PartitionChoicePage(QWidget *parent) eraseLabel->setTextFormat(Qt::RichText); eraseLabel->setWordWrap(true); - fitInButton = new QRadioButton(tr("Use &Free Space")); - fitInButton->setHidden(true); - fitInButton->setWhatsThis(tr("This option will install Adélie Linux in to the free space present on the selected disk. No existing data will be erased.")); - connect(fitInButton, &QRadioButton::clicked, [=] { - horizonWizard()->auto_part = true; - horizonWizard()->erase = false; - }); - fitInLabel = new QLabel(tr("The free space on the disk will be automatically partitioned for use with Adélie. Existing data will be preserved.")); - fitInLabel->setHidden(true); - fitInLabel->setIndent(25); - fitInLabel->setWordWrap(true); - useExistingButton = new QRadioButton(tr("Use Existing &Partition")); useExistingButton->setHidden(true); useExistingButton->setWhatsThis(tr("This option will allow you to choose a partition already present on the selected disk for installation. You may select to erase the partition, or install to a partition that is already formatted.")); diff --git a/ui/qt5/partitionchoicepage.hh b/ui/qt5/partitionchoicepage.hh index 0483d65..bfb13d4 100644 --- a/ui/qt5/partitionchoicepage.hh +++ b/ui/qt5/partitionchoicepage.hh @@ -31,8 +31,6 @@ private: QButtonGroup *buttons; QRadioButton *eraseButton; QLabel *eraseLabel; - QRadioButton *fitInButton; - QLabel *fitInLabel; QRadioButton *manualButton; QLabel *manualLabel; QRadioButton *useExistingButton; -- cgit v1.2.3-60-g2f50