!110 检测更新

* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
This commit is contained in:
2022-08-31 17:50:24 +00:00
committed by shenmo
parent 971a5dcc63
commit af89e64478
5 changed files with 40 additions and 83 deletions

View File

@@ -1090,34 +1090,9 @@ void Widget::on_pushButton_updateApt_clicked()
ui->pushButton_updateApt->setEnabled(false);
ui->label_aptserver->setText(tr("Updating, please wait..."));
QProcess runupdate;
runupdate.start("pkexec" , QStringList() << "aptss" << "ssupdate");
runupdate.waitForFinished();
QString error = runupdate.readAllStandardError();
QStringList everyError = error.split("\n");
bool haveError = false;
for(int i = 0; i < everyError.size(); i++)
{
if(everyError[i].left(2) == "E:")
{
haveError = true;
}
}
if(!haveError)
{
ui->label_aptserver->setText(tr("Update finished"));
}
else
{
ui->label_aptserver->setText(tr("Apt has reported an error. Please use apt update in terminal to locate the problem."));
}
QString storeSpk = "spk://store/tools/spark-store";
openUrl(storeSpk);
ui->label_aptserver->setText(tr(""));
ui->pushButton_updateApt->setEnabled(true);
});

View File

@@ -1220,7 +1220,7 @@
<string notr="true">color:#808080</string>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check update for Spark Store. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -1237,7 +1237,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Source Server</string>
<string>Spark Store Update</string>
</property>
</widget>
</item>