diff --git a/backup-daemon/mybackupmanager.cpp b/backup-daemon/mybackupmanager.cpp index 9b956bb..a2d521c 100755 --- a/backup-daemon/mybackupmanager.cpp +++ b/backup-daemon/mybackupmanager.cpp @@ -199,13 +199,6 @@ int MyBackupManager::goRestore(const BackupWrapper& backupWrapper) connect(worker, &Worker::progress, this, [&](int rate) { emit this->progress(int(BackupState::WORKING), rate); }); - connect(worker, &Worker::otherSignal, this, [&](int type) { - // 结束ukui-session-tools的锁定,以便后面的用户登出操作 - if (Worker::OtherSignal::UKUI_SESSION_LOCK_END == type) { - this->uninhibit(); - emit this->sendRestoreResult(true); - } - }); connect(worker, &Worker::workResult, this, [&] (bool result) { emit this->sendRestoreResult(result); this->finished(); diff --git a/backup-daemon/systemrestoreproxy.cpp b/backup-daemon/systemrestoreproxy.cpp index 7df8df6..6f8ca32 100755 --- a/backup-daemon/systemrestoreproxy.cpp +++ b/backup-daemon/systemrestoreproxy.cpp @@ -372,23 +372,16 @@ void SystemRestoreProxy::restoreSystem() break; } if (FACTORY_BACKUP_UUID == m_curUuid && m_backupWrapper.m_type == BackupType::RESTORE_SYSTEM) { - emit this->otherSignal(UKUI_SESSION_LOCK_END); - Utils::wait(5); - // 出厂还原有的机器上删除/home/xxx有残留,故在此再强制删除一下,sudo rm -rf命令一遍还删除不了(报错:无法删除/home/xx/.config:目录非空,应该是删除后又自动生成了),多删除几次还不是非常干净,^_^ removeHome(QString(Utils::getSysRootPath() + "/home").replace("//", "/")); removeHome(QString(Utils::getSysRootPath() + "/data/home").replace("//", "/")); - - QProcess::execute("sync"); - Utils::wait(2); - emit this->workResult(result); - } else { - QProcess::execute("sync"); - Utils::wait(5); - emit this->workResult(result); - Utils::wait(3); } + QProcess::execute("sync"); + Utils::wait(5); + emit this->workResult(result); + Utils::wait(2); + reboot(RB_AUTOBOOT); } else { emit this->workResult(result); diff --git a/backup-daemon/workerfactory.h b/backup-daemon/workerfactory.h index f24bb53..b827721 100755 --- a/backup-daemon/workerfactory.h +++ b/backup-daemon/workerfactory.h @@ -11,10 +11,6 @@ class Worker : public QObject { Q_OBJECT -public: - enum OtherSignal{ - UKUI_SESSION_LOCK_END, - }; public: explicit Worker(); virtual ~Worker(); @@ -28,8 +24,6 @@ signals: void workResult(bool result); // 任务取消 void cancel(); - // 其它信号 - void otherSignal(int type); public slots: // 环境检测 diff --git a/kybackup/module/systemrestore.cpp b/kybackup/module/systemrestore.cpp index b4bd1e4..4c2dd84 100755 --- a/kybackup/module/systemrestore.cpp +++ b/kybackup/module/systemrestore.cpp @@ -963,9 +963,6 @@ void SystemRestore::initLastWidget() labelError2->setVisible(false); retry->setVisible(false); homePage->setVisible(false); - - Utils::wait(2); - QProcess::execute("ukui-session-tools --logout"); } else { resultLogo->setThemeIconSchema("dialog-error", ":/symbos/dialog-error"); resultLogo->setVisible(true);