fix: Set objectName on Diagnostics QDockWidget#1261
Open
chrisc-lee wants to merge 1 commit into
Open
Conversation
QMainWindow::saveState() requires all dock widgets to have an objectName set in order to save and restore their state. The Diagnostics dock was created without one, causing a runtime warning on every call to saveState(). Signed-off-by: Chris <34953610+chrisc-lee@users.noreply.github.com>
bernie-laberge
approved these changes
May 11, 2026
Contributor
bernie-laberge
left a comment
There was a problem hiding this comment.
Looks good to me and I validated the fix.
Thank you @chrisc-lee !
cedrik-fuoco-adsk
approved these changes
May 11, 2026
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.
Linked issues
No linked issue, just a trivial one line fix.
Summarize your change.
Added setting the object name for the Diagnostics dock widget immediately after the dock widget is constructed to avoid a runtime warning.
Describe the reason for the change.
QMainWindow::saveState()requires all dock widgets to have anobjectNameset in order to correctly save and restore their layout. The Diagnostics dock was created without one, which produces this runtime warning on every call tosaveState():WARNING: QMainWindow::saveState(): 'objectName' not set for QDockWidget 0x... 'Diagnostics'Other dock widgets and menus in
RvDocument.cppalready follow this pattern (e.g.UIBlockingOverlay,Main Popup,User Popup). This brings the Diagnostics dock in line with them.Describe what you have tested and on which operating system.
Verified the warning is no longer emitted on Linux (EL9) after applying the change.
Add a list of changes, and note any that might need special attention during the review.
src/lib/app/RvCommon/RvDocument.cpp, just one line added, no logic change.