diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-10-21 00:01:05 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-10-21 00:26:19 -0500 |
commit | c8d848cc58423b77df88e518e5bd5488cd59aa70 (patch) | |
tree | 62f637a329061601728b37e9674b7d06e8f15ef4 /ui/qt5 | |
parent | ea9dbd120e6a2e1df4bc9efdaed418a1548c25c0 (diff) | |
download | horizon-c8d848cc58423b77df88e518e5bd5488cd59aa70.tar.gz horizon-c8d848cc58423b77df88e518e5bd5488cd59aa70.tar.bz2 horizon-c8d848cc58423b77df88e518e5bd5488cd59aa70.tar.xz horizon-c8d848cc58423b77df88e518e5bd5488cd59aa70.zip |
Qt UI: Use sudo to launch Partition Manager
I'm not happy about relying on sudo either, but there's no other good way.
Fixes: #368
Diffstat (limited to 'ui/qt5')
-rw-r--r-- | ui/qt5/intropage.cc | 2 | ||||
-rw-r--r-- | ui/qt5/netdhcppage.cc | 2 | ||||
-rw-r--r-- | ui/qt5/partitionmanualpage.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/ui/qt5/intropage.cc b/ui/qt5/intropage.cc index f36e1fb..ab21657 100644 --- a/ui/qt5/intropage.cc +++ b/ui/qt5/intropage.cc @@ -48,7 +48,7 @@ IntroPage::IntroPage(QWidget *parent) : HorizonWizardPage(parent) { }); connect(toolMenu->addAction("&Partition Editor"), &QAction::triggered, [=](void) { QProcess *p = new QProcess(this); - p->start("partitionmanager", QStringList()); + p->start("sudo", {"/usr/bin/partitionmanager"}); horizonWizard()->tools.push_back(p); }); connect(toolMenu->addAction("&Web Browser"), &QAction::triggered, [=](void){ diff --git a/ui/qt5/netdhcppage.cc b/ui/qt5/netdhcppage.cc index 72061c9..8f4a474 100644 --- a/ui/qt5/netdhcppage.cc +++ b/ui/qt5/netdhcppage.cc @@ -63,7 +63,7 @@ void NetDHCPPage::startDHCP() { dhcpcd->setArguments({"-q", "-t", "15", "-n", "-j", "/var/log/horizon/dhcpcd.log", iface}); connect(dhcpcd, &QProcess::errorOccurred, - [=](QProcess::ProcessError error) { + [this](QProcess::ProcessError error) { progress->setStepStatus(0, StepProgressWidget::Failed); if(error == QProcess::FailedToStart) { information->setText(tr("The Installation Environment is missing a critical component. dhcpcd could not be loaded.")); diff --git a/ui/qt5/partitionmanualpage.cc b/ui/qt5/partitionmanualpage.cc index 548421b..b9c2d55 100644 --- a/ui/qt5/partitionmanualpage.cc +++ b/ui/qt5/partitionmanualpage.cc @@ -38,7 +38,7 @@ PartitionManualPage::PartitionManualPage(QWidget *parent) button->setWhatsThis(tr("Opens the partition editor.")); connect(button, &QPushButton::clicked, [=]{ QProcess p; - p.execute("partitionmanager", QStringList()); + p.execute("sudo", {"/usr/bin/partitionmanager"}); }); layout->addStretch(); layout->addWidget(button, 0, Qt::AlignCenter); |