refs #906, delete .rev file (if applicable) when files are copied

This commit is contained in:
Klaus Basan
2017-03-15 18:07:02 +01:00
committed by Mathew Sutcliffe
parent ecb7877908
commit b3df6bbc7b
2 changed files with 16 additions and 0 deletions

View File

@@ -82,6 +82,11 @@ namespace BlackGui
const bool s = QFile::copy(file, target);
if (s) { c++; }
}
// delete revision file in target if required
this->deleteRevisionFile();
// bye
return c;
}
@@ -231,6 +236,14 @@ namespace BlackGui
return files;
}
void CCopyConfigurationComponent::deleteRevisionFile() const
{
if (!ui->rb_Cache->isChecked()) { return; } // only for cache, no .rev file for settigs
QFile rev(CDataCache::revisionFileName());
if (!rev.exists()) { return; }
rev.remove();
}
void CCopyConfigurationWizardPage::initializePage()
{
Q_ASSERT_X(m_config, Q_FUNC_INFO, "Missing config");