AK+Everywhere: Rename verify_cast to as

Follow-up to fc20e61e72.
This commit is contained in:
Timothy Flynn 2025-01-21 09:12:05 -05:00 committed by Tim Flynn
commit 85b424464a
Notes: github-actions[bot] 2025-01-21 16:49:39 +00:00
191 changed files with 574 additions and 574 deletions

View file

@ -40,8 +40,8 @@ QSize TabBar::tabSizeHint(int index) const
void TabBar::contextMenuEvent(QContextMenuEvent* event)
{
auto* tab_widget = verify_cast<QTabWidget>(this->parent());
auto* tab = verify_cast<Tab>(tab_widget->widget(tabAt(event->pos())));
auto* tab_widget = as<QTabWidget>(this->parent());
auto* tab = as<Tab>(tab_widget->widget(tabAt(event->pos())));
if (tab)
tab->context_menu()->exec(event->globalPos());
}
@ -147,7 +147,7 @@ QRect TabStyle::subElementRect(QStyle::SubElement sub_element, QStyleOption cons
{
// Place our add-tab button (set as the top-right corner widget) directly after the last tab
if (sub_element == QStyle::SE_TabWidgetRightCorner) {
auto* tab_widget = verify_cast<TabWidget>(widget);
auto* tab_widget = as<TabWidget>(widget);
auto tab_bar_size = tab_widget->tabBar()->sizeHint();
auto new_tab_button_size = tab_bar_size.height();
return QRect {