优化备份位置选择的逻辑
This commit is contained in:
parent
58d6b646a8
commit
1003397079
|
@ -500,7 +500,10 @@ void DataBackup::initSecondWidget()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_udiskPaths.contains(fileName)) {
|
if (GlobelBackupInfo::inst().hasBackupPartition() && fileName == Utils::getSysRootPath()) {
|
||||||
|
comboSelect->setCurrentIndex(0);
|
||||||
|
this->m_customizePath = "";
|
||||||
|
} else if (this->m_udiskPaths.contains(fileName)) {
|
||||||
comboSelect->setCurrentIndex(this->m_udiskPaths.indexOf(fileName));
|
comboSelect->setCurrentIndex(this->m_udiskPaths.indexOf(fileName));
|
||||||
this->m_customizePath = "";
|
this->m_customizePath = "";
|
||||||
} else {
|
} else {
|
||||||
|
@ -509,7 +512,7 @@ void DataBackup::initSecondWidget()
|
||||||
|
|
||||||
QLineEdit * edit = new QLineEdit;
|
QLineEdit * edit = new QLineEdit;
|
||||||
comboSelect->setLineEdit(edit);
|
comboSelect->setLineEdit(edit);
|
||||||
edit->setText(tr("customize path : ") + fileName + BACKUP_SNAPSHOTS_PATH);
|
edit->setText(tr("customize path : ") + QString(fileName + BACKUP_SNAPSHOTS_PATH).replace("//", "/"));
|
||||||
edit->setReadOnly(true);
|
edit->setReadOnly(true);
|
||||||
if (listWidget->getBackupPaths().size() > 0)
|
if (listWidget->getBackupPaths().size() > 0)
|
||||||
nextStep->setEnabled(true);
|
nextStep->setEnabled(true);
|
||||||
|
|
|
@ -356,7 +356,10 @@ void SystemBackup::initSecondWidget()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_udiskPaths.contains(fileName)) {
|
if (GlobelBackupInfo::inst().hasBackupPartition() && fileName == Utils::getSysRootPath()) {
|
||||||
|
comboSelect->setCurrentIndex(0);
|
||||||
|
this->m_customizePath = "";
|
||||||
|
} else if (this->m_udiskPaths.contains(fileName)) {
|
||||||
comboSelect->setCurrentIndex(this->m_udiskPaths.indexOf(fileName));
|
comboSelect->setCurrentIndex(this->m_udiskPaths.indexOf(fileName));
|
||||||
this->m_customizePath = "";
|
this->m_customizePath = "";
|
||||||
} else {
|
} else {
|
||||||
|
@ -365,7 +368,7 @@ void SystemBackup::initSecondWidget()
|
||||||
|
|
||||||
QLineEdit * edit = new QLineEdit;
|
QLineEdit * edit = new QLineEdit;
|
||||||
comboSelect->setLineEdit(edit);
|
comboSelect->setLineEdit(edit);
|
||||||
edit->setText(tr("customize path : ") + fileName + BACKUP_SNAPSHOTS_PATH);
|
edit->setText(tr("customize path : ") + QString(fileName + BACKUP_SNAPSHOTS_PATH).replace("//", "/"));
|
||||||
edit->setReadOnly(true);
|
edit->setReadOnly(true);
|
||||||
nextStep->setEnabled(true);
|
nextStep->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue