diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-08-18 18:38:10 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-08-18 18:38:10 +0800 |
commit | b53780b2106b0f233c48e27653336b8a629ca486 (patch) | |
tree | e5e2659eb23852012804e9ba8a290a8e19d8230f /src/ui/helper | |
parent | d3568fb844c7b9ea59783b04899dbd94ad972b91 (diff) | |
download | cru-b53780b2106b0f233c48e27653336b8a629ca486.tar.gz cru-b53780b2106b0f233c48e27653336b8a629ca486.tar.bz2 cru-b53780b2106b0f233c48e27653336b8a629ca486.zip |
Rename CRU_LOG_* to CRU_LOG_TAG_*.
Diffstat (limited to 'src/ui/helper')
-rw-r--r-- | src/ui/helper/ClickDetector.cpp | 4 | ||||
-rw-r--r-- | src/ui/helper/ShortcutHub.cpp | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/ui/helper/ClickDetector.cpp b/src/ui/helper/ClickDetector.cpp index de39f14e..b7e800a8 100644 --- a/src/ui/helper/ClickDetector.cpp +++ b/src/ui/helper/ClickDetector.cpp @@ -58,7 +58,7 @@ ClickDetector::ClickDetector(controls::Control* control) { this->state_ == ClickState::Hover) { if (!this->control_->CaptureMouse()) { if constexpr (debug_flags::click_detector) { - CRU_LOG_DEBUG(u"Failed to capture mouse when begin click."); + CRU_LOG_TAG_DEBUG(u"Failed to capture mouse when begin click."); } return; } @@ -137,7 +137,7 @@ void ClickDetector::SetState(ClickState state) { UnreachableCode(); } }; - CRU_LOG_DEBUG(u"Click state changed, new state: {}.", to_string(state)); + CRU_LOG_TAG_DEBUG(u"Click state changed, new state: {}.", to_string(state)); } state_ = state; diff --git a/src/ui/helper/ShortcutHub.cpp b/src/ui/helper/ShortcutHub.cpp index 30a563ed..c413ab2a 100644 --- a/src/ui/helper/ShortcutHub.cpp +++ b/src/ui/helper/ShortcutHub.cpp @@ -64,7 +64,7 @@ const std::vector<ShortcutInfo>& ShortcutHub::GetShortcutByKeyBind( void ShortcutHub::Install(controls::Control* control) { if (!event_guard_.IsEmpty()) { - CRU_LOG_ERROR(u"Shortcut hub is already installed. Failed to install."); + CRU_LOG_TAG_ERROR(u"Shortcut hub is already installed. Failed to install."); return; } @@ -74,7 +74,7 @@ void ShortcutHub::Install(controls::Control* control) { void ShortcutHub::Uninstall() { if (event_guard_.IsEmpty()) { - CRU_LOG_WARN(u"Shortcut hub is not installed. Failed to uninstall."); + CRU_LOG_TAG_WARN(u"Shortcut hub is not installed. Failed to uninstall."); return; } @@ -89,9 +89,9 @@ void ShortcutHub::OnKeyDown(events::KeyEventArgs& event) { if constexpr (debug_flags::shortcut) { if (shortcut_list.empty()) { - CRU_LOG_DEBUG(u"No shortcut for key bind {}.", key_bind.ToString()); + CRU_LOG_TAG_DEBUG(u"No shortcut for key bind {}.", key_bind.ToString()); } - CRU_LOG_DEBUG(u"Begin to handle shortcut for key bind {}.", + CRU_LOG_TAG_DEBUG(u"Begin to handle shortcut for key bind {}.", key_bind.ToString()); } @@ -99,7 +99,7 @@ void ShortcutHub::OnKeyDown(events::KeyEventArgs& event) { auto is_handled = shortcut.handler(); if (is_handled) { if constexpr (debug_flags::shortcut) { - CRU_LOG_DEBUG(u"Handle {} handled it.", shortcut.name); + CRU_LOG_TAG_DEBUG(u"Handle {} handled it.", shortcut.name); } handled = true; @@ -108,21 +108,21 @@ void ShortcutHub::OnKeyDown(events::KeyEventArgs& event) { break; } else { if constexpr (debug_flags::shortcut) { - CRU_LOG_DEBUG(u"Handle {} didn't handle it.", shortcut.name); + CRU_LOG_TAG_DEBUG(u"Handle {} didn't handle it.", shortcut.name); } } } if constexpr (debug_flags::shortcut) { if (!shortcut_list.empty()) { - CRU_LOG_DEBUG(u"End handling shortcut for key bind {}.", + CRU_LOG_TAG_DEBUG(u"End handling shortcut for key bind {}.", key_bind.ToString()); } } if (!handled) { if constexpr (debug_flags::shortcut) { - CRU_LOG_DEBUG( + CRU_LOG_TAG_DEBUG( u"Raise fallback event for unhandled shortcut of key bind {}.", key_bind.ToString()); } |