chore: formatter
C++ / fmt (pull_request) Successful in 14s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 7s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 28s
Rust / build (pull_request) Successful in 48s
Python / verify (pull_request) Successful in 1m40s
Rust / fmt (pull_request) Successful in 38s
Rust / clippy (pull_request) Successful in 50s

This commit is contained in:
2026-09-28 13:14:48 +02:00
parent 4c3d38f023
commit f2ce4862cc
3 changed files with 19 additions and 18 deletions
+2 -1
View File
@@ -193,7 +193,8 @@ void Chat::refreshFromServer() {
void Chat::selectModel(const QString& id) {
if (id.isEmpty()) return;
m_client->setModel(id);
if (auto* config = config::ConfigSingleton::instance()) config->llm()->set_model(id);
if (auto* config = config::ConfigSingleton::instance())
config->llm()->set_model(id);
}
} // namespace ZShell::llm
+7 -8
View File
@@ -45,8 +45,7 @@ void Memory::tick() {
QStringLiteral("MemTotal: *(\\d+)"));
static const QRegularExpression reAvail(
QStringLiteral("MemAvailable: *(\\d+)"));
static const QRegularExpression reCached(QStringLiteral(
"Cached: *(\\d+)"));
static const QRegularExpression reCached(QStringLiteral("Cached: *(\\d+)"));
const QString text = QString::fromLatin1(data);
const auto totalMatch = reTotal.match(text);
@@ -78,14 +77,14 @@ void Memory::tick() {
const auto pgin = rePgin.match(vtext);
const auto pgout = rePgout.match(vtext);
if (pgin.hasMatch()) {
readKib = static_cast<quint64>(static_cast<double>(
pgin.captured(1).toULongLong()) *
pageKib);
readKib = static_cast<quint64>(
static_cast<double>(pgin.captured(1).toULongLong()) *
pageKib);
}
if (pgout.hasMatch()) {
writeKib = static_cast<quint64>(static_cast<double>(
pgout.captured(1).toULongLong()) *
pageKib);
writeKib = static_cast<quint64>(
static_cast<double>(pgout.captured(1).toULongLong()) *
pageKib);
}
}
}
+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);