From bc84bc1df620d6593c35398d9e903e318f0748a9 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Thu, 30 Jun 2022 02:22:43 -0500 Subject: [PATCH] Launch Calamares on Install Lubuntu button. --- src/installerprompt.cpp | 8 ++++++++ src/installerprompt.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/installerprompt.cpp b/src/installerprompt.cpp index 283ab5c..7e79890 100644 --- a/src/installerprompt.cpp +++ b/src/installerprompt.cpp @@ -1,3 +1,4 @@ +#include #include "installerprompt.h" #include "./ui_installerprompt.h" @@ -23,6 +24,7 @@ InstallerPrompt::InstallerPrompt(QWidget *parent) // Slots and signals connect(ui->tryLubuntu, &QAbstractButton::clicked, this, &InstallerPrompt::tryLubuntu); + connect(ui->installLubuntu, &QAbstractButton::clicked, this, &InstallerPrompt::installLubuntu); } void InstallerPrompt::tryLubuntu() @@ -30,6 +32,12 @@ void InstallerPrompt::tryLubuntu() QApplication::quit(); } +void InstallerPrompt::installLubuntu() +{ + QProcess *calamares = new QProcess(this); + calamares->start("/usr/bin/pkexec /usr/bin/calamares"); +} + InstallerPrompt::~InstallerPrompt() { delete ui; diff --git a/src/installerprompt.h b/src/installerprompt.h index c46fd6f..d78a608 100644 --- a/src/installerprompt.h +++ b/src/installerprompt.h @@ -17,6 +17,7 @@ public: public slots: void tryLubuntu(); + void installLubuntu(); private: Ui::InstallerPrompt *ui;