-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Added the ability to change properties of UiActions #24834
Added the ability to change properties of UiActions #24834
Conversation
5f9de79
to
94e80dc
Compare
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 surprised that the method to modify the actions isn't part of the abstract interface.
Besides that LGTM.
virtual const std::vector<UiAction> getActions() const = 0; | ||
virtual UiActionState actionState(const muse::actions::ActionCode& code) const = 0; | ||
virtual async::Channel<muse::actions::ActionCodeList> actionStateChanged() const = 0; | ||
virtual const std::vector<UiAction> actionList() const = 0; |
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.
Why a const
return value if it's not a reference?
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.
removed const
(I don't know why the author added const, probably wanted to somehow semantically show that there is no need to change this list...
I just renamed the method to match our style)
@@ -69,6 +73,8 @@ class UiActionsRegister : public IUiActionsRegister, public Injectable, public a | |||
void updateShortcuts(const actions::ActionCodeList& codes); | |||
void updateShortcutsAll(); | |||
|
|||
void updateActions(const UiActionList& actions); |
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.
Not override
? Aren't clients supposed to interact with abstract IUiActionsRegister
?
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.
not override
the reasons are described here (number two)
#24834 (comment)
There are two reasons for this:
|
94e80dc
to
7347bfc
Compare
7347bfc
to
e801cbb
Compare
Can't find the "Approve" button, but I approve :) Thanks ! |
Files changed tab > Review changes. However, the 'approve' option has disappeared now that the PR is merged. |
No description provided.