150035 148908 148443 147597 143181
This commit is contained in:
parent
4510c70e65
commit
0c5f578ab4
|
@ -263,7 +263,12 @@ QStringList CustomizeSystemRestoreProxy::getRsyncArgs(CustomizeSystemRestoreScen
|
|||
args << "--exclude=/usr/share/rsync";
|
||||
args << "--exclude=/usr/share/initramfs-tools/hooks/kybackup-hooks";
|
||||
args << "--exclude=/usr/share/initramfs-tools/scripts/local-bottom/kybackup";
|
||||
|
||||
// 文件安全箱
|
||||
args << "--exclude=/data/security-dir";
|
||||
// 安装kylin
|
||||
args << "--exclude=/usr/share/applications/kylin-os-installer.desktop";
|
||||
args << "--exclude=*/.local/share/applications/kylin-os-installer.desktop";
|
||||
|
||||
for (const QString& item : excludes) {
|
||||
args << QString("--exclude=") + item;
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
#backup-auto --autorestore ${rootpath} /backup
|
||||
|
||||
echo $*
|
||||
# 临时关闭安全,因为有些文件安全保护为只读,造成备份还原无法操作
|
||||
echo 0 > /sys/kernel/security/kysec/fpro
|
||||
|
||||
#xgs备份还原要保留更多的文件或目录:
|
||||
#kybackup/maindialog.cpp, backup-daemon/mountpoint.cpp, backup-daemon/data/backup-auto-efi
|
||||
XGS=false
|
||||
|
@ -1139,6 +1142,8 @@ restoreAuto() { #还原
|
|||
excludes="${excludes} --exclude=/var/log"
|
||||
excludes="${excludes} --exclude=*/backup/snapshots"
|
||||
excludes="${excludes} --exclude=/data/security-dir"
|
||||
excludes="${excludes} --exclude=/usr/share/applications/kylin-os-installer.desktop"
|
||||
excludes="${excludes} --exclude=*/.local/share/applications/kylin-os-installer.desktop"
|
||||
#yi jian huan yuan
|
||||
if [ ! -e "${restoreDir}/data/data" ]; then
|
||||
#这两行要一致
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo $*
|
||||
BACKUP_FLAG=backup
|
||||
RESTORE_FLAG=restore
|
||||
ROLLBACK_FLAG=rollback-backup
|
||||
# 把这个文件放在 /usr/share/initramfs-tools/scripts/local-bottom/ 目录下。
|
||||
# 把这个文件放在 /usr/share/initramfs-tools/scripts/init-bottom/ 目录下。
|
||||
# 权限为 0755,在自动更新initrd时,这个脚本就被放到initrd中了,例如,
|
||||
# update-initramfs -u
|
||||
# 更新后,这个脚本将在initrd 运行到 local-bottom 阶段时自动执行。
|
||||
|
@ -12,7 +8,8 @@ ROLLBACK_FLAG=rollback-backup
|
|||
|
||||
# PREREQ指定需要在什么脚本之后执行(同目录下的),也就是指定该脚本的依赖,以确定执行顺序。
|
||||
# 如果没有依赖,就可以是空字符串。
|
||||
PREREQ=""
|
||||
PREREQ="security_set"
|
||||
echo "run security_set first"
|
||||
|
||||
prereqs()
|
||||
{
|
||||
|
@ -29,6 +26,11 @@ esac
|
|||
# 上述部分是initramfs脚本的固定格式,不用动它。
|
||||
# 除非有依赖,才需要改 PREREQ 的值。
|
||||
|
||||
echo $*
|
||||
BACKUP_FLAG=backup
|
||||
RESTORE_FLAG=restore
|
||||
ROLLBACK_FLAG=rollback-backup
|
||||
|
||||
#. /scripts/security-functions
|
||||
show_text_mesg()
|
||||
{
|
||||
|
|
|
@ -76,7 +76,9 @@ mount_fstab(){
|
|||
if [ ! -e "$fstab_path" ]; then
|
||||
fstab_path=/etc/fstab-backup
|
||||
fi
|
||||
echo "mount $fstab_path begin"
|
||||
|
||||
# 将/usr/share/initramfs-tools/scripts/local-bottom/kybackup脚本放到/usr/share/initramfs-tools/scripts/init-bottom下后,在备份还原前就已经mount了各个分区(bind的没有mount)
|
||||
echo "rw mode remount $fstab_path begin"
|
||||
cat "$fstab_path" | grep -Ev "^#" | awk '{print $1 " " $2 " " $3 " " $4 " " $5 " " $6}' |
|
||||
while read device mntdir fstype options dump passno ;
|
||||
do
|
||||
|
@ -90,9 +92,8 @@ mount_fstab(){
|
|||
#virtual or network filesystems
|
||||
([ none = "$mntdir" ] || [ yes = $(is_remote $fstype) ]) && continue
|
||||
|
||||
#swap or rootfs
|
||||
([ swap = "$fstype" ] || [ / = "$mntdir" ]) && continue
|
||||
#[ swap = "$fstype" ] || [ / = "$mntdir" ] || [ /home = "$mntdir" ] || [ /var/log = "$mntdir" ]&& continue
|
||||
#swap or backup分区,backup分区后面单独挂载
|
||||
([ swap = "$fstype" ] || [ /backup = "$mntdir" ]) && continue
|
||||
|
||||
#not system partition
|
||||
#[ no = $(is_system_partition $mntdir) ] && continue
|
||||
|
@ -107,8 +108,10 @@ mount_fstab(){
|
|||
echo "mount -o $options ${rootmnt}${device} $target_mntdir"
|
||||
mount -o $options "${rootmnt}${device}" "$target_mntdir"
|
||||
else
|
||||
echo "mount -n -t $fstype -o $mntopts $device $target_mntdir"
|
||||
mount -n -t $fstype -o $mntopts $device "$target_mntdir"
|
||||
# echo "mount -n -t $fstype -o $mntopts $device $target_mntdir"
|
||||
# mount -n -t $fstype -o $mntopts $device "$target_mntdir"
|
||||
echo "mount -o rw,remount $target_mntdir"
|
||||
mount -o rw,remount "$target_mntdir"
|
||||
fi
|
||||
|
||||
#如果一个分区已经安装了,则下列会报错后不再继续
|
||||
|
@ -118,7 +121,8 @@ mount_fstab(){
|
|||
#fi
|
||||
|
||||
done || exit 1
|
||||
echo "mount $fstab_path end"
|
||||
echo "rw mode remount $fstab_path end"
|
||||
mount
|
||||
}
|
||||
|
||||
mount_fstab
|
||||
|
|
|
@ -278,7 +278,12 @@ QStringList SystemRestoreProxy::getRsyncArgs(SystemRestoreScene scene)
|
|||
args << "--exclude=/usr/share/rsync";
|
||||
args << "--exclude=/usr/share/initramfs-tools/hooks/kybackup-hooks";
|
||||
args << "--exclude=/usr/share/initramfs-tools/scripts/local-bottom/kybackup";
|
||||
|
||||
// 文件安全箱
|
||||
args << "--exclude=/data/security-dir";
|
||||
// 安装kylin
|
||||
args << "--exclude=/usr/share/applications/kylin-os-installer.desktop";
|
||||
args << "--exclude=*/.local/share/applications/kylin-os-installer.desktop";
|
||||
|
||||
// 以前的出厂备份和grub备份没有备份/data,还原时需要判断/data是否存在,如不存在需要屏蔽掉,不然会将主机上的/data删除,造成问题
|
||||
// 此为兼容以前备份的老数据而改,等以后老的备份估计不存在了可已去掉
|
||||
|
|
|
@ -281,7 +281,12 @@ QStringList UDiskSystemRestoreProxy::getRsyncArgs(SystemRestoreScene scene)
|
|||
args << "--exclude=/usr/share/rsync";
|
||||
args << "--exclude=/usr/share/initramfs-tools/hooks/kybackup-hooks";
|
||||
args << "--exclude=/usr/share/initramfs-tools/scripts/local-bottom/kybackup";
|
||||
|
||||
// 文件安全箱
|
||||
args << "--exclude=/data/security-dir";
|
||||
// 安装kylin
|
||||
args << "--exclude=/usr/share/applications/kylin-os-installer.desktop";
|
||||
args << "--exclude=*/.local/share/applications/kylin-os-installer.desktop";
|
||||
|
||||
// 以前的出厂备份和grub备份没有备份/data,还原时需要判断/data是否存在,如不存在需要屏蔽掉,不然会将主机上的/data删除,造成问题
|
||||
// 此为兼容以前备份的老数据而改,等以后老的备份估计不存在了可已去掉
|
||||
|
|
|
@ -494,7 +494,8 @@ bool Utils::generateExcludePathsFile()
|
|||
// 系统安装后有的会将/data/home /data/root挂载到的/home /root上,实际文件是存放在/data/home /data/root下面,为了统一标准保留/home /root排除/data/home /data/root
|
||||
QStringList excludes;
|
||||
Utils::excludeFstabBindPath(excludes);
|
||||
Utils::excludeSomeHomePath(excludes);
|
||||
// ~/.box目录后来安全给予赋权,故此去掉
|
||||
// Utils::excludeSomeHomePath(excludes);
|
||||
Utils::excludeCustomizePath(excludes);
|
||||
for (const QString& item : excludes) {
|
||||
in << item << END_LINE;
|
||||
|
|
|
@ -7,7 +7,7 @@ backup-daemon/data/com.kylin.backup.conf etc/dbus-1/system.d/
|
|||
backup-daemon/data/com.kylin.backup.service usr/share/dbus-1/system-services
|
||||
backup-daemon/data/com.kylin.backup.policy usr/share/polkit-1/actions/
|
||||
backup-daemon/data/initramfs-tools/hooks/kybackup-hooks usr/share/initramfs-tools/hooks
|
||||
backup-daemon/data/initramfs-tools/scripts/local-bottom/kybackup usr/share/initramfs-tools/scripts/local-bottom
|
||||
backup-daemon/data/initramfs-tools/scripts/local-bottom/kybackup usr/share/initramfs-tools/scripts/init-bottom
|
||||
backup-daemon/data/initramfs-tools/conf-hooks.d/kybackup usr/share/initramfs-tools/conf-hooks.d
|
||||
kybackup/yhkylin-backup-tools.desktop usr/share/applications/
|
||||
data/kybackup/* usr/share/kylin-user-guide/data/guide/kybackup
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#!/bin/bash
|
||||
if [ -e "/usr/share/initramfs-tools/scripts/local-bottom/kybackup" ]; then
|
||||
rm -f /usr/share/initramfs-tools/scripts/local-bottom/kybackup > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
boot_is_ro=false
|
||||
bootefi_is_ro=false
|
||||
remount_boot_rw() {
|
||||
|
|
|
@ -152,7 +152,7 @@ void DataBackup::initFirstWidget()
|
|||
beginBackup->setGeometry(41, 372, 180, 52);
|
||||
beginBackup->setText(tr("Start Backup"));
|
||||
beginBackup->setEnabled(true);
|
||||
beginBackup->setAutoRepeat(true);
|
||||
// beginBackup->setAutoRepeat(true);
|
||||
beginBackup->setProperty("isImportant", true);
|
||||
font.setPixelSize(24);
|
||||
beginBackup->setFont(font);
|
||||
|
@ -182,7 +182,7 @@ void DataBackup::initFirstWidget()
|
|||
incrementBackup->setFixedWidth(fontSize * 1.2);
|
||||
}
|
||||
incrementBackup->setEnabled(true);
|
||||
incrementBackup->setAutoRepeat(true);
|
||||
// incrementBackup->setAutoRepeat(true);
|
||||
font.setPixelSize(24);
|
||||
incrementBackup->setFont(font);
|
||||
connect(incrementBackup, &KBorderButton::clicked, this, [=](bool checked) {
|
||||
|
@ -426,7 +426,7 @@ void DataBackup::initSecondWidget()
|
|||
KBorderButton *preStep = new KBorderButton(second);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, this, [=]() {
|
||||
preStep->clearFocus();
|
||||
this->setCurrentIndex(HOME_PAGE);
|
||||
|
@ -436,7 +436,7 @@ void DataBackup::initSecondWidget()
|
|||
MyPushButton *nextStep = new MyPushButton(second);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(false);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
hlayoutLastLine->addWidget(preStep);
|
||||
hlayoutLastLine->addWidget(nextStep);
|
||||
|
@ -788,7 +788,7 @@ void DataBackup::initSecondWidget_inc()
|
|||
KBorderButton *preStep = new KBorderButton(second);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, this, [=]() {
|
||||
preStep->clearFocus();
|
||||
this->setCurrentIndex(HOME_PAGE);
|
||||
|
@ -797,7 +797,7 @@ void DataBackup::initSecondWidget_inc()
|
|||
// 下一步按钮
|
||||
MyPushButton *nextStep = new MyPushButton(second);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
|
||||
hlayoutLastLine->addWidget(preStep);
|
||||
|
@ -1032,7 +1032,7 @@ void DataBackup::initThirdWidget()
|
|||
KBorderButton *preStep = new KBorderButton(centerFont);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, this, [=]() {
|
||||
preStep->clearFocus();
|
||||
if (this->m_isIncrement)
|
||||
|
@ -1045,7 +1045,7 @@ void DataBackup::initThirdWidget()
|
|||
MyPushButton *nextStep = new MyPushButton(centerFont);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(true);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
this->on_next_clicked(checked);
|
||||
|
@ -1056,7 +1056,7 @@ void DataBackup::initThirdWidget()
|
|||
MyPushButton *recheck = new MyPushButton(centerFont);
|
||||
recheck->setText(tr("Recheck"));
|
||||
recheck->setEnabled(true);
|
||||
recheck->setAutoRepeat(true);
|
||||
// recheck->setAutoRepeat(true);
|
||||
recheck->setProperty("isImportant", true);
|
||||
connect(recheck, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
Q_UNUSED(checked)
|
||||
|
@ -1448,16 +1448,22 @@ void DataBackup::initForthWidget()
|
|||
KBorderButton *preStep = new KBorderButton(forth);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, preStep, &KBorderButton::clearFocus);
|
||||
connect(preStep, &KBorderButton::clicked, this, &DataBackup::on_pre_clicked);
|
||||
// connect(preStep, &KBorderButton::clicked, this, &DataBackup::on_pre_clicked);
|
||||
connect(preStep, &KBorderButton::clicked, this, [=](){
|
||||
if (this->m_isIncrement)
|
||||
this->setCurrentIndex(INC_SELECT_PATH_PAGE);
|
||||
else
|
||||
this->setCurrentIndex(SELECT_PATH_PAGE);
|
||||
});
|
||||
hlayoutCenterLine3->addWidget(preStep);
|
||||
|
||||
// 下一步按钮
|
||||
MyPushButton *nextStep = new MyPushButton(forth);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(true);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
Q_UNUSED(checked)
|
||||
|
@ -1657,7 +1663,7 @@ void DataBackup::initFifthWidget()
|
|||
// 取消按钮
|
||||
MyPushButton *cancel = new MyPushButton(fifth);
|
||||
cancel->setText(tr("Cancel"));
|
||||
cancel->setAutoRepeat(true);
|
||||
// cancel->setAutoRepeat(true);
|
||||
cancel->setProperty("isImportant", true);
|
||||
hlayoutCenterFont3->addStretch();
|
||||
hlayoutCenterFont3->addWidget(cancel);
|
||||
|
@ -1961,14 +1967,14 @@ void DataBackup::initLastWidget()
|
|||
MyPushButton *homePage = new MyPushButton(centerFont);
|
||||
homePage->setText(tr("Home Page"));
|
||||
homePage->setEnabled(true);
|
||||
homePage->setAutoRepeat(true);
|
||||
// homePage->setAutoRepeat(true);
|
||||
homePage->setProperty("isImportant", true);
|
||||
hlayoutCenterFont5->addWidget(homePage);
|
||||
// 再试一次
|
||||
KBorderButton *retry = new KBorderButton(centerFont);
|
||||
retry->setText(tr("Retry"));
|
||||
retry->setEnabled(true);
|
||||
retry->setAutoRepeat(true);
|
||||
// retry->setAutoRepeat(true);
|
||||
hlayoutCenterFont5->addWidget(retry);
|
||||
hlayoutCenterFont5->addStretch();
|
||||
hlayoutCenterFont5->setAlignment(Qt::AlignCenter);
|
||||
|
|
|
@ -134,7 +134,7 @@ void DataRestore::initFirstWidget()
|
|||
beginRestore->setGeometry(41, 372, 180, 52);
|
||||
beginRestore->setText(tr("Start Restore"));
|
||||
beginRestore->setEnabled(true);
|
||||
beginRestore->setAutoRepeat(true);
|
||||
// beginRestore->setAutoRepeat(true);
|
||||
beginRestore->setProperty("isImportant", true);
|
||||
font.setPixelSize(24);
|
||||
beginRestore->setFont(font);
|
||||
|
@ -349,7 +349,7 @@ void DataRestore::initSecondWidget()
|
|||
KBorderButton *preStep = new KBorderButton(centerFont);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, preStep, &KBorderButton::clearFocus);
|
||||
connect(preStep, &KBorderButton::clicked, this, &DataRestore::on_pre_clicked);
|
||||
hlayoutCenterFont5->addWidget(preStep);
|
||||
|
@ -357,7 +357,7 @@ void DataRestore::initSecondWidget()
|
|||
MyPushButton *nextStep = new MyPushButton(centerFont);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(true);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
this->on_next_clicked(checked);
|
||||
|
@ -368,7 +368,7 @@ void DataRestore::initSecondWidget()
|
|||
MyPushButton *recheck = new MyPushButton(centerFont);
|
||||
recheck->setText(tr("Recheck"));
|
||||
recheck->setEnabled(true);
|
||||
recheck->setAutoRepeat(true);
|
||||
// recheck->setAutoRepeat(true);
|
||||
recheck->setProperty("isImportant", true);
|
||||
hlayoutCenterFont5->addWidget(recheck);
|
||||
hlayoutCenterFont5->addStretch();
|
||||
|
@ -936,20 +936,20 @@ void DataRestore::initLastWidget()
|
|||
MyPushButton *homePage = new MyPushButton(centerFont);
|
||||
homePage->setText(tr("Home Page"));
|
||||
homePage->setEnabled(true);
|
||||
homePage->setAutoRepeat(true);
|
||||
// homePage->setAutoRepeat(true);
|
||||
homePage->setProperty("isImportant", true);
|
||||
hlayoutCenterFont5->addWidget(homePage);
|
||||
// 再试一次
|
||||
KBorderButton *retry = new KBorderButton(centerFont);
|
||||
retry->setText(tr("Retry"));
|
||||
retry->setEnabled(true);
|
||||
retry->setAutoRepeat(true);
|
||||
// retry->setAutoRepeat(true);
|
||||
hlayoutCenterFont5->addWidget(retry);
|
||||
// 重启
|
||||
KBorderButton *reboot = new KBorderButton(centerFont);
|
||||
reboot->setText(tr("Reboot System"));
|
||||
reboot->setEnabled(true);
|
||||
reboot->setAutoRepeat(true);
|
||||
// reboot->setAutoRepeat(true);
|
||||
hlayoutCenterFont5->addWidget(reboot);
|
||||
hlayoutCenterFont5->addStretch();
|
||||
hlayoutCenterFont5->setAlignment(Qt::AlignCenter);
|
||||
|
|
|
@ -146,7 +146,7 @@ void GhostImage::initFirstWidget()
|
|||
beginBackup->setGeometry(41, 372, 180, 52);
|
||||
beginBackup->setText(tr("Start Ghost"));
|
||||
beginBackup->setEnabled(true);
|
||||
beginBackup->setAutoRepeat(true);
|
||||
// beginBackup->setAutoRepeat(true);
|
||||
beginBackup->setProperty("isImportant", true);
|
||||
font.setPixelSize(24);
|
||||
beginBackup->setFont(font);
|
||||
|
@ -265,7 +265,7 @@ void GhostImage::initSecondWidget()
|
|||
KBorderButton *preStep = new KBorderButton(second);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, preStep, &KBorderButton::clearFocus);
|
||||
connect(preStep, &KBorderButton::clicked, this, &GhostImage::on_pre_clicked);
|
||||
hlayoutLine3->addWidget(preStep);
|
||||
|
@ -274,7 +274,7 @@ void GhostImage::initSecondWidget()
|
|||
MyPushButton *nextStep = new MyPushButton(second);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(true);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
// 备份路径选择索引
|
||||
|
@ -411,7 +411,7 @@ void GhostImage::initThirdWidget()
|
|||
KBorderButton *preStep = new KBorderButton(centerFont);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, preStep, &KBorderButton::clearFocus);
|
||||
connect(preStep, &KBorderButton::clicked, this, &GhostImage::on_pre_clicked);
|
||||
hlayoutCenterFont5->addWidget(preStep);
|
||||
|
@ -419,7 +419,7 @@ void GhostImage::initThirdWidget()
|
|||
MyPushButton *nextStep = new MyPushButton(centerFont);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(true);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
this->on_next_clicked(checked);
|
||||
|
@ -430,7 +430,7 @@ void GhostImage::initThirdWidget()
|
|||
MyPushButton *recheck = new MyPushButton(centerFont);
|
||||
recheck->setText(tr("Recheck"));
|
||||
recheck->setEnabled(true);
|
||||
recheck->setAutoRepeat(true);
|
||||
// recheck->setAutoRepeat(true);
|
||||
recheck->setProperty("isImportant", true);
|
||||
hlayoutCenterFont5->addWidget(recheck);
|
||||
hlayoutCenterFont5->addStretch();
|
||||
|
@ -809,7 +809,7 @@ void GhostImage::initForthWidget()
|
|||
MyPushButton *cancel = new MyPushButton(forth);
|
||||
cancel->setText(tr("Cancel"));
|
||||
cancel->setEnabled(true);
|
||||
cancel->setAutoRepeat(true);
|
||||
// cancel->setAutoRepeat(true);
|
||||
cancel->setProperty("isImportant", true);
|
||||
hlayoutCenterFont3->addStretch();
|
||||
hlayoutCenterFont3->addWidget(cancel);
|
||||
|
@ -1143,14 +1143,14 @@ void GhostImage::initLastWidget()
|
|||
MyPushButton *homePage = new MyPushButton(centerFont);
|
||||
homePage->setText(tr("Home Page"));
|
||||
homePage->setEnabled(true);
|
||||
homePage->setAutoRepeat(true);
|
||||
// homePage->setAutoRepeat(true);
|
||||
homePage->setProperty("isImportant", true);
|
||||
hlayoutCenterFont5->addWidget(homePage);
|
||||
// 再试一次
|
||||
KBorderButton *retry = new KBorderButton(centerFont);
|
||||
retry->setText(tr("Retry"));
|
||||
retry->setEnabled(true);
|
||||
retry->setAutoRepeat(true);
|
||||
// retry->setAutoRepeat(true);
|
||||
hlayoutCenterFont5->addWidget(retry);
|
||||
hlayoutCenterFont5->addStretch();
|
||||
hlayoutCenterFont5->setAlignment(Qt::AlignCenter);
|
||||
|
|
|
@ -144,7 +144,7 @@ void SystemBackup::initFirstWidget()
|
|||
beginBackup->setGeometry(41, 372, 180, 52);
|
||||
beginBackup->setText(tr("Start Backup"));
|
||||
beginBackup->setEnabled(true);
|
||||
beginBackup->setAutoRepeat(true);
|
||||
// beginBackup->setAutoRepeat(true);
|
||||
beginBackup->setProperty("isImportant", true);
|
||||
font.setPixelSize(24);
|
||||
beginBackup->setFont(font);
|
||||
|
@ -272,7 +272,7 @@ void SystemBackup::initSecondWidget()
|
|||
KBorderButton *preStep = new KBorderButton(second);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, preStep, &KBorderButton::clearFocus);
|
||||
connect(preStep, &MyPushButton::clicked, this, &SystemBackup::on_pre_clicked);
|
||||
hlayoutLine3->addWidget(preStep);
|
||||
|
@ -281,7 +281,7 @@ void SystemBackup::initSecondWidget()
|
|||
MyPushButton *nextStep = new MyPushButton(second);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(false);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
hlayoutLine3->addWidget(nextStep);
|
||||
hlayoutLine3->addStretch();
|
||||
|
@ -541,7 +541,7 @@ void SystemBackup::initThirdWidget()
|
|||
KBorderButton *preStep = new KBorderButton(centerFont);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, preStep, &KBorderButton::clearFocus);
|
||||
connect(preStep, &KBorderButton::clicked, this, &SystemBackup::on_pre_clicked);
|
||||
hlayoutCenterFont5->addWidget(preStep);
|
||||
|
@ -549,7 +549,7 @@ void SystemBackup::initThirdWidget()
|
|||
MyPushButton *nextStep = new MyPushButton(centerFont);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(true);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
this->on_next_clicked(checked);
|
||||
|
@ -560,7 +560,7 @@ void SystemBackup::initThirdWidget()
|
|||
MyPushButton *recheck = new MyPushButton(centerFont);
|
||||
recheck->setText(tr("Recheck"));
|
||||
recheck->setEnabled(true);
|
||||
recheck->setAutoRepeat(true);
|
||||
// recheck->setAutoRepeat(true);
|
||||
recheck->setProperty("isImportant", true);
|
||||
connect(recheck, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
Q_UNUSED(checked)
|
||||
|
@ -951,16 +951,19 @@ void SystemBackup::initForthWidget()
|
|||
KBorderButton *preStep = new KBorderButton(forth);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, preStep, &KBorderButton::clearFocus);
|
||||
connect(preStep, &KBorderButton::clicked, this, &SystemBackup::on_pre_clicked);
|
||||
// connect(preStep, &KBorderButton::clicked, this, &SystemBackup::on_pre_clicked);
|
||||
connect(preStep, &KBorderButton::clicked, this, [=](){
|
||||
this->setCurrentIndex(SELECT_PATH_PAGE);
|
||||
});
|
||||
hlayoutCenterLine3->addWidget(preStep);
|
||||
|
||||
// 下一步按钮
|
||||
MyPushButton *nextStep = new MyPushButton(forth);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(true);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
Q_UNUSED(checked)
|
||||
|
@ -1180,7 +1183,7 @@ void SystemBackup::initFifthWidget()
|
|||
// 取消按钮
|
||||
MyPushButton *cancel = new MyPushButton(fifth);
|
||||
cancel->setText(tr("Cancel"));
|
||||
cancel->setAutoRepeat(true);
|
||||
// cancel->setAutoRepeat(true);
|
||||
cancel->setProperty("isImportant", true);
|
||||
hlayoutCenterFont3->addStretch();
|
||||
hlayoutCenterFont3->addWidget(cancel);
|
||||
|
@ -1522,14 +1525,14 @@ void SystemBackup::initLastWidget()
|
|||
MyPushButton *homePage = new MyPushButton(centerFont);
|
||||
homePage->setText(tr("Home Page"));
|
||||
homePage->setEnabled(true);
|
||||
homePage->setAutoRepeat(true);
|
||||
// homePage->setAutoRepeat(true);
|
||||
homePage->setProperty("isImportant", true);
|
||||
hlayoutCenterFont5->addWidget(homePage);
|
||||
// 再试一次
|
||||
KBorderButton *retry = new KBorderButton(centerFont);
|
||||
retry->setText(tr("Retry"));
|
||||
retry->setEnabled(true);
|
||||
retry->setAutoRepeat(true);
|
||||
// retry->setAutoRepeat(true);
|
||||
hlayoutCenterFont5->addWidget(retry);
|
||||
hlayoutCenterFont5->addStretch();
|
||||
hlayoutCenterFont5->setAlignment(Qt::AlignCenter);
|
||||
|
|
|
@ -134,7 +134,7 @@ void SystemRestore::initFirstWidget()
|
|||
beginRestore->setGeometry(41, 372, 180, 52);
|
||||
beginRestore->setText(tr("Start Restore"));
|
||||
beginRestore->setEnabled(true);
|
||||
beginRestore->setAutoRepeat(true);
|
||||
// beginRestore->setAutoRepeat(true);
|
||||
beginRestore->setProperty("isImportant", true);
|
||||
font.setPixelSize(24);
|
||||
beginRestore->setFont(font);
|
||||
|
@ -366,7 +366,7 @@ void SystemRestore::initSecondWidget()
|
|||
KBorderButton *preStep = new KBorderButton(centerFont);
|
||||
preStep->setText(tr("Back"));
|
||||
preStep->setEnabled(true);
|
||||
preStep->setAutoRepeat(true);
|
||||
// preStep->setAutoRepeat(true);
|
||||
connect(preStep, &KBorderButton::clicked, preStep, &KBorderButton::clearFocus);
|
||||
connect(preStep, &KBorderButton::clicked, this, &SystemRestore::on_pre_clicked);
|
||||
hlayoutCenterFont5->addWidget(preStep);
|
||||
|
@ -374,7 +374,7 @@ void SystemRestore::initSecondWidget()
|
|||
MyPushButton *nextStep = new MyPushButton(centerFont);
|
||||
nextStep->setText(tr("Next"));
|
||||
nextStep->setEnabled(true);
|
||||
nextStep->setAutoRepeat(true);
|
||||
// nextStep->setAutoRepeat(true);
|
||||
nextStep->setProperty("isImportant", true);
|
||||
connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
this->on_next_clicked(checked);
|
||||
|
@ -385,7 +385,7 @@ void SystemRestore::initSecondWidget()
|
|||
MyPushButton *recheck = new MyPushButton(centerFont);
|
||||
recheck->setText(tr("Recheck"));
|
||||
recheck->setEnabled(true);
|
||||
recheck->setAutoRepeat(true);
|
||||
// recheck->setAutoRepeat(true);
|
||||
recheck->setProperty("isImportant", true);
|
||||
hlayoutCenterFont5->addWidget(recheck);
|
||||
hlayoutCenterFont5->addStretch();
|
||||
|
@ -962,14 +962,14 @@ void SystemRestore::initLastWidget()
|
|||
MyPushButton *homePage = new MyPushButton(centerFont);
|
||||
homePage->setText(tr("Home Page"));
|
||||
homePage->setEnabled(true);
|
||||
homePage->setAutoRepeat(true);
|
||||
// homePage->setAutoRepeat(true);
|
||||
homePage->setProperty("isImportant", true);
|
||||
hlayoutCenterFont5->addWidget(homePage);
|
||||
// 再试一次
|
||||
KBorderButton *retry = new KBorderButton(centerFont);
|
||||
retry->setText(tr("Retry"));
|
||||
retry->setEnabled(true);
|
||||
retry->setAutoRepeat(true);
|
||||
// retry->setAutoRepeat(true);
|
||||
hlayoutCenterFont5->addWidget(retry);
|
||||
hlayoutCenterFont5->addStretch();
|
||||
hlayoutCenterFont5->setAlignment(Qt::AlignCenter);
|
||||
|
|
Loading…
Reference in New Issue