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-28 22:30:12 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-28 22:30:12 +0100
commitbb290f9fecc48d407c2bc75a64b0e8a94bc3aeba (patch)
tree4a663d6987c615c9c2b01bec903bfe125ee58cf3 /src/ui/MxcAnimatedImage.cpp
parentRemove unused button class (diff)
downloadnheko-bb290f9fecc48d407c2bc75a64b0e8a94bc3aeba.tar.xz
Fix more warnings and remove dead code
Diffstat (limited to '')
-rw-r--r--src/ui/MxcAnimatedImage.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ui/MxcAnimatedImage.cpp b/src/ui/MxcAnimatedImage.cpp

index 72758653..e8ba711f 100644 --- a/src/ui/MxcAnimatedImage.cpp +++ b/src/ui/MxcAnimatedImage.cpp
@@ -39,8 +39,7 @@ MxcAnimatedImage::startDownload() if (!animatable_) return; - QString mxcUrl = QString::fromStdString(mtx::accessors::url(*event)); - QString originalFilename = QString::fromStdString(mtx::accessors::filename(*event)); + QString mxcUrl = QString::fromStdString(mtx::accessors::url(*event)); auto encryptionInfo = mtx::accessors::file(*event); @@ -53,10 +52,9 @@ MxcAnimatedImage::startDownload() const auto url = mxcUrl.toStdString(); const auto name = QString(mxcUrl).remove("mxc://"); - QFileInfo filename(QString("%1/media_cache/media/%2.%3") - .arg(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)) - .arg(name) - .arg(suffix)); + QFileInfo filename( + QStringLiteral("%1/media_cache/media/%2.%3") + .arg(QStandardPaths::writableLocation(QStandardPaths::CacheLocation), name, suffix)); if (QDir::cleanPath(name) != name) { nhlog::net()->warn("mxcUrl '{}' is not safe, not downloading file", url); return;