-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Add OriginTag to Command #16823
Add OriginTag to Command #16823
Conversation
static com_ptr<ActionMap> FromJson(const Json::Value& json, const OriginTag origin = OriginTag::None); | ||
std::vector<SettingsLoadWarnings> LayerJson(const Json::Value& json, const OriginTag origin, const bool withKeybindings = true); |
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.
Does the origin
need to be an optional parameter? If it weren't we could ensure we never forget to pass the right tag.
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.
So the reason for this is in SerializationTests.cpp
we call FromJson
on several different classes (Profile
, ActionMap
, etc) in a template function, and not all have them take OriginTag
as a parameter. We should fix those tests to not behave like this and make origin
a non-optional parameter, but I'm fine with leaving that as a follow up
@zadjii-msft @lhecker could you re-approve? It says the reviews are stale |
Summary of the Pull Request
As outlined in #16816 , adding
OriginTag
toCommand
is one of the prerequisites to implementing Action IDs. This PR does that.Validation Steps Performed
Actions/Commands still get parsed and work
PR Checklist