mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge pull request #7718 from Diff-fusion/improve-log-speed
Log path strings directly instead of accumulating
This commit is contained in:
commit
55059ec464
@ -1216,12 +1216,14 @@ void SyncEngine::setLocalDiscoveryOptions(LocalDiscoveryStyle style, std::set<QS
|
||||
_localDiscoveryStyle = style;
|
||||
_localDiscoveryPaths = std::move(paths);
|
||||
|
||||
const auto allPaths = std::accumulate(_localDiscoveryPaths.begin(), _localDiscoveryPaths.end(), QString{}, [] (auto first, auto second) -> QString {
|
||||
first += ", " + second;
|
||||
return first;
|
||||
});
|
||||
|
||||
qCInfo(lcEngine()) << "paths to discover locally" << allPaths;
|
||||
if (lcEngine().isInfoEnabled() && !_localDiscoveryPaths.empty()) {
|
||||
// only execute if logging is enabled
|
||||
auto debug = qInfo(lcEngine);
|
||||
debug << "paths to discover locally";
|
||||
for (auto path : _localDiscoveryPaths) {
|
||||
debug << path;
|
||||
}
|
||||
}
|
||||
|
||||
// Normalize to make sure that no path is a contained in another.
|
||||
// Note: for simplicity, this code consider anything less than '/' as a path separator, so for
|
||||
|
||||
Loading…
Reference in New Issue
Block a user