From cca709baaeb415d4cc600d3274169c2db7c90bd9 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sun, 25 Oct 2020 16:18:19 +0100 Subject: Rename IOrganizer::refreshModList -> refresh. --- src/mainwindow.cpp | 20 +++++++++----------- src/organizercore.cpp | 16 +++++++++------- src/organizercore.h | 2 +- src/organizerproxy.cpp | 4 ++-- src/organizerproxy.h | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3428d72a..851900a0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1730,7 +1730,7 @@ void MainWindow::activateSelectedProfile() m_ModListSortProxy->setProfile(m_OrganizerCore.currentProfile()); refreshSaveList(); - m_OrganizerCore.refreshModList(); + m_OrganizerCore.refresh(); updateModCount(); updatePluginCount(); ui->statusBar->updateNormalMessage(m_OrganizerCore); @@ -2683,7 +2683,7 @@ void MainWindow::restoreBackup_clicked() if (!modDir.rename(modInfo->absolutePath(), destinationPath)) { reportError(tr("failed to rename \"%1\" to \"%2\"").arg(modInfo->absolutePath()).arg(destinationPath)); } - m_OrganizerCore.refreshModList(); + m_OrganizerCore.refresh(); } } } @@ -2833,7 +2833,7 @@ void MainWindow::backupMod_clicked() QMessageBox::information(this, tr("Failed"), tr("Failed to create backup.")); } - m_OrganizerCore.refreshModList(); + m_OrganizerCore.refresh(); } void MainWindow::resumeDownload(int downloadIndex) @@ -3618,7 +3618,7 @@ void MainWindow::createEmptyMod_clicked() return; } - m_OrganizerCore.refreshModList(); + m_OrganizerCore.refresh(); if (newPriority >= 0) { m_OrganizerCore.modList()->changeModPriority(ModInfo::getIndex(name), newPriority); @@ -3656,7 +3656,7 @@ void MainWindow::createSeparator_clicked() } if (m_OrganizerCore.createMod(name) == nullptr) { return; } - m_OrganizerCore.refreshModList(); + m_OrganizerCore.refresh(); if (newPriority >= 0) { @@ -3811,7 +3811,7 @@ void MainWindow::doMoveOverwriteContentToMod(const QString &modAbsolutePath) log::error("Move operation failed: {}", formatSystemMessage(e)); } - m_OrganizerCore.refreshModList(); + m_OrganizerCore.refresh(); } void MainWindow::clearOverwrite() @@ -3835,7 +3835,7 @@ void MainWindow::clearOverwrite() delList.push_back(overwriteDir.absoluteFilePath(f)); if (shellDelete(delList, true)) { scheduleCheckForProblems(); - m_OrganizerCore.refreshModList(); + m_OrganizerCore.refresh(); } else { const auto e = GetLastError(); log::error("Delete operation failed: {}", formatSystemMessage(e)); @@ -5133,9 +5133,7 @@ void MainWindow::on_actionSettings_triggered() ui->dataTabShowFromArchives->setCheckState(Qt::Checked); ui->dataTabShowFromArchives->setEnabled(true); } - m_OrganizerCore.refreshModList(); - m_OrganizerCore.refreshDirectoryStructure(); - m_OrganizerCore.refreshLists(); + m_OrganizerCore.refresh(); } if (settings.paths().cache() != oldCacheDirectory) { @@ -6358,7 +6356,7 @@ void MainWindow::on_restoreModsButton_clicked() tr("Failed to restore the backup. Errorcode: %1") .arg(formatSystemMessage(e))); } - m_OrganizerCore.refreshModList(false); + m_OrganizerCore.refresh(false); } } diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 989fdcc2..ac485c91 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -678,7 +678,7 @@ bool OrganizerCore::removeMod(MOBase::IModInterface *mod) void OrganizerCore::modDataChanged(MOBase::IModInterface *) { - refreshModList(false); + refresh(false); } QVariant OrganizerCore::pluginSetting(const QString &pluginName, @@ -740,7 +740,7 @@ MOBase::IModInterface *OrganizerCore::installMod(const QString &fileName, if (result == IPluginInstaller::RESULT_SUCCESS) { MessageDialog::showMessage(tr("Installation successful"), qApp->activeWindow()); - refreshModList(); + refresh(); int modIndex = ModInfo::getIndex(modName); if (modIndex != UINT_MAX) { @@ -776,7 +776,7 @@ MOBase::IModInterface *OrganizerCore::installMod(const QString &fileName, "If this was prior to a FOMOD setup, this warning may be ignored. " "However, if this was during installation, the mod will likely be missing files."), QMessageBox::Ok); - refreshModList(); + refresh(); } } return nullptr; @@ -822,7 +822,7 @@ void OrganizerCore::installDownload(int index) if (result == IPluginInstaller::RESULT_SUCCESS) { MessageDialog::showMessage(tr("Installation successful"), qApp->activeWindow()); - refreshModList(); + refresh(); int modIndex = ModInfo::getIndex(modName); if (modIndex != UINT_MAX) { @@ -855,7 +855,7 @@ void OrganizerCore::installDownload(int index) "If this was prior to a FOMOD setup, this warning may be ignored. " "However, if this was during installation, the mod will likely be missing files."), QMessageBox::Ok); - refreshModList(); + refresh(); } } } catch (const std::exception &e) { @@ -1147,7 +1147,7 @@ bool OrganizerCore::onPluginSettingChanged(std::function& func); diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index 6f4b0cc9..5e720ea8 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -178,9 +178,9 @@ bool OrganizerProxy::waitForApplication(HANDLE handle, LPDWORD exitCode) const } } -void OrganizerProxy::refreshModList(bool saveChanges) +void OrganizerProxy::refresh(bool saveChanges) { - m_Proxied->refreshModList(saveChanges); + m_Proxied->refresh(saveChanges); } IModInterface *OrganizerProxy::installMod(const QString &fileName, const QString &nameSuggestion) diff --git a/src/organizerproxy.h b/src/organizerproxy.h index 907375fe..29210ff2 100644 --- a/src/organizerproxy.h +++ b/src/organizerproxy.h @@ -57,7 +57,7 @@ public: virtual HANDLE startApplication(const QString &executable, const QStringList &args = QStringList(), const QString &cwd = "", const QString &profile = "", const QString &forcedCustomOverwrite = "", bool ignoreCustomOverwrite = false); virtual bool waitForApplication(HANDLE handle, LPDWORD exitCode = nullptr) const; - virtual void refreshModList(bool saveChanges); + virtual void refresh(bool saveChanges); virtual bool onAboutToRun(const std::function &func); virtual bool onFinishedRun(const std::function &func); -- cgit v1.3.1