Merge branch 'dev' into 'dev'

Dev-hechengyuan

See merge request kylin-desktop/update-manager-group/kylin-system-updater!12
This commit is contained in:
He Chengyuan 2021-10-30 03:49:09 +00:00
commit 7a88e09f2f
3 changed files with 24 additions and 25 deletions

View File

@ -1,23 +0,0 @@
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 9
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_GCC_MAJOR_VERSION \
QMAKE_GCC_MINOR_VERSION \
QMAKE_GCC_PATCH_VERSION
QMAKE_CXX.INCDIRS = \
/usr/include/c++/9 \
/usr/include/aarch64-linux-gnu/c++/9 \
/usr/include/c++/9/backward \
/usr/lib/gcc/aarch64-linux-gnu/9/include \
/usr/local/include \
/usr/include/aarch64-linux-gnu \
/usr/include
QMAKE_CXX.LIBDIRS = \
/usr/lib/gcc/aarch64-linux-gnu/9 \
/usr/lib/aarch64-linux-gnu \
/usr/lib \
/lib/aarch64-linux-gnu \
/lib

View File

@ -98,7 +98,7 @@ void AppUpdateWid::showInstallStatues(QStringList appAptName,int progress,QStrin
if (!isUpdateAll && progress>50) {
updateAPPBtn->hide();
appVersion->setText(tr("Being installed"));
appVersion->setToolTip("");
appVersion->setToolTip(tr("Being installed"));
}
}

View File

@ -120,6 +120,7 @@ void TabWid::getAutoUpgradeStatus()
updateSource->killProcessSignal(pid.toInt(), 10);
checkUpdateBtn->setEnabled(true);
checkUpdateBtn->setText(tr("Check Update"));
checkUpdateBtn->setToolTip(tr("Check Update"));
checkUpdateBtnClicked();
} else if (!ret.compare("install")){
isAutoUpgrade = true;
@ -127,6 +128,7 @@ void TabWid::getAutoUpgradeStatus()
isAllUpgrade = true;
checkUpdateBtn->hide();
checkUpdateBtn->setText(tr("UpdateAll"));
checkUpdateBtn->setToolTip(tr("UpdateAll"));
bool ret = autoUpdateLoadUpgradeList(false);
if (!ret)
updateMutual->disconnectDbusSignal();
@ -134,11 +136,13 @@ void TabWid::getAutoUpgradeStatus()
/*如果没有进行自动更新,那就不需要操作 */
checkUpdateBtn->setEnabled(true);
checkUpdateBtn->setText(tr("Check Update"));
checkUpdateBtn->setToolTip(tr("Check Update"));
checkUpdateBtnClicked();
} else {
/*如果读不到,默认也不进行操作*/
checkUpdateBtn->setEnabled(true);
checkUpdateBtn->setText(tr("Check Update"));
checkUpdateBtn->setToolTip(tr("Check Update"));
checkUpdateBtnClicked();
}
}
@ -168,6 +172,7 @@ bool TabWid::autoUpdateLoadUpgradeList(bool isBackUp)
lastRefreshTime->setText(tr("Last refresh:")+ updatetime);
lastRefreshTime->show();
checkUpdateBtn->setText(tr("Check Update"));
checkUpdateBtn->setToolTip(tr("Check Update"));
return false;
} else {
QStringList list;
@ -221,6 +226,7 @@ void TabWid::backupMessageBox(QString str)
// checkUpdateBtn->setText(tr("全部更新"));
versionInformationLab->setText(tr("Updatable app detected on your system!"));
checkUpdateBtn->setText(tr("UpdateAll"));
checkUpdateBtn->setToolTip(tr("UpdateAll"));
foreach (AppUpdateWid *wid, widgetList) {
wid->updateAPPBtn->show();
}
@ -270,10 +276,12 @@ void TabWid::isCancelabled(bool status)
if(status)
{
checkUpdateBtn->setText(tr("Cancel"));
checkUpdateBtn->setToolTip(tr("Cancel"));
checkUpdateBtn->setEnabled(true);
}
else{
checkUpdateBtn->setText(tr("Cancel"));
checkUpdateBtn->setToolTip(tr("Cancel"));
checkUpdateBtn->setEnabled(false);
}
@ -283,6 +291,7 @@ void TabWid::DependResloveResult(bool ResloveStatus,bool ResloveResult,QStringLi
{
checkUpdateBtn->stop();
checkUpdateBtn->setText(tr("Calculated"));
checkUpdateBtn->setToolTip(tr("Calculated"));
if (!ResloveResult)
{
emit updateAllSignal(true);
@ -422,7 +431,7 @@ void TabWid::backupProgress(int progress)
return;
}
versionInformationLab->setText(tr("System is backing up..."));
allProgressBar->setValue(progress);
//allProgressBar->setValue(progress);
checkUpdateBtn->hide();
allProgressBar->show();
lastRefreshTime->hide();
@ -462,6 +471,7 @@ void TabWid::backupHideUpdateBtn(int result)
checkUpdateBtn->setEnabled(true);
// checkUpdateBtn->setText(tr("全部更新"));
checkUpdateBtn->setText(tr("UpdateAll"));
checkUpdateBtn->setToolTip(tr("UpdateAll"));
}
}
@ -592,6 +602,7 @@ void TabWid::slotUpdateCache(bool result,QStringList pkgname, QString error ,QSt
checkUpdateBtn->stop();
// checkUpdateBtn->setText(tr("检查更新"));
checkUpdateBtn->setText(tr("Check Update"));
checkUpdateBtn->setToolTip(tr("Check Update"));
// versionInformationLab->setText(tr("软件源更新失败:")+failedInfo );
versionInformationLab->setText(tr("Software source update failed: ")+error);
disconnect(updateSource->serviceInterface,SIGNAL(updateTemplateStatus(QString)),this,SLOT(slotUpdateTemplate(QString)));
@ -624,6 +635,7 @@ void TabWid::allComponents()
scrollArea = new QScrollArea(this);
updateTab = new QWidget(this); //更新页面
updateTab->setMaximumSize(960,960);
AppMessage = new QVBoxLayout();
AppMessage->setAlignment(Qt::AlignTop);
updateTab->setLayout(AppMessage);
@ -933,6 +945,7 @@ void TabWid::loadingFinishedSlot(int size)
checkUpdateBtn->stop();
// checkUpdateBtn->setText(tr("检查更新"));
checkUpdateBtn->setText(tr("Check Update"));
checkUpdateBtn->setToolTip(tr("Check Update"));
// versionInformationLab->setText(tr("您的系统已是最新!"));
versionInformationLab->setText(tr("Your system is the latest!"));
disconnect(updateMutual->interface,SIGNAL(UpdateDloadAndInstStaChanged(QStringList,int,QString,QString)),this,SLOT(getAllProgress(QStringList,int,QString,QString)));
@ -957,6 +970,7 @@ void TabWid::loadingFinishedSlot(int size)
checkUpdateBtn->setEnabled(true);
// checkUpdateBtn->setText(tr("全部更新"));
checkUpdateBtn->setText(tr("UpdateAll"));
checkUpdateBtn->setToolTip(tr("UpdateAll"));
// versionInformationLab->setText(tr("检测到你的系统有可更新的应用!"));
if (!isAutoUpgrade) {
versionInformationLab->setText(tr("Updatable app detected on your system!"));
@ -974,6 +988,7 @@ void TabWid::allappupdatefinishSlot()
checkUpdateBtn->stop();
// checkUpdateBtn->setText(tr("检查更新"));
checkUpdateBtn->setText(tr("Check Update"));
checkUpdateBtn->setToolTip(tr("Check Update"));
// versionInformationLab->setText(tr("您的系统已是最新!"));
versionInformationLab->setText(tr("Your system is the latest!"));
disconnect(updateMutual->interface,SIGNAL(UpdateDloadAndInstStaChanged(QStringList,int,QString,QString)),this,SLOT(getAllProgress(QStringList,int,QString,QString)));
@ -1256,6 +1271,7 @@ void TabWid::slotCancelDownload()
checkUpdateBtn->setEnabled(true);
// checkUpdateBtn->setText("全部更新");
checkUpdateBtn->setText(tr("UpdateAll"));
checkUpdateBtn->setToolTip(tr("UpdateAll"));
checkUpdateBtn->setCheckable(true);
versionInformationLab->setText(tr("update has been canceled!"));
}
@ -1267,6 +1283,7 @@ void TabWid::hideUpdateBtnSlot(bool state,QStringList pkgname,QString error,QStr
checkUpdateBtn->stop();
// checkUpdateBtn->setText(tr("检查更新"));
checkUpdateBtn->setText(tr("Check Update"));
checkUpdateBtn->setToolTip(tr("Check Update"));
if(state) {
versionInformationLab->setText(tr("Your system is the latest!"));
systemPortraitLab->setPixmap(QPixmap(":/img/plugins/upgrade/normal.png").scaled(96,96));
@ -1318,6 +1335,7 @@ void TabWid::oneappUpdateresultSlot(bool state,QStringList pkgname,QString error
checkUpdateBtn->stop();
// checkUpdateBtn->setText(tr("检查更新"));
checkUpdateBtn->setText(tr("UpdateAll"));
checkUpdateBtn->setToolTip(tr("UpdateAll"));
if(state) {
versionInformationLab->setText(tr("Part of the update success!"));
systemPortraitLab->setPixmap(QPixmap(":/img/plugins/upgrade/normal.png").scaled(96,96));
@ -1352,6 +1370,7 @@ void TabWid::oneappUpdateresultSlot(bool state,QStringList pkgname,QString error
checkUpdateBtn->stop();
// checkUpdateBtn->setText(tr("检查更新"));
checkUpdateBtn->setText(tr("Check Update"));
checkUpdateBtn->setToolTip(tr("Check Update"));
versionInformationLab->setText(tr("Your system is the latest!"));
systemPortraitLab->setPixmap(QPixmap(":/img/plugins/upgrade/normal.png").scaled(96,96));
checkUpdateBtn->hide();
@ -1383,6 +1402,7 @@ void TabWid::updatecancel(void)
checkUpdateBtn->stop();
// checkUpdateBtn->setText(tr("检查更新"));
checkUpdateBtn->setText(tr("UpdateAll"));
checkUpdateBtn->setToolTip(tr("UpdateAll"));
versionInformationLab->setText(tr("update has been canceled!"));
checkUpdateBtn->show();
}
@ -1396,6 +1416,7 @@ void TabWid::changeUpdateAllSlot(bool isUpdate)
if(checkUpdateBtn->isEnabled() == false)
{
checkUpdateBtn->setText(tr("UpdateAll"));
checkUpdateBtn->setToolTip(tr("UpdateAll"));
checkUpdateBtn->setEnabled(true);
}
}
@ -1540,6 +1561,7 @@ void TabWid::updateAllApp(bool status)
{
if(!status){
checkUpdateBtn->setText(tr("Calculating"));
checkUpdateBtn->setToolTip(tr("Calculating"));
}else{
foreach (AppUpdateWid *wid, widgetList) {
wid->updateAPPBtn->hide();