From c3a26654777574ee83670f1bd470c92e4979b17a Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Thu, 20 Jul 2023 23:35:59 +0200 Subject: [PATCH] Do not call first() on a temporary list --- indicator/deviceindicator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indicator/deviceindicator.cpp b/indicator/deviceindicator.cpp index a62badb55..1e1e6ca55 100644 --- a/indicator/deviceindicator.cpp +++ b/indicator/deviceindicator.cpp @@ -98,8 +98,8 @@ DeviceIndicator::DeviceIndicator(DeviceDbusInterface *device) QStringLiteral("/modules/kdeconnect/devices/") + device->id() + QStringLiteral("/photo"), QStringLiteral("org.kde.kdeconnect.device.photo"), QStringLiteral("requestPhoto")); - msg.setArguments({QString(QStandardPaths::standardLocations(QStandardPaths::DownloadLocation).first() - + QDateTime::currentDateTime().toString(QStringLiteral("/dd-MM-yy_hh-mm-ss.png")))}); + QStringList downloadDirs = QStandardPaths::standardLocations(QStandardPaths::DownloadLocation); + msg.setArguments({QString(downloadDirs.first() + QDateTime::currentDateTime().toString(QStringLiteral("/dd-MM-yy_hh-mm-ss.png")))}); blockOnReply(QDBusConnection::sessionBus().asyncCall(msg)); }); setWhenAvailable(