162643 【备份还原】所有提示框中右下角显示为Ok
This commit is contained in:
parent
781f0a9e5d
commit
093ff5d826
|
@ -319,7 +319,7 @@ bool BackupListWidget::checkPathLimit(const QString &path)
|
|||
// || path.contains(QRegularExpression(".*\\$\\(.*\\).*"))
|
||||
// || path.contains(QRegularExpression(".*\\$\\{.*\\}.*"))
|
||||
// || path.contains(QRegularExpression("[;&|]+"))) {
|
||||
// MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"), QObject::tr("Path can not include symbols that such as : ``,$(),${},;,&,|,etc."), QObject::tr("Ok"));
|
||||
// MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"), QObject::tr("Path can not include symbols that such as : ``,$(),${},;,&,|,etc."), QObject::tr("OK"));
|
||||
// return false;
|
||||
// }
|
||||
|
||||
|
@ -327,7 +327,7 @@ bool BackupListWidget::checkPathLimit(const QString &path)
|
|||
if (contains(path)) {
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"),
|
||||
QObject::tr("Path already exists : ") + path,
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -336,7 +336,7 @@ bool BackupListWidget::checkPathLimit(const QString &path)
|
|||
if (!fileInfo.exists()) {
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"),
|
||||
QObject::tr("The file or directory does not exist : ") + path,
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,7 @@ bool BackupListWidget::checkPathLimit(const QString &path)
|
|||
if (m_pathLimit.size() > 0 && !blimit) {
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"),
|
||||
QObject::tr("Only data that exists in the follow directorys can be selected: %1.\n Path:%2 is not in them.").arg(dirCanBeSelected).arg(path),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ DeleteBackupDialog::DeleteBackupDialog(ParseBackupList::BackupPoint backupPonit,
|
|||
|
||||
// 确定按钮
|
||||
m_buttonOk = new MyPushButton;
|
||||
m_buttonOk->setText(tr("Ok"));
|
||||
m_buttonOk->setText(tr("OK"));
|
||||
m_buttonOk->setProperty("isImportant", true);
|
||||
|
||||
QHBoxLayout *layoutBottom = new QHBoxLayout;
|
||||
|
|
|
@ -44,7 +44,7 @@ int main(int argc, char *argv[])
|
|||
if (strUid != ack) {
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(nullptr, QObject::tr("Information"),
|
||||
QObject::tr("Another user had opened kybackup, you can not start it again."),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
@ -377,7 +377,7 @@ void MainDialog::mountBackupPartition()
|
|||
// 挂载分区时出现异常
|
||||
MessageBoxUtils::QMESSAGE_BOX_CRITICAL(this, QObject::tr("Warning"),
|
||||
QObject::tr("An exception occurred when mounting backup partition."),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
|
||||
// 此时还未进入应用的事件循环中,故不能使用qApp->quit();
|
||||
exit(1);
|
||||
|
@ -385,7 +385,7 @@ void MainDialog::mountBackupPartition()
|
|||
// 没有找到备份分区不再报错,改为只能备份到移动设备中
|
||||
// MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Information"),
|
||||
// QObject::tr("Please check if the backup partition exists which can be created when you install the Operating System."),
|
||||
// QObject::tr("Ok"));
|
||||
// QObject::tr("OK"));
|
||||
// // 此时还未进入应用的事件循环中,故不能使用qApp->quit();
|
||||
// exit(1);
|
||||
GlobelBackupInfo::instance().setHasBackupPartition(false);
|
||||
|
@ -393,7 +393,7 @@ void MainDialog::mountBackupPartition()
|
|||
// 挂载备份分区失败
|
||||
MessageBoxUtils::QMESSAGE_BOX_CRITICAL(this, QObject::tr("Warning"),
|
||||
QObject::tr("Failed to mount backup partition."),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
|
||||
// 此时还未进入应用的事件循环中,故不能使用qApp->quit();
|
||||
exit(1);
|
||||
|
@ -413,7 +413,7 @@ void MainDialog::closeEvent(QCloseEvent *e)
|
|||
// 系统正忙,请稍等
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"),
|
||||
QObject::tr("It's busy, please wait"),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
|
||||
e->ignore();
|
||||
return;
|
||||
|
|
|
@ -504,7 +504,7 @@ void DataBackup::initSecondWidget()
|
|||
// 是否自定义路径?自定义路径备份文件不受保护,可能导致备份文件丢失或损坏
|
||||
if (!MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Are you sure to continue customizing the path?\nThe custom path backup file is not protected, which may cause the backup file to be lost or damaged"),
|
||||
QObject::tr("Ok"), QObject::tr("Cancel")))
|
||||
QObject::tr("OK"), QObject::tr("Cancel")))
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ void DataBackup::initSecondWidget()
|
|||
// 不能嵌套备份,请选择其它目录
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Cannot nest backups, please select another directory."),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return ;
|
||||
} else if (fileName.endsWith(BACKUP_PATH)) {
|
||||
QString subfile = fileName + "/snapshots";
|
||||
|
@ -528,7 +528,7 @@ void DataBackup::initSecondWidget()
|
|||
// 不能嵌套备份,请选择其它目录
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Cannot nest backups, please select another directory."),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return ;
|
||||
}
|
||||
} else if (Utils::isSubPath(this->m_udiskPaths, fileName)) {
|
||||
|
@ -536,7 +536,7 @@ void DataBackup::initSecondWidget()
|
|||
// 移动设备只能选择挂载目录本身
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Mobile devices can only select the mount directory itself."),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return ;
|
||||
}
|
||||
|
||||
|
@ -570,7 +570,7 @@ void DataBackup::initSecondWidget()
|
|||
} else if (this->m_customizePath.isEmpty()) {
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Warning"),
|
||||
QObject::tr("Please select backup position"),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return ;
|
||||
} else {
|
||||
// 自定义备份位置的场景
|
||||
|
@ -588,7 +588,7 @@ void DataBackup::initSecondWidget()
|
|||
if (editSelect->text().isEmpty())
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"),
|
||||
QObject::tr("Please select a backup file or directory"),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
else {
|
||||
if (listWidget->appendItem(editSelect->text())) {
|
||||
editSelect->setText("");
|
||||
|
@ -835,7 +835,7 @@ void DataBackup::initSecondWidget_inc()
|
|||
if (editSelect->text().isEmpty())
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"),
|
||||
QObject::tr("Please select a backup file or directory"),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
else {
|
||||
if (listWidget->appendItem(editSelect->text())) {
|
||||
editSelect->setText("");
|
||||
|
@ -1735,7 +1735,7 @@ void DataBackup::initFifthWidget()
|
|||
connect(cancel, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
Q_UNUSED(checked)
|
||||
// 确定取消当前操作?
|
||||
if (!MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"), QObject::tr("Are you sure to cancel the operation?"), QObject::tr("Ok"), QObject::tr("Cancel"))) {
|
||||
if (!MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"), QObject::tr("Are you sure to cancel the operation?"), QObject::tr("OK"), QObject::tr("Cancel"))) {
|
||||
return ;
|
||||
}
|
||||
cancel->setEnabled(false);
|
||||
|
|
|
@ -1089,7 +1089,7 @@ void DataRestore::reboot()
|
|||
// 系统正忙,请稍等
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"),
|
||||
QObject::tr("It's busy, please wait"),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
|
||||
GlobelBackupInfo::instance().setIsBusy(false);
|
||||
delete m_pInterface;
|
||||
|
|
|
@ -875,7 +875,7 @@ void GhostImage::initForthWidget()
|
|||
connect(cancel, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
Q_UNUSED(checked)
|
||||
// 确定取消当前操作?
|
||||
if (!MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(this, QObject::tr("Information"), QObject::tr("Are you sure to cancel the operation?"), QObject::tr("Ok"), QObject::tr("Cancel"))) {
|
||||
if (!MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(this, QObject::tr("Information"), QObject::tr("Are you sure to cancel the operation?"), QObject::tr("OK"), QObject::tr("Cancel"))) {
|
||||
return ;
|
||||
}
|
||||
cancel->setEnabled(false);
|
||||
|
|
|
@ -46,12 +46,12 @@ ManageBackupPointList::ManageBackupPointList(QWidget *parent, BackupPointType ba
|
|||
// 判断是否已经选中备份点
|
||||
QList<QTableWidgetItem *> selectList = this->m_tableWidget->selectedItems();
|
||||
if (selectList.isEmpty()) {
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"), QObject::tr("Please select one backup to continue."), QObject::tr("Ok"));
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"), QObject::tr("Please select one backup to continue."), QObject::tr("OK"));
|
||||
return;
|
||||
}
|
||||
|
||||
// 是否确认删除此备份
|
||||
if (MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(this, QObject::tr("Information"), QObject::tr("Are you sure to delete the backup ?"), QObject::tr("Ok"), QObject::tr("Cancel"))) {
|
||||
if (MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(this, QObject::tr("Information"), QObject::tr("Are you sure to delete the backup ?"), QObject::tr("OK"), QObject::tr("Cancel"))) {
|
||||
int curRow = this->m_tableWidget->currentRow();
|
||||
ParseBackupList::BackupPoint backupPoint;
|
||||
backupPoint.m_backupName = this->text(curRow, Column_Index::Backup_Name);
|
||||
|
|
|
@ -26,7 +26,7 @@ SelectRestorePoint::SelectRestorePoint(QWidget *parent, BackupPointType backupTy
|
|||
|
||||
// 确定按钮
|
||||
MyPushButton * buttonOk = new MyPushButton;
|
||||
buttonOk->setText(tr("Ok"));
|
||||
buttonOk->setText(tr("OK"));
|
||||
this->setResult(QDialog::Rejected);
|
||||
buttonOk->setProperty("isImportant", true);
|
||||
buttonOk->setEnabled(false);
|
||||
|
@ -46,7 +46,7 @@ SelectRestorePoint::SelectRestorePoint(QWidget *parent, BackupPointType backupTy
|
|||
// 判断是否已经选中备份点
|
||||
QList<QTableWidgetItem *> selectList = this->m_tableWidget->selectedItems();
|
||||
if (selectList.isEmpty()) {
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"), QObject::tr("Please select one backup to continue."), QObject::tr("Ok"));
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(this, QObject::tr("Warning"), QObject::tr("Please select one backup to continue."), QObject::tr("OK"));
|
||||
// this->reject();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@ void SystemBackup::initSecondWidget()
|
|||
// 是否自定义路径?自定义路径备份文件不受保护,可能导致备份文件丢失或损坏
|
||||
if (!MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Are you sure to continue customizing the path?\nThe custom path backup file is not protected, which may cause the backup file to be lost or damaged"),
|
||||
QObject::tr("Ok"), QObject::tr("Cancel")))
|
||||
QObject::tr("OK"), QObject::tr("Cancel")))
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ void SystemBackup::initSecondWidget()
|
|||
// 不能嵌套备份,请选择其它目录
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Cannot nest backups, please select another directory."),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return ;
|
||||
} else if (fileName.endsWith(BACKUP_PATH)) {
|
||||
QString subfile = fileName + "/snapshots";
|
||||
|
@ -367,7 +367,7 @@ void SystemBackup::initSecondWidget()
|
|||
// 不能嵌套备份,请选择其它目录
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Cannot nest backups, please select another directory."),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return ;
|
||||
}
|
||||
} else if (Utils::isSubPath(this->m_udiskPaths, fileName)) {
|
||||
|
@ -375,7 +375,7 @@ void SystemBackup::initSecondWidget()
|
|||
// 移动设备只能选择挂载目录本身
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Mobile devices can only select the mount directory itself."),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return ;
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ void SystemBackup::initSecondWidget()
|
|||
} else if (this->m_customizePath.isEmpty()) {
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Warning"),
|
||||
QObject::tr("Please select backup position"),
|
||||
QObject::tr("Ok"));
|
||||
QObject::tr("OK"));
|
||||
return ;
|
||||
} else {
|
||||
// 自定义备份位置的场景
|
||||
|
@ -1235,7 +1235,7 @@ void SystemBackup::initFifthWidget()
|
|||
connect(cancel, &MyPushButton::clicked, this, [=](bool checked) {
|
||||
Q_UNUSED(checked)
|
||||
// 确定取消当前操作?
|
||||
if (!MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"), QObject::tr("Are you sure to cancel the operation?"), QObject::tr("Ok"), QObject::tr("Cancel"))) {
|
||||
if (!MessageBoxUtils::QMESSAGE_BOX_WARNING_CANCEL(GlobelBackupInfo::instance().getMainWidget(), QObject::tr("Information"), QObject::tr("Are you sure to cancel the operation?"), QObject::tr("OK"), QObject::tr("Cancel"))) {
|
||||
return ;
|
||||
}
|
||||
cancel->setEnabled(false);
|
||||
|
|
|
@ -699,7 +699,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="deletebackupdialog.cpp" line="84"/>
|
||||
<source>Ok</source>
|
||||
<source>OK</source>
|
||||
<translation>འགྲིགས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
@ -1305,7 +1305,7 @@
|
|||
<location filename="module/systembackup.cpp" line="375"/>
|
||||
<location filename="module/systembackup.cpp" line="408"/>
|
||||
<location filename="module/systembackup.cpp" line="1235"/>
|
||||
<source>Ok</source>
|
||||
<source>OK</source>
|
||||
<translation>འགྲིགས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
@ -1500,7 +1500,7 @@ The custom path backup file is not protected, which may cause the backup file to
|
|||
</message>
|
||||
<message>
|
||||
<location filename="module/selectrestorepoint.cpp" line="29"/>
|
||||
<source>Ok</source>
|
||||
<source>OK</source>
|
||||
<translation>འགྲིགས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
@ -699,7 +699,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="deletebackupdialog.cpp" line="84"/>
|
||||
<source>Ok</source>
|
||||
<source>OK</source>
|
||||
<translation>确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
@ -1296,7 +1296,7 @@
|
|||
<location filename="module/systembackup.cpp" line="375"/>
|
||||
<location filename="module/systembackup.cpp" line="408"/>
|
||||
<location filename="module/systembackup.cpp" line="1235"/>
|
||||
<source>Ok</source>
|
||||
<source>OK</source>
|
||||
<translation>确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
@ -1496,7 +1496,7 @@ The custom path backup file is not protected, which may cause the backup file to
|
|||
</message>
|
||||
<message>
|
||||
<location filename="module/selectrestorepoint.cpp" line="29"/>
|
||||
<source>Ok</source>
|
||||
<source>OK</source>
|
||||
<translation>确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
Loading…
Reference in New Issue