mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-09 00:50:17 +08:00
chore:调用更新器
This commit is contained in:
@@ -14,6 +14,8 @@
|
|||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QAbstractButton>
|
#include <QAbstractButton>
|
||||||
#include <QtConcurrent>
|
#include <QtConcurrent>
|
||||||
|
#include <qlogging.h>
|
||||||
|
#include <qprocess.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <backend/ThemeChecker.h>
|
#include <backend/ThemeChecker.h>
|
||||||
@@ -522,5 +524,16 @@ void MainWindow::notify(QObject *receiver, QEvent *event)
|
|||||||
|
|
||||||
void MainWindow::on_pushButton_14_clicked()
|
void MainWindow::on_pushButton_14_clicked()
|
||||||
{
|
{
|
||||||
|
QString appPath;
|
||||||
|
appPath = QCoreApplication::applicationDirPath() + "/spark-update-tool/spark-update-tool";
|
||||||
|
if(appPath.isEmpty())
|
||||||
|
{
|
||||||
|
qWarning() << "Spark Update Tool not found!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QProcess *process = new QProcess(this);
|
||||||
|
QString program = "pkexec";
|
||||||
|
QStringList arguments;
|
||||||
|
arguments << appPath << "--silent";
|
||||||
|
process->start(program, arguments);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user