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;