diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-18 18:13:23 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-18 18:13:23 -0500 |
| commit | f9ad6d97098093b5d03e7792798583ea73a1ea65 (patch) | |
| tree | bc84402369d6a1920a7d21349de7233fe21b8531 | |
| parent | 75cd8b3bab3e4d094565748215013ee78c9962d9 (diff) | |
timing for refreshBSAList and updateProblemsButton
| -rw-r--r-- | src/directoryrefresher.cpp | 4 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 10 | ||||
| -rw-r--r-- | src/modinfo.cpp | 2 | ||||
| -rw-r--r-- | src/organizercore.cpp | 4 |
4 files changed, 12 insertions, 8 deletions
diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp index 5a3cca5c..57948236 100644 --- a/src/directoryrefresher.cpp +++ b/src/directoryrefresher.cpp @@ -286,7 +286,7 @@ void DirectoryRefresher::addModFilesToStructure( DirectoryEntry *directoryStructure, const QString &modName,
int priority, const QString &directory, const QStringList &stealFiles)
{
- TimeThis tt("addModFilesToStructure()");
+ TimeThis tt("DirectoryRefresher::addModFilesToStructure()");
std::wstring directoryW = ToWString(QDir::toNativeSeparators(directory));
DirectoryStats dummy;
@@ -307,7 +307,7 @@ void DirectoryRefresher::addModToStructure(DirectoryEntry *directoryStructure , const QStringList &stealFiles
, const QStringList &archives)
{
- TimeThis tt("addModToStructure()");
+ TimeThis tt("DirectoryRefresher::addModToStructure()");
DirectoryStats dummy;
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 21a6fa41..325a7e93 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -962,6 +962,8 @@ void MainWindow::scheduleUpdateButton() void MainWindow::updateProblemsButton() { + TimeThis tt("MainWindow::updateProblemsButton()"); + // if the current stylesheet doesn't provide an icon, this is used instead const char* DefaultIconName = ":/MO/gui/warning"; @@ -1667,9 +1669,9 @@ void MainWindow::on_profileBox_currentIndexChanged(int index) // Avoid doing any refresh if currentProfile is already set but previous index was -1 // as it means that this is happening during initialization so everything has already been set. - if (previousIndex == -1 - && m_OrganizerCore.currentProfile() != nullptr - && m_OrganizerCore.currentProfile()->exists() + if (previousIndex == -1 + && m_OrganizerCore.currentProfile() != nullptr + && m_OrganizerCore.currentProfile()->exists() && ui->profileBox->currentText() == m_OrganizerCore.currentProfile()->name()){ return; } @@ -5517,7 +5519,7 @@ void MainWindow::nxmUpdatesAvailable(QString gameName, int modID, QVariant userD bool foundUpdate = false; bool oldFile = false; QString installedFile = mod->getInstallationFile(); - if (!installedFile.isEmpty()) { + if (!installedFile.isEmpty()) { QVariantMap foundFile; for (auto file : files) { QVariantMap fileData = file.toMap(); diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 5c381830..71a4a386 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -251,7 +251,7 @@ void ModInfo::updateFromDisc(const QString &modDirectory, bool displayForeign, MOBase::IPluginGame const *game) { - TimeThis tt("updateFromDisc()"); + TimeThis tt("ModInfo::updateFromDisc()"); QMutexLocker lock(&s_Mutex); s_Collection.clear(); diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 3c499b36..0b3a4bfe 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1127,6 +1127,8 @@ void OrganizerCore::refreshESPList(bool force) void OrganizerCore::refreshBSAList() { + TimeThis tt("OrganizerCore::refreshBSAList()"); + DataArchives *archives = m_GamePlugin->feature<DataArchives>(); if (archives != nullptr) { @@ -1409,7 +1411,7 @@ void OrganizerCore::refreshDirectoryStructure() void OrganizerCore::directory_refreshed() { log::debug("directory refreshed, finishing up"); - TimeThis tt("directory_refreshed()"); + TimeThis tt("OrganizerCore::directory_refreshed()"); DirectoryEntry *newStructure = m_DirectoryRefresher->stealDirectoryStructure(); Q_ASSERT(newStructure != m_DirectoryStructure); |
