chore: formatter

This commit is contained in:
2026-09-30 14:26:59 +02:00
parent 10d763cfe5
commit 4a021d81ac
2 changed files with 17 additions and 17 deletions
+10 -9
View File
@@ -793,8 +793,7 @@ void ProcessModel::scanChunk(
nowTicks > prevTicks ? nowTicks - prevTicks : 0;
entry.cpuPercent =
(static_cast<double>(deltaTicks) /
(ctx.deltaSecs *
static_cast<double>(ctx.clockTicksPerSec))) *
(ctx.deltaSecs * static_cast<double>(ctx.clockTicksPerSec))) *
100.0;
} else {
entry.cpuPercent = 0.0;
@@ -839,7 +838,8 @@ ProcessModel::ScanResult ProcessModel::scanProcesses(
// syscall-bound (open/read/close per file per process) and serializes
// badly on large systems. Keep one pool thread free for this function,
// which itself runs inside the global pool.
int nThreads = qMin(16, QThreadPool::globalInstance()->maxThreadCount() - 1);
int nThreads =
qMin(16, QThreadPool::globalInstance()->maxThreadCount() - 1);
if (pids.size() < 128 || nThreads < 2) {
nThreads = 1;
}
@@ -860,8 +860,8 @@ ProcessModel::ScanResult ProcessModel::scanProcesses(
continue;
}
chunks[t] = pids.mid(a, b - a);
futures.append(QtConcurrent::run(
[&ctx, &chunks, &outs, &uidParts, t]() {
futures.append(
QtConcurrent::run([&ctx, &chunks, &outs, &uidParts, t]() {
scanChunk(ctx, chunks[t], outs[t], uidParts[t]);
}));
}
@@ -880,8 +880,9 @@ ProcessModel::ScanResult ProcessModel::scanProcesses(
}
}
std::sort(
fresh.begin(), fresh.end(), [](const ProcessEntry& a,
const ProcessEntry& b) {
fresh.begin(),
fresh.end(),
[](const ProcessEntry& a, const ProcessEntry& b) {
return a.pid < b.pid;
});
}
@@ -1012,8 +1013,8 @@ void ProcessModel::applyView() {
const FuzzyText prep = fuzzyPrepare(src.command);
fe.commandChars = std::move(prep.chars);
fe.commandClasses = std::move(prep.classes);
fe.hasCommandLine =
!src.commandLine.isEmpty() && src.commandLine != src.command;
fe.hasCommandLine = !src.commandLine.isEmpty() &&
src.commandLine != src.command;
if (fe.hasCommandLine) {
const FuzzyText prepCl = fuzzyPrepare(src.commandLine);
fe.commandLineChars = std::move(prepCl.chars);