summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-12 15:52:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-13 09:22:40 +0200
commit54a97eb9ddd66294f303189ca12ef726177453cb (patch)
treefc068c028f44ef859021bf4b1a66daa29491a20d /vcl/qt5
parent72f631977435a704008a55d3be6489ba619e3064 (diff)
clang-tidy modernize-pass-by-value in vcl
Change-Id: I9ddb786eb88213c53cf53067ced6899ca40ac6e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137000 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtClipboard.cxx5
-rw-r--r--vcl/qt5/QtFilePicker.cxx5
-rw-r--r--vcl/qt5/QtFontFace.cxx6
-rw-r--r--vcl/qt5/QtSvpSurface.cxx4
-rw-r--r--vcl/qt5/QtXAccessible.cxx3
5 files changed, 13 insertions, 10 deletions
diff --git a/vcl/qt5/QtClipboard.cxx b/vcl/qt5/QtClipboard.cxx
index 5d1a167a92a2..c9a7683c422d 100644
--- a/vcl/qt5/QtClipboard.cxx
+++ b/vcl/qt5/QtClipboard.cxx
@@ -22,12 +22,13 @@
#include <cassert>
#include <map>
+#include <utility>
-QtClipboard::QtClipboard(const OUString& aModeString, const QClipboard::Mode aMode)
+QtClipboard::QtClipboard(OUString aModeString, const QClipboard::Mode aMode)
: cppu::WeakComponentImplHelper<css::datatransfer::clipboard::XSystemClipboard,
css::datatransfer::clipboard::XFlushableClipboard,
XServiceInfo>(m_aMutex)
- , m_aClipboardName(aModeString)
+ , m_aClipboardName(std::move(aModeString))
, m_aClipboardMode(aMode)
, m_bOwnClipboardChange(false)
, m_bDoClear(false)
diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx
index 392e4f800925..8a13ec67235c 100644
--- a/vcl/qt5/QtFilePicker.cxx
+++ b/vcl/qt5/QtFilePicker.cxx
@@ -65,6 +65,7 @@
#include <unx/geninst.h>
#include <fpicker/strings.hrc>
+#include <utility>
using namespace ::com::sun::star;
using namespace ::com::sun::star::ui::dialogs;
@@ -84,10 +85,10 @@ uno::Sequence<OUString> FilePicker_getSupportedServiceNames()
}
}
-QtFilePicker::QtFilePicker(css::uno::Reference<css::uno::XComponentContext> const& context,
+QtFilePicker::QtFilePicker(css::uno::Reference<css::uno::XComponentContext> context,
QFileDialog::FileMode eMode, bool bUseNative)
: QtFilePicker_Base(m_aHelperMutex)
- , m_context(context)
+ , m_context(std::move(context))
, m_bIsFolderPicker(eMode == QFileDialog::Directory)
, m_pParentWidget(nullptr)
, m_pFileDialog(new QFileDialog(nullptr, {}, QDir::homePath()))
diff --git a/vcl/qt5/QtFontFace.cxx b/vcl/qt5/QtFontFace.cxx
index 291d7e90fdef..e97bee11d078 100644
--- a/vcl/qt5/QtFontFace.cxx
+++ b/vcl/qt5/QtFontFace.cxx
@@ -35,6 +35,7 @@
#include <QtGui/QFontDatabase>
#include <QtGui/QFontInfo>
#include <QtGui/QRawFont>
+#include <utility>
using namespace vcl;
@@ -160,10 +161,9 @@ QtFontFace* QtFontFace::fromQFontDatabase(const QString& aFamily, const QString&
FontIdType::FontDB);
}
-QtFontFace::QtFontFace(const FontAttributes& rFA, const QString& rFontID,
- const FontIdType eFontIdType)
+QtFontFace::QtFontFace(const FontAttributes& rFA, QString aFontID, const FontIdType eFontIdType)
: PhysicalFontFace(rFA)
- , m_aFontId(rFontID)
+ , m_aFontId(std::move(aFontID))
, m_eFontIdType(eFontIdType)
, m_bFontCapabilitiesRead(false)
{
diff --git a/vcl/qt5/QtSvpSurface.cxx b/vcl/qt5/QtSvpSurface.cxx
index a2a39c12b387..944110847267 100644
--- a/vcl/qt5/QtSvpSurface.cxx
+++ b/vcl/qt5/QtSvpSurface.cxx
@@ -33,10 +33,10 @@ Size get_surface_size(cairo_surface_t* surface)
namespace cairo
{
-QtSvpSurface::QtSvpSurface(const CairoSurfaceSharedPtr& pSurface)
+QtSvpSurface::QtSvpSurface(CairoSurfaceSharedPtr pSurface)
: m_pGraphics(nullptr)
, m_pCairoContext(nullptr)
- , m_pSurface(pSurface)
+ , m_pSurface(std::move(pSurface))
{
}
diff --git a/vcl/qt5/QtXAccessible.cxx b/vcl/qt5/QtXAccessible.cxx
index c8ef055a2429..25c0c5e9e120 100644
--- a/vcl/qt5/QtXAccessible.cxx
+++ b/vcl/qt5/QtXAccessible.cxx
@@ -17,12 +17,13 @@
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <sal/log.hxx>
+#include <utility>
using namespace css::accessibility;
using namespace css::uno;
QtXAccessible::QtXAccessible(Reference<XAccessible> xAccessible)
- : m_xAccessible(xAccessible)
+ : m_xAccessible(std::move(xAccessible))
{
}