mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 18:25:42 +08:00
refs #906, delete .rev file (if applicable) when files are copied
This commit is contained in:
committed by
Mathew Sutcliffe
parent
ecb7877908
commit
b3df6bbc7b
@@ -82,6 +82,11 @@ namespace BlackGui
|
|||||||
const bool s = QFile::copy(file, target);
|
const bool s = QFile::copy(file, target);
|
||||||
if (s) { c++; }
|
if (s) { c++; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete revision file in target if required
|
||||||
|
this->deleteRevisionFile();
|
||||||
|
|
||||||
|
// bye
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,6 +236,14 @@ namespace BlackGui
|
|||||||
return files;
|
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()
|
void CCopyConfigurationWizardPage::initializePage()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(m_config, Q_FUNC_INFO, "Missing config");
|
Q_ASSERT_X(m_config, Q_FUNC_INFO, "Missing config");
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ namespace BlackGui
|
|||||||
//! Get the selected files
|
//! Get the selected files
|
||||||
QStringList getSelectedFiles() const;
|
QStringList getSelectedFiles() const;
|
||||||
|
|
||||||
|
//! Delete the .rev file (caches)
|
||||||
|
void deleteRevisionFile() const;
|
||||||
|
|
||||||
QStringList m_otherVersionDirs;
|
QStringList m_otherVersionDirs;
|
||||||
QScopedPointer<Ui::CCopyConfigurationComponent> ui;
|
QScopedPointer<Ui::CCopyConfigurationComponent> ui;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user