Codestyle: provide const for fancy effects strings
Co-authored-by: Nicolas Fella <nicolas.fella@gmx.de>
This commit is contained in:
committed by
Carl Schwan
parent
008d19e68b
commit
3c12eff304
@@ -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"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user