summary refs log tree commit diff
path: root/src/ui/MxcAnimatedImage.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-29 04:28:08 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-29 04:52:52 +0100
commitd8ead9573b6fd45e386d54b9aaec4e1c335b10ec (patch)
tree514d00ee26e67fc8bfeff403858e7d4ef276e6e3 /src/ui/MxcAnimatedImage.cpp
parentuse more literals (diff)
downloadnheko-d8ead9573b6fd45e386d54b9aaec4e1c335b10ec.tar.xz
Reduce allocations using QStringLiteral
Diffstat (limited to 'src/ui/MxcAnimatedImage.cpp')
-rw-r--r--src/ui/MxcAnimatedImage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/MxcAnimatedImage.cpp b/src/ui/MxcAnimatedImage.cpp

index e8ba711f..8e39558f 100644 --- a/src/ui/MxcAnimatedImage.cpp +++ b/src/ui/MxcAnimatedImage.cpp
@@ -44,14 +44,14 @@ MxcAnimatedImage::startDownload() auto encryptionInfo = mtx::accessors::file(*event); // If the message is a link to a non mxcUrl, don't download it - if (!mxcUrl.startsWith("mxc://")) { + if (!mxcUrl.startsWith(QLatin1String("mxc://"))) { return; } QString suffix = QMimeDatabase().mimeTypeForName(mimeType).preferredSuffix(); const auto url = mxcUrl.toStdString(); - const auto name = QString(mxcUrl).remove("mxc://"); + const auto name = QString(mxcUrl).remove(QStringLiteral("mxc://")); QFileInfo filename( QStringLiteral("%1/media_cache/media/%2.%3") .arg(QStandardPaths::writableLocation(QStandardPaths::CacheLocation), name, suffix));