From a1a7e570113a3889417d6db8989a1e8fb6d50662 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sat, 12 Aug 2023 15:30:37 +0200 Subject: [PATCH] Daemon: Do not return value by const ref We operate on a QSharedData object and thus can trivially make a copy. We generally don't use use const refs as return values in KDE APIs unless there is a compelling reason to do so --- core/daemon.cpp | 2 +- core/daemon.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/daemon.cpp b/core/daemon.cpp index d90518675..94a92f98c 100644 --- a/core/daemon.cpp +++ b/core/daemon.cpp @@ -123,7 +123,7 @@ Device *Daemon::getDevice(const QString &deviceId) return nullptr; } -const QSet &Daemon::getLinkProviders() const +QSet Daemon::getLinkProviders() const { return d->m_linkProviders; } diff --git a/core/daemon.h b/core/daemon.h index ebad9b28c..7f476132a 100644 --- a/core/daemon.h +++ b/core/daemon.h @@ -43,7 +43,7 @@ public: Device *getDevice(const QString &deviceId); - const QSet &getLinkProviders() const; + QSet getLinkProviders() const; QStringList pairingRequests() const;