Prevent copying in a couple places (#4066)

This commit is contained in:
Kasia 2022-10-16 16:25:24 +02:00 committed by GitHub
parent 34b5fa661f
commit b232d16b55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -54,7 +54,7 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel)
bool subscribed = false;
int subLength = 0;
for (const QString &subBadge : {"subscriber", "founder"})
for (const auto &subBadge : {"subscriber", "founder"})
{
if (!badges.contains(subBadge))
{

View file

@ -286,11 +286,12 @@ void ResizingTextEdit::insertFromMimeData(const QMimeData *source)
this->imagePasted.invoke(source);
return;
}
else if (source->hasUrls())
if (source->hasUrls())
{
bool hasUploadable = false;
auto mimeDb = QMimeDatabase();
for (const QUrl url : source->urls())
for (const QUrl &url : source->urls())
{
QMimeType mime = mimeDb.mimeTypeForUrl(url);
if (mime.name().startsWith("image"))

View file

@ -239,7 +239,7 @@ void ModerationPage::addModerationButtonSettings(
// build one line for each customizable button
auto i = 0;
for (const auto tButton : getSettings()->timeoutButtons.getValue())
for (const auto &tButton : getSettings()->timeoutButtons.getValue())
{
const auto buttonNumber = QString::number(i);
auto timeout = timeoutLayout.emplace<QHBoxLayout>().withoutMargin();