This commit is contained in:
zhaominyong 2022-04-12 15:11:22 +08:00
parent 43d2122939
commit 1fbfaa81b8
3 changed files with 395 additions and 403 deletions

View File

@ -35,15 +35,6 @@ int main(int argc, char *argv[])
QtSingleApplication a ("kybackup", argc, argv);
initApp(a);
// 当前只支持管理员用户使用备份还原工具
GlobelBackupInfo::inst().setIsManager(isManager());
// if (!GlobelBackupInfo::inst().isManager() && GlobelBackupInfo::inst().hasArgRestore()) {
// MessageBoxUtils::QMESSAGE_BOX_WARNING(nullptr, QObject::tr("Information"),
// QObject::tr("This function can only be used by administrator."),
// QObject::tr("Ok"));
// return EXIT_FAILURE;
// }
if (a.isRunning()) {
QString strUid = QString::number(getuid());
QString ack = a.sendMessage(strUid, 3000);
@ -119,8 +110,9 @@ void initApp(QApplication& a)
QString qsAppPath = QCoreApplication::applicationDirPath();
Utils::initSysRootPath(qsAppPath);
Utils::initSystemInfo();
// 当前操作员是否管理员用户
GlobelBackupInfo::inst().setIsManager(isManager());
}
/**

File diff suppressed because it is too large Load Diff