refactor: fix clang-tidy auto*, const&, and curly braces (#5083)

This commit is contained in:
pajlada
2024-01-14 17:54:52 +01:00
committed by GitHub
parent 292f9b9734
commit 5b6675abb4
78 changed files with 647 additions and 228 deletions
@@ -433,7 +433,7 @@ size_t TextLayoutElement::getSelectionIndexCount() const
void TextLayoutElement::paint(QPainter &painter,
const MessageColors & /*messageColors*/)
{
auto app = getApp();
auto *app = getApp();
QString text = this->getText();
if (text.isRightToLeft() || this->reversedNeutral)
{
@@ -461,7 +461,7 @@ int TextLayoutElement::getMouseOverIndex(const QPoint &abs) const
return 0;
}
auto app = getApp();
auto *app = getApp();
auto metrics = app->fonts->getFontMetrics(this->style_, this->scale_);
auto x = this->getRect().left();
@@ -495,7 +495,7 @@ int TextLayoutElement::getMouseOverIndex(const QPoint &abs) const
int TextLayoutElement::getXFromIndex(size_t index)
{
auto app = getApp();
auto *app = getApp();
QFontMetrics metrics =
app->fonts->getFontMetrics(this->style_, this->scale_);