summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp20
-rw-r--r--src/organizercore.cpp16
-rw-r--r--src/organizercore.h2
-rw-r--r--src/organizerproxy.cpp4
-rw-r--r--src/organizerproxy.h2
5 files changed, 22 insertions, 22 deletions
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<void(QString const&, co
return m_PluginSettingChanged.connect(func).connected();
}
-void OrganizerCore::refreshModList(bool saveChanges)
+void OrganizerCore::refresh(bool saveChanges)
{
// don't lose changes!
if (saveChanges) {
@@ -1168,6 +1168,8 @@ void OrganizerCore::refreshModList(bool saveChanges)
void OrganizerCore::refreshESPList(bool force)
{
+ TimeThis tt("OrganizerCore::refreshESPList()");
+
if (m_DirectoryUpdate) {
// don't mess up the esp list if we're currently updating the directory
// structure
@@ -1526,7 +1528,7 @@ void OrganizerCore::directory_refreshed()
void OrganizerCore::profileRefresh()
{
- refreshModList();
+ refresh();
}
void OrganizerCore::modStatusChanged(unsigned int index)
diff --git a/src/organizercore.h b/src/organizercore.h
index 25e68786..226c5c0a 100644
--- a/src/organizercore.h
+++ b/src/organizercore.h
@@ -317,7 +317,7 @@ public:
DownloadManager *downloadManager();
PluginList *pluginList();
ModList *modList();
- void refreshModList(bool saveChanges = true);
+ void refresh(bool saveChanges = true);
QStringList modsSortedByProfilePriority() const;
bool onAboutToRun(const std::function<bool(const QString&)>& 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<bool(const QString&)> &func);
virtual bool onFinishedRun(const std::function<void (const QString&, unsigned int)> &func);