From 428261e2932e9413b1ed5322848e8df067f59ee1 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Fri, 17 Dec 2021 18:03:40 +0200 Subject: Fix build on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both GCC and Clang don't require a const integral value to be captured explicitly to be used in a lambda, but of course one compiler thinks otherwise... Thanks to Ömer Fadıl Usta for the heads up. GIT_SILENT --- src/core/kdesktopfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/kdesktopfile.cpp') diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp index 644646df..aa510dec 100644 --- a/src/core/kdesktopfile.cpp +++ b/src/core/kdesktopfile.cpp @@ -123,7 +123,7 @@ bool KDesktopFile::isAuthorizedDesktopFile(const QString &path) // Check if the .desktop file is installed as part of KDE or XDG. const QStringList appsDirs = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation); - auto it = std::find_if(appsDirs.cbegin(), appsDirs.cend(), [&realPath](const QString &prefix) { + auto it = std::find_if(appsDirs.cbegin(), appsDirs.cend(), [&realPath, sensitivity](const QString &prefix) { QFileInfo info(prefix); return info.exists() && info.isDir() && realPath.startsWith(info.canonicalFilePath(), sensitivity); }); -- cgit v1.2.1