From eddc30a47f3daefbe4ef29b5de261a1e18949dd3 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Thu, 22 May 2025 03:38:39 -0500 Subject: Dependency Updates Meta PR (#2242) * Update dll manifests * Fixes for emit / model refresh issues --- src/dlls.manifest.debug.qt6 | 19 ++++--------------- src/dlls.manifest.qt6 | 19 ++++--------------- src/downloadmanager.cpp | 3 +++ src/modinfodialogesps.cpp | 3 +++ src/modinfodialogtextfiles.cpp | 3 +++ src/modlistview.cpp | 6 ++++-- 6 files changed, 21 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/dlls.manifest.debug.qt6 b/src/dlls.manifest.debug.qt6 index 18845fba..285095cd 100644 --- a/src/dlls.manifest.debug.qt6 +++ b/src/dlls.manifest.debug.qt6 @@ -4,16 +4,15 @@ + + - - - @@ -21,22 +20,12 @@ - + - - - - - - - - - - - + diff --git a/src/dlls.manifest.qt6 b/src/dlls.manifest.qt6 index f5d1d9fd..3bb7b655 100644 --- a/src/dlls.manifest.qt6 +++ b/src/dlls.manifest.qt6 @@ -4,16 +4,15 @@ + + - - - @@ -21,22 +20,12 @@ - + - - - - - - - - - - - + diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 5156c357..7c02b17b 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -332,6 +332,7 @@ void DownloadManager::refreshList() TimeThis tt("DownloadManager::refreshList()"); try { + emit aboutToUpdate(); // avoid triggering other refreshes ScopedDisableDirWatcher scopedDirWatcher(this); @@ -2225,10 +2226,12 @@ void DownloadManager::downloadFinished(int index) "There may be an issue with the Nexus servers.")); emit update(-1); } else if (info->isPausedState() || info->m_State == STATE_PAUSING) { + emit aboutToUpdate(); info->m_Output.close(); createMetaFile(info); emit update(index); } else { + emit aboutToUpdate(); QString url = info->m_Urls[info->m_CurrentUrl]; if (info->m_FileInfo->userData.contains("downloadMap")) { foreach (const QVariant& server, diff --git a/src/modinfodialogesps.cpp b/src/modinfodialogesps.cpp index f9a3ba8c..4de93aab 100644 --- a/src/modinfodialogesps.cpp +++ b/src/modinfodialogesps.cpp @@ -99,6 +99,7 @@ class ESPListModel : public QAbstractItemModel public: void clear() { + beginResetModel(); m_esps.clear(); endResetModel(); } @@ -161,6 +162,8 @@ public: void finished() { + beginResetModel(); + std::sort(m_esps.begin(), m_esps.end(), [](const auto& a, const auto& b) { return (naturalCompare(a.filename(), b.filename()) < 0); }); diff --git a/src/modinfodialogtextfiles.cpp b/src/modinfodialogtextfiles.cpp index cc13e2d2..1f22d370 100644 --- a/src/modinfodialogtextfiles.cpp +++ b/src/modinfodialogtextfiles.cpp @@ -9,6 +9,7 @@ class FileListModel : public QAbstractItemModel public: void clear() { + beginResetModel(); m_files.clear(); endResetModel(); } @@ -58,6 +59,8 @@ public: void finished() { + beginResetModel(); + std::sort(m_files.begin(), m_files.end(), [](const auto& a, const auto& b) { return (naturalCompare(a.text, b.text) < 0); }); diff --git a/src/modlistview.cpp b/src/modlistview.cpp index 8cfd8b42..7b3669fd 100644 --- a/src/modlistview.cpp +++ b/src/modlistview.cpp @@ -1078,7 +1078,8 @@ void ModListView::setOverwriteMarkers(const QModelIndexList& indexes) } } dataChanged(model()->index(0, 0), - model()->index(model()->rowCount(), model()->columnCount())); + model()->index(model()->rowCount() ? model()->rowCount() - 1 : 0, + model()->columnCount() ? model()->columnCount() - 1 : 0)); verticalScrollBar()->repaint(); } @@ -1117,7 +1118,8 @@ void ModListView::setHighlightedMods(const std::set& modNames) } } dataChanged(model()->index(0, 0), - model()->index(model()->rowCount(), model()->columnCount())); + model()->index(model()->rowCount() ? model()->rowCount() - 1 : 0, + model()->columnCount() ? model()->columnCount() - 1 : 0)); verticalScrollBar()->repaint(); } -- cgit v1.3.1