aboutsummaryrefslogtreecommitdiff
path: root/src/ui/helper/ShortcutHub.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-10-17 12:06:14 +0800
committerYuqian Yang <crupest@crupest.life>2025-10-17 12:06:14 +0800
commit32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 (patch)
tree892b71060a88b58d9293d78033000b05818783df /src/ui/helper/ShortcutHub.cpp
parentfaf77949e19dc0d01f75bf8abb783eda70328048 (diff)
downloadcru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.gz
cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.bz2
cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.zip
Remove String stage 1.
Diffstat (limited to 'src/ui/helper/ShortcutHub.cpp')
-rw-r--r--src/ui/helper/ShortcutHub.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ui/helper/ShortcutHub.cpp b/src/ui/helper/ShortcutHub.cpp
index 80e70fe1..fd23802e 100644
--- a/src/ui/helper/ShortcutHub.cpp
+++ b/src/ui/helper/ShortcutHub.cpp
@@ -89,18 +89,17 @@ void ShortcutHub::OnKeyDown(events::KeyEventArgs& event) {
if constexpr (debug_flags::shortcut) {
if (shortcut_list.empty()) {
- CRU_LOG_TAG_DEBUG("No shortcut for key bind {}.",
- key_bind.ToString().ToUtf8());
+ CRU_LOG_TAG_DEBUG("No shortcut for key bind {}.", key_bind.ToString());
}
CRU_LOG_TAG_DEBUG("Begin to handle shortcut for key bind {}.",
- key_bind.ToString().ToUtf8());
+ key_bind.ToString());
}
for (const auto& shortcut : shortcut_list) {
auto is_handled = shortcut.handler();
if (is_handled) {
if constexpr (debug_flags::shortcut) {
- CRU_LOG_TAG_DEBUG("Handle {} handled it.", shortcut.name.ToUtf8());
+ CRU_LOG_TAG_DEBUG("Handle {} handled it.", shortcut.name);
}
handled = true;
@@ -109,8 +108,7 @@ void ShortcutHub::OnKeyDown(events::KeyEventArgs& event) {
break;
} else {
if constexpr (debug_flags::shortcut) {
- CRU_LOG_TAG_DEBUG("Handle {} didn't handle it.",
- shortcut.name.ToUtf8());
+ CRU_LOG_TAG_DEBUG("Handle {} didn't handle it.", shortcut.name);
}
}
}
@@ -118,7 +116,7 @@ void ShortcutHub::OnKeyDown(events::KeyEventArgs& event) {
if constexpr (debug_flags::shortcut) {
if (!shortcut_list.empty()) {
CRU_LOG_TAG_DEBUG("End handling shortcut for key bind {}.",
- key_bind.ToString().ToUtf8());
+ key_bind.ToString());
}
}
@@ -126,7 +124,7 @@ void ShortcutHub::OnKeyDown(events::KeyEventArgs& event) {
if constexpr (debug_flags::shortcut) {
CRU_LOG_TAG_DEBUG(
"Raise fallback event for unhandled shortcut of key bind {}.",
- key_bind.ToString().ToUtf8());
+ key_bind.ToString());
}
fallback_event_.Raise(event);
}