diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-10-20 22:42:13 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-10-20 22:42:13 -0500 |
commit | 539a05b85867f7427e8066becafeb2f98ce82aa5 (patch) | |
tree | e5ebb5737db673750e6fd80c8c97ead36fa4561f /ui/qt5 | |
parent | 3f7a2b2d2deca1f1896e2e90b09afece0555d3f7 (diff) | |
download | horizon-539a05b85867f7427e8066becafeb2f98ce82aa5.tar.gz horizon-539a05b85867f7427e8066becafeb2f98ce82aa5.tar.bz2 horizon-539a05b85867f7427e8066becafeb2f98ce82aa5.tar.xz horizon-539a05b85867f7427e8066becafeb2f98ce82aa5.zip |
Qt UI: Runner: Show xterm errors, if present
This prevents the user from being confounded by a lack of response to
the Open Terminal button, if something goes catastrophically wrong that
even an Xterm won't open.
Closes: #362
Diffstat (limited to 'ui/qt5')
-rw-r--r-- | ui/qt5/runner/errorpage.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ui/qt5/runner/errorpage.cc b/ui/qt5/runner/errorpage.cc index 73ea1dc..905ebbe 100644 --- a/ui/qt5/runner/errorpage.cc +++ b/ui/qt5/runner/errorpage.cc @@ -60,8 +60,13 @@ ErrorPage::ErrorPage(QWidget *parent) : HorizonWizardPage(parent) { QPushButton *popAnXterm = new QPushButton(tr("Open &Terminal")); popAnXterm->setWhatsThis(tr("Opens a terminal, to allow you to run commands from the installation environment.")); connect(popAnXterm, &QPushButton::clicked, [=]{ - QProcess p; - p.execute("xterm", {"-fa", "Liberation Mono", "-fs", "12"}); + QProcess *p = new QProcess(this); + connect(p, &QProcess::errorOccurred, [=](QProcess::ProcessError error) { + QMessageBox::critical(this, tr("Could Not Open Terminal"), tr("Code %1 while attempting to open a terminal (le=%2).").arg(error).arg(errno)); + }); + connect(p, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), + [=](int exitCode, QProcess::ExitStatus exitStatus){ p->deleteLater(); }); + p->start("xterm", {"-fa", "Liberation Mono", "-fs", "12", "-bg", "DarkGreen", "-fg", "White"}); }); QHBoxLayout *buttonLayout = new QHBoxLayout; @@ -122,7 +127,7 @@ void ErrorPage::initializePage() { descLabel->setText(tr("An issue occurred while installing packages.")); deetLabel->setText(tr( "Details: This failure typically indicates an issue connecting to the network. " - "Ensure your network configuration is correct.\n\n" + "Ensure your system clock and network configuration are correct.\n\n" "You may be attempting to install a version or edition of Adélie Linux that your mirror does not provide.\n\n" "Rarely, this may indicate an issue with your installation media, " "or that software you have selected for installation is no longer available.")); |