From e9ef83f4c672cdd9cc40217db201f44b3bb892cb Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 8 Dec 2020 11:19:38 +0100 Subject: Don't call non-const method on temporary container ...as it may detach. Fix the following clazy warning: Don't call QList::first() on temporary [clazy-detaching-temporary]. Change-Id: I667c122c42ccfc1344508154466d9c1dc6ae6166 Reviewed-by: hjk --- src/plugins/qmlprofiler/qmlprofilerdetailsrewriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/qmlprofiler/qmlprofilerdetailsrewriter.cpp') diff --git a/src/plugins/qmlprofiler/qmlprofilerdetailsrewriter.cpp b/src/plugins/qmlprofiler/qmlprofilerdetailsrewriter.cpp index 3be8aff25b3..f12e6f97786 100644 --- a/src/plugins/qmlprofiler/qmlprofilerdetailsrewriter.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerdetailsrewriter.cpp @@ -118,7 +118,7 @@ void QmlProfilerDetailsRewriter::requestDetailsForLocation(int typeId, QString QmlProfilerDetailsRewriter::getLocalFile(const QString &remoteFile) { - const QString localFile = m_projectFinder.findFile(remoteFile).first().toString(); + const QString localFile = m_projectFinder.findFile(remoteFile).constFirst().toString(); const QFileInfo fileInfo(localFile); if (!fileInfo.exists() || !fileInfo.isReadable()) return QString(); -- cgit v1.2.3