MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / saveArchiveList

Method saveArchiveList

src/mainwindow.cpp:2548–2565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2546}
2547
2548void MainWindow::saveArchiveList()
2549{
2550 if (m_OrganizerCore.isArchivesInit()) {
2551 SafeWriteFile archiveFile(m_OrganizerCore.currentProfile()->getArchivesFileName());
2552 for (int i = 0; i < ui->bsaList->topLevelItemCount(); ++i) {
2553 QTreeWidgetItem* tlItem = ui->bsaList->topLevelItem(i);
2554 for (int j = 0; j < tlItem->childCount(); ++j) {
2555 QTreeWidgetItem* item = tlItem->child(j);
2556 if (item->checkState(0) == Qt::Checked) {
2557 archiveFile->write(item->text(0).toUtf8().append("\r\n"));
2558 }
2559 }
2560 }
2561 archiveFile.commitIfDifferent(m_ArchiveListHash);
2562 } else {
2563 log::debug("archive list not initialised");
2564 }
2565}
2566
2567void MainWindow::openInstanceFolder()
2568{

Callers

nothing calls this directly

Calls 3

isArchivesInitMethod · 0.80
getArchivesFileNameMethod · 0.80
currentProfileMethod · 0.80

Tested by

no test coverage detected