mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
@@ -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);
|
||||
});
|
||||
|
||||
@@ -1220,7 +1220,7 @@
|
||||
<string notr="true">color:#808080</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>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. </p></body></html></string>
|
||||
<string><html><head/><body><p>Check update for Spark Store. </p></body></html></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>
|
||||
|
||||
Reference in New Issue
Block a user