Renamed variables to clear some warnings.
This commit is contained in:
@@ -235,20 +235,12 @@ MessageBuilder::MessageBuilder(const UnbanAction &action)
|
||||
|
||||
this->message().timeoutUser = action.target.name;
|
||||
|
||||
QString text;
|
||||
|
||||
if (action.wasBan())
|
||||
{
|
||||
text = QString("%1 unbanned %2.") //
|
||||
QString text = QString("%1 %2 %3.")
|
||||
.arg(action.source.name)
|
||||
.arg(QString(action.wasBan()
|
||||
? "unbanned"
|
||||
: "untimedout"))
|
||||
.arg(action.target.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = QString("%1 untimedout %2.") //
|
||||
.arg(action.source.name)
|
||||
.arg(action.target.name);
|
||||
}
|
||||
|
||||
this->emplace<TextElement>(text, MessageElementFlag::Text,
|
||||
MessageColor::System);
|
||||
|
||||
@@ -188,7 +188,7 @@ void TextElement::addToContainer(MessageLayoutContainer &container,
|
||||
for (Word &word : this->words_)
|
||||
{
|
||||
auto getTextLayoutElement = [&](QString text, int width,
|
||||
bool trailingSpace) {
|
||||
bool hasTrailingSpace) {
|
||||
auto color = this->color_.getColor(*app->themes);
|
||||
app->themes->normalizeColor(color);
|
||||
|
||||
@@ -196,7 +196,7 @@ void TextElement::addToContainer(MessageLayoutContainer &container,
|
||||
*this, text, QSize(width, metrics.height()),
|
||||
color, this->style_, container.getScale()))
|
||||
->setLink(this->getLink());
|
||||
e->setTrailingSpace(trailingSpace);
|
||||
e->setTrailingSpace(hasTrailingSpace);
|
||||
e->setText(text);
|
||||
|
||||
// If URL link was changed,
|
||||
|
||||
@@ -99,14 +99,14 @@ bool MessageLayout::layout(int width, float scale, MessageElementFlags flags)
|
||||
return true;
|
||||
}
|
||||
|
||||
void MessageLayout::actuallyLayout(int width, MessageElementFlags _flags)
|
||||
void MessageLayout::actuallyLayout(int width, MessageElementFlags flags)
|
||||
{
|
||||
this->layoutCount_++;
|
||||
|
||||
auto messageFlags = this->message_->flags;
|
||||
|
||||
if (this->flags.has(MessageLayoutFlag::Expanded) ||
|
||||
(_flags.has(MessageElementFlag::ModeratorTools) &&
|
||||
(flags.has(MessageElementFlag::ModeratorTools) &&
|
||||
!this->message_->flags.has(MessageFlag::Disabled))) //
|
||||
{
|
||||
messageFlags.unset(MessageFlag::Collapsed);
|
||||
@@ -121,7 +121,7 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags _flags)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
element->addToContainer(*this->container_, _flags);
|
||||
element->addToContainer(*this->container_, flags);
|
||||
}
|
||||
|
||||
if (this->height_ != this->container_->getHeight())
|
||||
|
||||
@@ -390,17 +390,17 @@ void MessageLayoutContainer::paintSelection(QPainter &painter, int messageIndex,
|
||||
int lineIndex2 = lineIndex + 1;
|
||||
for (; lineIndex2 < this->lines_.size(); lineIndex2++)
|
||||
{
|
||||
Line &line = this->lines_[lineIndex2];
|
||||
QRect rect = line.rect;
|
||||
Line &line2 = this->lines_[lineIndex2];
|
||||
QRect rect = line2.rect;
|
||||
|
||||
rect.setTop(std::max(0, rect.top()) + yOffset);
|
||||
rect.setBottom(
|
||||
std::min(this->height_, rect.bottom()) +
|
||||
yOffset);
|
||||
rect.setLeft(this->elements_[line.startIndex]
|
||||
rect.setLeft(this->elements_[line2.startIndex]
|
||||
->getRect()
|
||||
.left());
|
||||
rect.setRight(this->elements_[line.endIndex - 1]
|
||||
rect.setRight(this->elements_[line2.endIndex - 1]
|
||||
->getRect()
|
||||
.right());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user