Skip to content

Commit

Permalink
avoid wrong usage of QStringBuilder via auto type deduction
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mgallien committed Aug 22, 2024
1 parent fd59381 commit 3409627
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 1485 in src/gui/folder.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/folder.cpp:1485:15 [readability-identifier-length]

variable name 'fi' is too short, expected at least 3 characters
if (!FileSystem::fileExists(fullPath))
return;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/proxyauthhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void ProxyAuthHandler::handleProxyAuthenticationRequired(
}

const auto account = qobject_cast<Account *>(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) {
Expand Down

0 comments on commit 3409627

Please sign in to comment.