From 3c12eff3042b923c6003b653eece2c6ef3052f1e Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Mon, 8 Feb 2021 22:48:04 +0000 Subject: [PATCH] Codestyle: provide const for fancy effects strings Co-authored-by: Nicolas Fella --- src/messageeventmodel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/messageeventmodel.cpp b/src/messageeventmodel.cpp index 1a2a424e1..cdc3aae6e 100644 --- a/src/messageeventmodel.cpp +++ b/src/messageeventmodel.cpp @@ -105,27 +105,27 @@ void MessageEventModel::setRoom(NeoChatRoom *room) if (message) { QString planBody = message->plainBody(); // snowflake - QString snowlakeEmoji = QString::fromUtf8("\xE2\x9D\x84"); + const QString snowlakeEmoji = QString::fromUtf8("\xE2\x9D\x84"); if (planBody.contains(snowlakeEmoji)) { Q_EMIT fancyEffectsReasonFound(QStringLiteral("snowflake")); } // fireworks - QString fireworksEmoji = QString::fromUtf8("\xF0\x9F\x8E\x86"); + const QString fireworksEmoji = QString::fromUtf8("\xF0\x9F\x8E\x86"); if (planBody.contains(fireworksEmoji)) { Q_EMIT fancyEffectsReasonFound(QStringLiteral("fireworks")); } // sparkler - QString sparklerEmoji = QString::fromUtf8("\xF0\x9F\x8E\x87"); + const QString sparklerEmoji = QString::fromUtf8("\xF0\x9F\x8E\x87"); if (planBody.contains(sparklerEmoji)) { Q_EMIT fancyEffectsReasonFound(QStringLiteral("fireworks")); } // party pooper - QString partyEmoji = QString::fromUtf8("\xF0\x9F\x8E\x89"); + const QString partyEmoji = QString::fromUtf8("\xF0\x9F\x8E\x89"); if (planBody.contains(partyEmoji)) { Q_EMIT fancyEffectsReasonFound(QStringLiteral("confetti")); } // confetti ball - QString confettiEmoji = QString::fromUtf8("\xF0\x9F\x8E\x8A"); + const QString confettiEmoji = QString::fromUtf8("\xF0\x9F\x8E\x8A"); if (planBody.contains(confettiEmoji)) { Q_EMIT fancyEffectsReasonFound(QStringLiteral("confetti")); }