From 316af5c13ff8c3f17b146d01432eebbf4d306de2 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Wed, 21 Aug 2024 18:16:42 +0200 Subject: [PATCH] avoid wrong usage of QStringBuilder via auto type deduction detected via https://github.com/KDE/clazy/blob/master/docs/checks/README-auto-unexpected-qstringbuilder.md#auto-unexpected-qstringbuilder also reported by g++ via compile time warnings Signed-off-by: Matthieu Gallien --- src/gui/folder.cpp | 2 +- src/gui/proxyauthhandler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 3aad88a0f..5c7620c6a 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -1481,7 +1481,7 @@ void Folder::warnOnNewExcludedItem(const SyncJournalFileRecord &record, const QS // Note: This assumes we're getting file watcher notifications // for folders only on creation and deletion - if we got a notification // on content change that would create spurious warnings. - const auto fullPath = _canonicalLocalPath + path; + const auto fullPath = QString{_canonicalLocalPath + path}; QFileInfo fi(fullPath); if (!FileSystem::fileExists(fullPath)) return; diff --git a/src/gui/proxyauthhandler.cpp b/src/gui/proxyauthhandler.cpp index 13228e2d5..360f0dec4 100644 --- a/src/gui/proxyauthhandler.cpp +++ b/src/gui/proxyauthhandler.cpp @@ -58,7 +58,7 @@ void ProxyAuthHandler::handleProxyAuthenticationRequired( } const auto account = qobject_cast(sender()); - const auto key = proxy.hostName() + QLatin1Char(':') + QString::number(proxy.port()); + const auto key = QString{proxy.hostName() + QLatin1Char(':') + QString::number(proxy.port())}; // If the proxy server has changed, forget what we know. if (key != _proxy) { -- 2.30.2