-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Replace usages of TYPED_EVENT
with til::event
#16837
Merged
Merged
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
zadjii-msft
commented
Mar 7, 2024
src/cascadia/TerminalApp/AboutDialog.h src/cascadia/TerminalApp/CommandPalette.cpp src/cascadia/TerminalApp/CommandPalette.h src/cascadia/TerminalApp/FilteredCommand.h src/cascadia/TerminalApp/HighlightedText.h src/cascadia/TerminalApp/SuggestionsControl.cpp src/cascadia/TerminalApp/SuggestionsControl.h src/cascadia/TerminalApp/TabHeaderControl.cpp src/cascadia/TerminalApp/TabHeaderControl.h src/cascadia/TerminalApp/TabRowControl.h src/cascadia/TerminalApp/TerminalPage.cpp src/cascadia/TerminalApp/TerminalPage.h src/cascadia/TerminalApp/TerminalTabStatus.h src/cascadia/TerminalConnection/ConptyConnection.cpp src/cascadia/TerminalConnection/ConptyConnection.h src/cascadia/TerminalConnection/EchoConnection.cpp src/cascadia/TerminalConnection/EchoConnection.h src/cascadia/TerminalSettingsEditor/Appearances.cpp src/cascadia/TerminalSettingsEditor/Appearances.h src/cascadia/TerminalSettingsEditor/ColorSchemes.h src/cascadia/TerminalSettingsEditor/EditColorScheme.h src/cascadia/TerminalSettingsEditor/EnumEntry.h src/cascadia/TerminalSettingsEditor/MainPage.h src/cascadia/TerminalSettingsEditor/Profiles_Advanced.h src/cascadia/TerminalSettingsEditor/Profiles_Appearance.h src/cascadia/TerminalSettingsEditor/Profiles_Base.h src/cascadia/TerminalSettingsEditor/ViewModelHelpers.h src/cascadia/WindowsTerminal/IslandWindow.h
DHowett
reviewed
Mar 7, 2024
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 didn't see it here, but can we also remove the definition for TYPED_EVENT
and WINRT_EVENT
?
|
lhecker
reviewed
Mar 7, 2024
lhecker
approved these changes
Mar 7, 2024
the PR still doesn't compile 🙃 |
DHowett
approved these changes
Mar 20, 2024
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.
This PR automagically finds and replaces all1 usages of our TYPED_EVENT macro with
til::event
. Benefits include:til::event<> Foo;
,Foo.raise(...)
, andbar.Foo({this, &Bar::FooHandler})
(whereas before the relationship between_FooHandlers(...)
andbar.Foo({...})
) couldn't be figured out by vscode & sublime.Other find & replace work that had to be done:
til::typed_event<>
==<IInspectable, IInspectable>
thing from Refactor Pane to be able to host non-terminal content #16170, since that is goodnesstil::property_changed_event
, so you can use that for your property changed events. They're all the same anyways.WINRT_PROPERTY
s, since the latter macro leaves us in aprivate:
blockPane::SetupChildCloseHandlers
I had to swap back, because the script thought that was an event 🤦ProfileViewModel::DeleteProfile
had to be renamedDeleteProfileRequested
, since there was already aDeleteProfile
method on it.winrt::event
s to the monarch & peasant. That doesn't work withtil::event
s and I'm kinda surprised it ever didThe script in question
Footnotes
there are other macros we use that were also using this macro, those weren't replaced. ↩