Repository navigation
Mod list - Fix duplicate scan of unregistered mods on startup - #129
Merged
Merged
Conversation
InstallPathWidget::setInstallPath() fired validPathSelected() twice per call: once via setText()'s textChanged signal cascading into onPathEdited() -> validatePath(), and again via the explicit validatePath() call right after. Fixed with a QSignalBlocker. MainWindow::loadSettings() also had its own redundant direct call to detectUnregisteredMods() that duplicated exactly what onInstallPathChanged() already triggers off validPathSelected(). Removed it. Together these caused three redundant background scans of the mod list on every startup instead of one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
InstallPathWidget::setInstallPath()firedvalidPathSelected()twice per call — once viasetText()'stextChangedcascading intoonPathEdited()->validatePath(), and again via the explicitvalidatePath()call right after. Fixed with aQSignalBlocker.MainWindow::loadSettings()also had its own redundant direct call todetectUnregisteredMods()that duplicated exactly whatonInstallPathChanged()already triggers offvalidPathSelected(). Removed it.This was found while investigating a reported startup UI hang. These two fixes are real, confirmed bugs (verified via logging that the triple-scan is gone), but a separate ~600-700ms stall remains that I could not trace back to any TrenchKit code despite extensive isolated testing — see the "Known unsolved issue" note added to local dev notes for anyone picking this up later.
Test plan
ctest --test-dir build/webengine-rel— all 4 suites passdetectUnregisteredMods()now runs once per startup instead of three times