MCPcopy Create free account
hub / github.com/BambooTracker/BambooTracker / backupModule

Method backupModule

BambooTracker/gui/mainwindow.cpp:2609–2621  ·  view source on GitHub ↗

Backup **********/

Source from the content-addressed store, hash-verified

2607
2608/********** Backup **********/
2609bool MainWindow::backupModule(QString srcFile)
2610{
2611 if (!isSavedModBefore_ && config_.lock()->getBackupModules()) {
2612 bool err = false;
2613 QString backup = srcFile + ".bak";
2614 if (QFile::exists(backup)) err = !QFile::remove(backup);
2615 if (err || !QFile::copy(srcFile, backup)) {
2616 QMessageBox::critical(this, tr("Error"), tr("Failed to backup module."));
2617 return false;
2618 }
2619 }
2620 return true;
2621}
2622
2623/******************************/
2624void MainWindow::setWindowTitle()

Callers

nothing calls this directly

Calls 1

getBackupModulesMethod · 0.80

Tested by

no test coverage detected