add base install and delete
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QProcess>
|
||||
#include <QVariantList>
|
||||
#include <QTemporaryDir>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QStringList>
|
||||
|
||||
class InstallManager : public QObject
|
||||
{
|
||||
@@ -12,29 +12,26 @@ class InstallManager : public QObject
|
||||
public:
|
||||
explicit InstallManager(QObject* parent = nullptr);
|
||||
|
||||
public:
|
||||
void yay(const QString& name, const QString& askpass);
|
||||
void pacman(const QString& name, const QString& askpass);
|
||||
|
||||
private:
|
||||
void start_process(const QString& program, const QStringList& args,
|
||||
const QString& name, const QString& askpass);
|
||||
void fail(const QString& reason);
|
||||
void on_ready_read();
|
||||
void on_process_finished(int exit_code, QProcess::ExitStatus status);
|
||||
void on_process_error(QProcess::ProcessError error);
|
||||
QProcessEnvironment install_environment(const QString& askpass) const;
|
||||
void stop_install(bool success, const QString& reason);
|
||||
|
||||
private:
|
||||
QProcess m_process;
|
||||
|
||||
public:
|
||||
void yay(const QString& password);
|
||||
void pacman(const QString& password);
|
||||
void set_package_manager(const QString& pm);
|
||||
|
||||
private:
|
||||
void on_update_ready_read();
|
||||
void on_process_finished(int exitCode, QProcess::ExitStatus status);
|
||||
void on_process_error(QProcess::ProcessError error);
|
||||
QProcessEnvironment update_environment(const QString& askpass) const;
|
||||
void stop_update(bool success, const QString& reason);
|
||||
|
||||
private:
|
||||
QString m_package_manager = "yay";
|
||||
|
||||
signals:
|
||||
void set_updating_flag(bool updated, bool updating);
|
||||
void append_update_log(const QByteArray& chunk);
|
||||
void console_clear();
|
||||
void add_log_line(const QString& line);
|
||||
void console_clear();
|
||||
void finished();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user