feat(logs): narrate what pacman and flatpak really run

Changing screen is not an operation, and a navigation line per click buried
the entries that matter. Providers now narrate the work itself instead: the
exact command, the fallbacks and the counts, through a Qt-free trace sink that
reaches the journal only, so the status bar stays short.
This commit is contained in:
BlackAngelTV committed 2026-10-03 22:38:00 +02:00
1 parent 3ca9c412d2
commit 28bef75bf6
8 files changed
+157 -48

No files matched your search

+2 -22
View File
@@ -908,25 +908,8 @@ void MainWindow::setupShortcuts() {
// ---------------------------------------------------------------------------
void MainWindow::onNavChanged(int id) {
qCDebug(pacmgrUi) << "navigate to page" << id;
QString pageName;
switch (id) {
case NavDashboard: pageName = tr("tableau de bord"); break;
case NavSearch: pageName = tr("recherche"); break;
case NavInstalled: pageName = tr("installés"); break;
case NavUpdates: pageName = tr("mises à jour"); break;
case NavCleanup: pageName = tr("nettoyage"); break;
case NavHistory: pageName = tr("historique"); break;
case NavLogs: pageName = tr("logs"); break;
case NavPlugins: pageName = tr("plugins"); break;
default: break;
}
LogManager::instance().logEvent(
QStringLiteral("ui"),
pageName.isEmpty() ? tr("navigation → page %1").arg(id)
: tr("navigation → %1").arg(pageName));
// Navigating is not something the journal narrates: changing screen is not
// an operation, and a line per click buries the ones that are.
switch (id) {
case NavDashboard:
m_pages->setCurrentWidget(m_dashboard);
@@ -984,9 +967,6 @@ void MainWindow::onOpenPage(const QString& pageId) {
// ways in. Everything a navigation button does for free — switching the stacked
// widget, reloading, retitling, journalling — is done here instead.
void MainWindow::openSettingsPage() {
LogManager::instance().logEvent(QStringLiteral("ui"),
tr("navigation → paramètres"));
// Nothing stays selected in the sidebar: the settings screen is not one of
// the places it lists, and leaving the previous entry highlighted would
// point at the wrong screen. The group has to stop being exclusive first,