-
Notifications
You must be signed in to change notification settings - Fork 38
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
Structs (Rebased) #203
Closed
Closed
Structs (Rebased) #203
Conversation
This file contains 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
…ncy with upcoming struct definitions. MemoryCommon: Added struct type GUICommon: Added type strings for new struct type Structs: Initial commit for struct container and sub containers. MemWatchTreeNode: fixed formatting Added StructTreeNode.h and .cpp to allow for a tree representation to organize created structs. StructDefMap holds the root node and is used to access the tree StructDefMap: Made explicit public and private sections StructDefMap: made m_structs a private member MemWatchEntry: Can't write to a const, so the QJsonObject is no longer const. The function doesn't change any member variables though so it is now const. No longer using a struct tree map. structs will now use namespaces defined by their groups which allows checking of unique names only within the group StructTreeNode: changed constructor StructTreeNode: Joined groupName and structName into nodeName. There is now only one setter and one getter for it. When a structDef is present, the getter defaults to the structDef label for the nodeName. Also added a function to check if a name is inuse. StructTreeNode: Finished implementing read from Json and write to Json Added struct editor widget and models to organize and edit struct definitions Added ability to save and load struct definitions from the settings file. MainWindow.h: Added lines to load struct editor widget. MainWindow: added getting and setting struct definitions. The struct editor window is in charge of reading and writing the json for this. GUICommon: added a check for if a type is a container type. This can be used to determine if a MemWatchEntry is autogenerated through a struct to prevent address or type editing of struct-defined entries. MemWatchWidget: Added a pointer to the struct definitions. Added references to struct definitions to memviewer. had to pass it through the widget because the actual viewer is the one that needs to use it for an entry creation dialog. DlgAddWatchEntry: added combobox to select a struct name when creating a struct type. combobox is shown only when current type is struct. MemWatchEntry: Added a struct name member QString. This should contain the full name and namespace to refer back to a struct definition. also added a setter and getter for m_structName. Structs: Made changes to StructTreeNode, StructDef, and FieldDef to work with the StructEditWidget. Added Struct and StructEditor files to CMakeLists MemWatchModel: For now, if an entry is a container type, it will not get a value. MemWatchDelegate: For now, if an entry is a container type there will be no way to lock it. Allowing this will require some way to propagate the lock to all child entries DlgAddWatchEntry: Changed storage of m_structNames to always have an empty string as the first element. DlgAddWatchEntry: the struct name is now set if the entry is of type struct, else it is left blank DlgAddWatchEntry: Added methods for updating struct names if they are changed before the dialog is accepted. DlgChangeType: Added struct selection and retrieval DlgAddWatchEntry: moved on update struct name functions to public so that they can be triggered by signals DlgAddWatchEntry: added check that m_structNames contains the entry's struct name before attempting to change the struct select widget to the correct struct. DlgChangeType: added on update struct name methods to change strut names if they are changed while the dialog is up. Connected signals from StructEditor to change the available struct names for dialogs which include a mem watch entry type (DlgAddWatchEntry and DlgChangeType). MainWindow: Now restores struct defs first so that the structs can be used when restoring the watch model. StructEditorWidget: removed double click for select widget since the double click is for renaming a node and that can happen by itself. StructEditorWidget: Added signals for if a struct is removed or if struct details have changed. MemWatchModel: Now keeps track of struct definitions and which nodes use those definitions. MemWatchModel: Added methods for if structs change. MemWatchWidget: Added methods for if struct information changes. MemWatchWidget: struct definitions are now held by the model, not the widget Revert "MemWatchWidget: struct definitions are now held by the model, not the widget" This reverts commit c24eebb. MemWatchWidget: Now grabs the struct name from the dlgChangType window if the chosen type was a struct. StructEditorWidget: added save struct button in details side. MainWindow: Signals for updating structs now specify m_watcher or m_viewer as the target for these signals. StructEditorWidget: onDetailDoubleClicked should recieve a QModelIndex. fixed. StructEditorWidget: Now emits changes to the list of struct names when structs are added or removed. MemWatchModel: renamed m_structDefs to m_structDefMap for clarity. MemWatchModel: Added ability to insert into a node which is not a group type, but its entry type is a container MemWatchModel: renamed method to setStructMap MemWatchModel: now using take() as it is simpler MemWatchModel: part of structdefmap rename MemWatchModel: Changed addEntry to detect adding a struct entry and setting it up appropriately. Added helper methods for setting up the struct. StructSelectModel, StructEditorWidget: Added methods to create and get a struct map with namespace, structDef* pairs MemWatchWidget, MainWindow: modified setStructDefs method to transfer the structmap to the MemWatchModel. MemWatchModel: Created method to remove a node from the struct node map. MemWatchModel: Created and implemented methods for expanding and collapsing struct nodes. MemWatchModel: created and implemented public methods for expanding or collapsing a container node. MemWatchModel: addedmethod to update a struct node according to its struct for use if a struct has been updated. Implemented updateStructEntries to use update struct node for all recorded nodes which use an updated struct definition. MemWatchWidget: for struct type entries, added status feedback in the value column. Added a struct svg to decorate struct entries MemWatchModel: added method to get the final address of an entry. StructEditorWidget: for the structAddedRemoved signal, it now defaults to having a nullptr in the structDef* which would indicate a remove action. If a structDef* is included, it indicates an add action StructEditorWidget: Adding a struct now emits the struct added removed signal StructEditorWidget: deleting nodes now sends the struct removed signal for all child nodes which are structs. StructEditorWidget: removed unneccesary coment. StructSelectModel: Removed unused dummy entry FieldDef: if a field contains a pointer, it has a length of 4. StructDetailModel: added method to remove padding fields if available StructDetailModel: When updating a field entry, if the new field length is greater than the old field length, any padding fields after the changed field that would overlap with the updated field are now removed. StructEditorWidget: When the struct details are changed, now enables the save struct button. When struct details are saved, now disables the save struct button StructEditorWidget: when a struct is loaded and the user has said to save the currently loaded struct, now uses the onSaveStruct method for consistency with the save struct button. StructEditorWidget: When a field is double clicked, it will now either convert padding to an actual field, or it will change the details of the field. StructEditorWidget: struct length is now saved to the structDef when saving the struct to prevent unlinking of the struct length and the fields it contains. StructEditorWidget: formatting one line to two. StructEditorWidget: since the length is saved on saving the struct, it should not be saved when validating a new length. MemWatchWidget: Now if a container node is expanded or collapsed, it will be populated with the appropriate child nodes. MemWatchModel: Added methods to update addresses of container fields when an update is triggered. MemWatchModel: Now when editing an entry, it will take into account if the initial entry or edited entry was a container and will populate it appropriately. MemWatchModel: when editing an entry, if the old model was a container type but the new one is not, should delete all children of the node. MemWatchModel: implemented updateStructNode. StructSelectModel, StructEditorWidget: select model now emits a signal if a name is taken. This is used by the widget to display the name taken warning. StructSelectModel, StructEditorWidget: when adding a struct, the select model now returns the new node so that the structAddedRemoved signal can be emitted. StructSelectModel: removed unused variable. StructEditorWidget: added nameChangeFailed to header file StructEditorWidget: Now using the node returned from select model when adding a struct to emit the struct added removed signal instead of trying to find it by index. StructTreeNode bugfix: The namespace should not include the name of the rootNode, only groups and struct names. StructDetailModel: bugfix - editData function needs a return, so added one at the end MemWatchModel: bugfix: qDeleteAll apparently is not recursive, so it will not work on a QMap of QVectors of something. Fixed deletion of m_structNodes. MemWatchModel: bugfix - fixed setting default value in cpp file when there is a default value in the header file. MemViewerWidget: fixed connections to MemViewer. needed to pass reference to functions. StructTreeNode: can now create a copy of a struct tree node. StructTreeNode: Can now set the structDef StructDef: Can now create a copy of a struct def. StructEditorWidget: Now keeping track of which node was sent to the detail model and sending a copy of it to the detail model so that the model can keep track of the struct length separately. StructEditorWidget: index has no internal pointer, now using get field by row. StructDetailModel: added method to reduce a selection of indices to its rows only. StructDetailModel: When removing fields, selection should be reduced to rows before removal. StructDetailModel: Recalculating length is now performed by updateOffsets, so not needed in removeField. StructDetailModel: field offsets should always be updated when adding a field. StructDetailModel, StructEditorWidget: detail model now emits a signal when the length is recalculated. This is recieved by the editor widget and used to set the length in the length line edit. StructDetailWidget: since the node is copied, now deletes the base node when unloading a struct. StructEditorWidget: simplified adding a padding field StructEditorWidget: adding a field now checks if there is a selection in the detail view and adds a field at the last selected index. StructDetailModel: fixed - start should always be less than m_fields.count(). DlgAddWatchEntry: added ability to ignore the address. This is for the struct editor since in a struct, the field address is determined by its offset in the struct. also hides the preview field StructTreeNode: Added methods for getting the size of a struct by name and for finding a struct in the tree by name. StructEditorWidget: Now changes the name of the node loaded in the struct detail model as well as the copy in the struct detail model when the name is changed to keep them linked. StructDetailModel: When getting the length of a field when an entry is updated, fixed so that a pointer has a length of 4, and a struct gets the length directly from a structDef. DlgAddWatchEntry: if you don't show the address, you shouldn't update the preview either. FieldDef: get and set field size should only be for field size. field size and type size may be different if they are a pointer or struct, so field size should reflect the size taken up by a struct by a particular field. formatting StructEditorWidget: when an entry is passed to a dialog, or recieved from a dialog, a copy should be made so that it is not deleted when the dialog is? StructEditorWidget: when there is a field that is not padding and the label column was double clicked, it should instead edit the label of that row using the table view and not a watch entry dialog StructEditorWidget: now creates copy of the dialog entry to prevent unexpected deletion StructDetailModel: now uses the new method names for setting and getting the size of a field StructDetailModel: in remove padding fields, fields should only be removed if there is more than 0 fields to remove. StructDetailModel: indices have no internal pointer, so get field by row is necessary. FieldDef: changed m_structOffset to a u32 since it should never exceed the size of the ram FieldDef: When copying another field def, the size should be set to the same value - fixed. FieldDef: The length of the field should be stored for proper loading in the struct editor FieldDef: When loading a field def from json, if there is no "entry" it should m_entry should become null. Also, need to read the json into the m_entry member variable - fixed. StructDef: renamed variables for clarity MemWatchEntry: Added saving and loading struct name from json file StructDef: renamed variables for clarity MainWindow: the struct editor should close when the main window does - fixed MemWatchModel: Since deletion of struct defs and mem watch nodes occurs elsewhere, trying to delete them again leads to an error. should just clear the members - fixed. StructSelectModel: if the name entered is the same as the old name, no need to set any data. - fixed StructDetailModel: since the base node is now just a copy of a node in the StructSelectModel, it needs to be deleted when deleting the StructDetailModel - fixed. StructDetailModel: now shows the offset in base 16 instead of base 10 - fixed. StructDetailModel: When editing the label field, it should be populated with the current label value. StructDetailModel: willRemoveFields should return true if a non-padding field will be removed, not false. - fixed formatting StructEditorWidget: added method to determine if there are any unsaved changes. uses the state of the save button where it should only be enabled if there are pending changes. StructEditorWidget: if there are any unsaved changes to the struct loaded in the detail view, it should ask to save the changes. - fixed. StructEditorWidget: struct detail editor buttons are now disabled by default. With the exception of the save struct button, they are enabled on loading a struct for editing. The save struct button is only enabled when a change has occurred to struct in the detail editor and is disabled on saving. StructEditorWidget: since double clicking in the detail view can either edit the name field or create an entry in the name column, it is now solely controlled by the struct editor widget. Also, removed premature returns since the three paths are mutually exclusive and the save struct button should always be enabled after any path. StructEditorWidget: No longer using m_unsavedChanges, just the state (enabled/disabled) of the save struct button. StructEditorModel: The value of the struct length line edit field now changes when the length changed signal is emitted from the StructDetailModel. StructEditorWidget: When fields are done, their focus is now cleared. Cleanup: Remove MSBuild / SLN Resolve #89 Update README and gitignore DlgAddWatchEntry: Fixed show/hide of spnLength and structSelect fields depending on entry type formatting StructTreeNode: since setName updates the structdef name automagically, updatename is no longer needed in any other methods. StructTreeNode: getStructNames was giving extra names and some extra colons at the start of every name. fixed. MemWatchEntry: When copying a mem watch entry, should also copy the struct name StructDetailModel: when clearing fields, need to reduce the indices to just rows so that it doesnt go past the count of m_fields. - fixed StructDetailModel: update field entry now returns a boolean to say whether the update was successful. StructEditorWidget: if the name entered into the struct name line edit is the same as the struct's name, just clear focus and leave. StructEditorWidget: When updating a field entry, if it was not updated (returned false), do not enable the save structs button, so return early. DlgAddWatchEntry: Since this dialog prevents access to other windows, there is no need to update any struct names or the list because the cannot change. MemWatchModel: Debug assertion was triggered due to off by one. final index should be the childrenCount - 1 since the row number count will not be a valid index. Fixed. MemWatchModel: reorganized method positions to keep all struct methods together at the bottom MemViewer: removed unused function defs in the header DlgAddWatchEntry: It should be showAddress not hideAddress as that is what is used in the cpp file. fixed. MemWatchWidget, MemViewerWidget: These do actually need a copy of the structDef node so that they can get updated names for the DlgAddWatchEntry dialog. MemWatchWidget: re-implemented update struct methods. DlgAddWatchEntry: preview should only be updated if m_showAddress is true MemWatchModel: entry can be null if it is the root node, so this check needs to be here. MemWatchModel: When expanding or collapsing a struct, need to specify that any new nodes go into the struct MemWatchWidget: Since we are using a placeholder node when a container is collapsed so that we still get the arrow to be able to expand it later, we need to not select the placeholder when the container is not expanded and also not update any further expansions. Solved. formatting StructEditorWidget: Need to make sure to remove the address field when using the DlgAddWatchEntry dialog. StructDef: fixed issues with validating fields: segment size should be number of bits, not bytes, in order to use floor and ceil properly, need to cast to float first, and the field size is stored in the field, not the entry StructEditorWidget: Need to create a new struct def when saving the struct since the old one will be deleted when the struct is unloaded from the detail model. formatting StructDef: Added function to recalculate the struct's offsets if a field has changed size StructDef: Implemented calculate length differently. It is now assumed that fields are stored in order, so if the struct has grown, it will set its size accordingly. StructDef: added method to update the size of a field if it uses the same struct as structName StructDef: formatting StructTreeNode: findNode is now a public method. StructEditorWidget: Added the ability to unload a struct. If a node is deleted it should unload the struct from the detail editor. MemWatchWidget, MemWatchModel: any struct fields will now have their references stored in m_structReferences. When a field is updated the model will emit a signal for either adding or removing a reference. When a struct is saved, all structs which refer to it for a field will now update their field size automagically. StructEditorWidget: member renaming StructEditorWidget: unload button should be enabled when loading a struct StructEditorWidget: structs should be updated by reference when the struct in detail is saved. StructEditorWidget: Changed layout of widget a bit StructDetailModel: Since unload struct can be called by itself, it should be able to reset the model by itself as well. DlgAddWatchEntry: onAddressChanged will not trigger when showAddress is false anyway, so removing check If trying to update the preview of a container type it will fail because the dialog currently has no access to the container's sub entry, so this is now prevented when its a container and if show address is false. DlgAddWatchEntry: Don't want to update the preview for container types. StructSelectModel, StructEditorWidget: the select model now sends the old namespace of the edited node to be able to change the struct namespace elsewhere. StructEditorWidget: fixed update child struct names, was putting an extra :: when the namespace was empty. StructSelectModel, StructEditorWidget: the model now provides the old and new parent nodes on emitting the drop succeeded signal to assist in renaming any child structs that have been moved. StructEditorWidget: added method to update struct reference names when a struct's full name changes. also changed the update struct reference to update struct reference lengths for clarity. formatting StructWatchModel: Added method to setup all containers in the tree and trigger it after loading the root from json. MemWatchModel: in the data method, now makes sure that an entry is not a nullptr, since placeholder nodes have a nullptr entry at the moment. MemWatchModel: now emits a dataChanged signal when a struct is renamed and the entry is changed to reflect that MemWatchModel: during struct node collapse, the child node is deleted before the for loop can get to it so it was leading to a nullptr exception. Fixed. MemWatchWidget: For now, whenever a struct is expanded or collapsed, the node selection will be cleared. MemWatchWidget, MemWatchModel, MemWatchNode: Watch files will now include any struct definitions that were used in their mem watch entries. These are now also loaded in to the struct edit widget for storage. Since I am using unique namespaces, if there are any overlapping namespaces in the incomming struct definitions, they will just be renamed for now. A map of namespaces and new names is now being created for use during mem watch entry creation. That way the structname of an entry can be renamed dynamically to match the correct struct def StructEditorWidget: Created method to write struct defs to json. MemWatchWidget: this is the signal to load struct defs and obtain a map of colliding structnames with their new names. MemWatchModel: Created method to write those struct defs that are used by entries to json. Might move it to StructEditorWidget later... Added second option for the struct icon. MemWatchWidget: Can't convert from nullptr to QMap. fixed. MemWatchWidget: For now, there is no changing type or address. Also, the group check moved earlier. MemWatchModel: Switched to a different struct svg to try it out. When watch files are created, moved writing of the struct defs associated with the watch file to the struct editor. StructEditorWidget: renamed readStructDefsFromJson to readStructDefMapFromJson for clarity since this one takes in a struct map formatted json. StructEditorWidget: Added separate member variable to store intra struct references by pointer. These are not as restrictive as inline references, so this is just for reference so that the proper updates can be sent out and the widget can determine which structs are needed if a watch file is saved. StructEditorWidget: Added method to check for cycles in the structReference map. This would be bad since inline references add to a field's length and if there is a cycle it would become impossible to determine the length of any field in that cycle if any of the structs had a non-zero size and other fields besides the struct it referred to. StructEditorWidget: When modifying a struct reference, it now checks to make sure that there are no cycles in the new map. If there are, it removes the reference and notifies the user. StructEditorWidget: Since modifyStructReference can now fail on addition of a reference, the signal from the detail model now provides a boolean to determine if it has succeeded. StructEditorWidget: Added method to setup struct references and now trigger it on restoreStructDefs which is called during main window initialization. MainWindow: updated a comment StructEditorWidget: added comments as notes for later. StructDetailModel: Removed unused function. FieldDef: Changed m_size to a u32 since it should never be any bigger (that would likely result in a failure to read from dolphin). Since both size and offset are u32 now, also changed any local variables which exclusively use them to u32 as well. StructEditorWidget: When creating the widget, needed to pass the parent onto the QWidget constructor. Fixed Fixed some compiler warnings for unreferenced formal parameters Fixed some more compiler warnings StructDef: there is no longer an option for packing a struct automatically, so that argument of the constructor is now removed. DlgAddWatchEntry: update preview should be shortcutted if the entry a container type, fixed StructEditorWindow: a nullptr needs to be sent as the parent so that it is a separate window. StructEditorWindow: added check for failure to add struct reference during setup struct references. Made a new placeholder type (type_none) so that the container placeholders no longer have a nullptr for their entry. Changed any location where this was checked for containers. MemWatchModel: When a struct node was collapsed, it did not properly handle removal of child nodes. Fixed. MemWatchModel: the update and freeze recursive functions start at the root node, so they actually do need the nullptr check on entry. MemWatchModel: ItemIsDragEnabled is no longer common to every node. It is only available if a node is a child of a node that is a group. Members of container nodes should not be draggable. MemWatchWidget: if there is a signal to add a struct, if that struct is already loaded, then just replace it and update the relevant watchs StructDetailModel: When saving a struct, was running into invalidated fields, so need to copy the field from m_fields when setting new fields in the struct def. Fixed MemWatchModel: When updating a struct, it would collapse a node to remove all child nodes, but that also changed the state of m_isExpanded, so the second expanded check would fail. Fixed. StructEditorWidget: Renamed method for clarity since the field has a size, not a length StructEditorWidget: updateStructReferenceNames now properly updates m_structReferences and m_structPointerReferences with the name change. StructEditorWidget: in onSelectDataEdited, update childe struct names can be called on groups too, so it is moved out of the group check. Since updateChildStructNames emits the change, that is no longer needed. StructEditorWidget: struct field reference sizes should be updated before emitting the structdef. Also, emitting the struct def will update it automatically in the mem watch model, so no need to emit a second signal to update it. formatting MemWatchEntry: To prevent useless address updates for structs, it now stores the current final address from the pointer calculations to compare against. Added a member field and methods for checking it and updating it. MemWatchModel: Added checks for if a container address has changed as well as updating the address after the checks are finished. StructDef: If the first field is longer than a segment, zeros were entered previously instead of marking them taken. Fixed StructDef: when validating the last segment of a field, it should not be shifted by offset since it is a contguous region StructDef: removed unneccessary check StructEditorWidget: add/remove a struct need to happen before updating reference field sizes so that the update struct has a struct def to work with. fixed StructEditorWidget: Now only add a nodeName to m_structReferences or m_structPointerReferences if it is not already present in the target reference list StructEditorWidget: When saving a struct map to json, now properly finds the nested struct definitions and adds them to the json as well. DlgAddWatchEntry: Renamed m_showAddress to m_isForStructField since that is more descriptive and changed polarity to reflect this name change. DlgAddWatchEntry: removed unused methods for updating struct names while the dialog is up. DlgAddWatchEntry: Fixed constructor argument names to match new m_isForStructField naming and polarity. StructEditorWidget: renamed method for clarity. StructEditorWidget: Added method to edit a field entry. StructEditorWidget: No longer relying on internal pointers, so removed the attempt to get the FieldDef* node from the internal pointer of an index. StructEditorWidget: part of previous method name change StructEditorWidget: Added the ability to delete a field from the context menu. StructEditorWidget: Added the ability to edit a field entry from the context menu. StructDetailModel: fixed off by one bug. StructDetailModel: Since structs can be of size 0, now checks if a field has a size of zero and just removes it if that is true. StructDetailModel: fixed bug. when removing last field of a struct there is no last field in m_fields, so newLength should just be zero. DlgAddWatchEntry: When editing or creating a struct watch entry, the struct name should never be blank. Now checks for that (blank item in the combobox is index 0). StructDetailModel, StructEditorWidget: Changed name and position of struct_col_detail to before label and it is now named Type. In the widget it now has a default size of 100 and Name has a default size of 150. SructEditorWidget, StructDetailModel: Renamed add field to add padding field, add field now calls add padding field first then create field entry to convert it from a padding field to a normal struct field. create field entry now returns a bool if it was successful, if not the newly added field is deleted. Added methods to the struct detail model to get the relevant indices for adding fields StructEditorWidget: Added names to the detail buttons StructEditorWidget: for detail buttons, set a size policy so they can be smaller than otherwise StructEditorWidget: changed detail add button tooltip to match what it does now. formatting StructEditorWidget: changed on add padding field to work with a QModelIndex instead of the row as an integer. StructEditorWidget: Now will set boolean correctly for struct field dialog. DlgAddWatchEntry: validate and set address should happen when it is not a struct field. fixed MemWatchwidget: if the right clicked item is a container, the user should not be able to edit its value. If the right clicked item is inside a container, it should be be able to be deleted or grouped MemWatchWidget: If any item in a simplified selection is a container field, it means that the selection contains only part of a container and so it should not be groupable. StructDetailMap: ok boolean should have true as default since the triggered method has early return if no change to references and that case should be true. MemWatchWidget: fixed nullptr exception when creating a group if parent is a group or root node. StructEditorWidget: renamed methods for clarity DlgAddWatchEntry: added more guards for struct fields to prevent updating preview. MemWatchModel: When root is cleared, the record of struct nodes should also be cleared. fixed. StructSelectModel: added method to replace the struct def of a struct node by name. FieldDef: Added method for detecting if two fields are functionally the same. Doesnt check m_base or m_isUnsigned in m_entry at the moment. FieldDef: Added method for retrieving the changes between two fields. FieldDef: Added method for getting a QStringList containing a detailed description of the field. StructDef: Added method for determining if two struct definitions are the same. StructDef: Added method for retrieving the differences between two struct definitions. StructEditorWidget: changed size of detail column and modified method to read struct def from json to handle different types of clashes instead of only renaming any struct that has the same name. StructEditorWidget: Added options for if an incoming struct has the same name as a group. Also added default buttons to all dialogs when reading in a struct map from json. StructEditorWidget: removed comment. StructDef: changed diff string for clarity FieldDef: Added guard clauses to diffList to get correct diff strings. StructEditorWidget: removed unused variable. StructEditorWidget: Now properly updates struct reference names and emits the struct name changed signal when data is edited in the select model. StructEditorWidget: fixed name generation on clashes when loading in a mem watch file with struct definitions. formatting DlgChangeType: removed unused methods. There is no need to update the structs available since this dialog should prevent any interaction with the struct editor while it is open. StructDetailModel: Added method to update struct labels in the loaded struct StructEditorWidget: When the name is changed in the detail view side, need to update the struct type label in the node in the editor as well as the detail model for any pointer references StructEditorwidget: when updating struct reference names, if there is a node in the detail editor, need to update that node as well. StructEditorWidget: When changing a name in the select view, need to update any pointer reference names in the node and in the struct detail model. forced clang formatting. fixed linux compiler warnings linux build fixes fixed clang formatting fixed macOS build error DlgChangeType: on initializing the dialog, if the current type is not type_struct, now hides the struct select combobox. StructEditorWidget: On struct loading from mem watch files, changed formatting of more details field when there is a struct with the same name already in the struct editor MemWatchModel: if the new entry type is a container type, and it is a struct type, it should setup the struct MemWatchModel: Bugfix: When updating struct entry nodes, when iterating over the nodes, if a nested node was a pointer to the same type but was changed to a different type, the loop could use nodes that were out of date. Now checks that the nodes are still valid nodes and are contained in the structNodes object MemWatchModel: Bugfix: When a struct is collapsed or expanded, any child fields should only be populated if the struct def has child fields. That way it cannot be expanded if there are no fields in the struct def MemWatchModel: Bugfix: When setting up a struct node the node should be added to the struct node map even if the struct def has no fields, but it should have no placeholder node if there are no fields. MemWatchModel: Bugfix: on struct node update, if there are no child nodes, check if the struct def has fields and if it does, add a placeholder. If it has child nodes, collapse them. Then if it marked expanded, expand the struct node. StructEditorWidget: Added method to duplicate a field in the detail view. For now only duplicates the field that was right clicked and does not handle selections. StructEditorWidget: reordered detail context menu and added duplicate field to menu. clang formatting StructDetailModel: when adding a field, removed starting offset since that will be set by the updateFieldOffsets method. StructDetailModel: Removed calculating struct offset when adding padding since it will be calculated when calling updateFieldOffsets. MemWatchModel: If an entry is a container type, the user now cannot change its value since the value is only used for struct status. bugfixes
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.
Rebased example
Assumptions made for conflict resolution:
Example for #181