-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix layout save and restore feature (#1515) #1538
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not yet convinced of using class names for the object names. I would rather add a static method to DisassemblyWidget, GraphWidget and HexdumpWidget that looks something like this:
static QString getWidgetTypeId() { return "Disassembly"; }
Then you can use DisassemblyWidget::getWidgetTypeId()
in all the places where the class name is used currently. This way we can also keep the previous states and no migration should be necessary.
Briefly. Qt uses object names to save state of mainwindow. Now we use names like "Disassembly", "Graph" etc. If there are few objects with such names, Qt can not distinguish ones. So some sort of ID is obviously needed. I chose to use "ClassName ID" pattern because of more convenient restoring (simply use first word from obj name to find constructor). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from these little things, lgtm! I did some tests with old configs, clean config, etc. and everything worked fine.
Very nice, now it really enhances the whole architecture. Great job and thanks for keeping at it for so long! |
Detailed description
Test plan (required)
Closing issues