sdk修改后的QFileDialog好多功能都不能用了,需要补漏
This commit is contained in:
parent
94fded1009
commit
58d6b646a8
|
@ -481,6 +481,25 @@ void DataBackup::initSecondWidget()
|
|||
QStringList selectFiles = fileDialog.selectedFiles();
|
||||
if (!selectFiles.isEmpty()) {
|
||||
QString fileName = selectFiles.at(0);
|
||||
|
||||
// sdk重新实现了QFileDialog后很多功能已经丢失,需要再次进行过滤,真难用
|
||||
if (fileName == BACKUP_PATH || fileName.contains(BACKUP_SNAPSHOTS_PATH)) {
|
||||
// 不能嵌套备份,请选择其它目录
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::inst().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Cannot nest backups, please select another directory."),
|
||||
QObject::tr("Ok"));
|
||||
return ;
|
||||
} else if (fileName.endsWith(BACKUP_PATH)) {
|
||||
QString subfile = fileName + "/snapshots";
|
||||
if (Utils::isDirExist(subfile + "/snapshots")) {
|
||||
// 不能嵌套备份,请选择其它目录
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::inst().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Cannot nest backups, please select another directory."),
|
||||
QObject::tr("Ok"));
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->m_udiskPaths.contains(fileName)) {
|
||||
comboSelect->setCurrentIndex(this->m_udiskPaths.indexOf(fileName));
|
||||
this->m_customizePath = "";
|
||||
|
|
|
@ -337,6 +337,25 @@ void SystemBackup::initSecondWidget()
|
|||
QStringList selectFiles = fileDialog.selectedFiles();
|
||||
if (!selectFiles.isEmpty()) {
|
||||
QString fileName = selectFiles.at(0);
|
||||
|
||||
// sdk重新实现了QFileDialog后很多功能已经丢失,需要再次进行过滤,真难用
|
||||
if (fileName == BACKUP_PATH || fileName.contains(BACKUP_SNAPSHOTS_PATH)) {
|
||||
// 不能嵌套备份,请选择其它目录
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::inst().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Cannot nest backups, please select another directory."),
|
||||
QObject::tr("Ok"));
|
||||
return ;
|
||||
} else if (fileName.endsWith(BACKUP_PATH)) {
|
||||
QString subfile = fileName + "/snapshots";
|
||||
if (Utils::isDirExist(subfile + "/snapshots")) {
|
||||
// 不能嵌套备份,请选择其它目录
|
||||
MessageBoxUtils::QMESSAGE_BOX_WARNING(GlobelBackupInfo::inst().getMainWidget(), QObject::tr("Information"),
|
||||
QObject::tr("Cannot nest backups, please select another directory."),
|
||||
QObject::tr("Ok"));
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->m_udiskPaths.contains(fileName)) {
|
||||
comboSelect->setCurrentIndex(this->m_udiskPaths.indexOf(fileName));
|
||||
this->m_customizePath = "";
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue