On main: cline checkpoint session=1789068735674_bk9xf run=1

This commit is contained in:
git stash committed 2026-09-10 21:32:16 +02:00
commit f894c2a69c
11 files changed
+700 -112

No files matched your search

+33 -1
View File
@@ -10,6 +10,7 @@
#include <QComboBox>
#include <QThread>
#include <QSettings>
#include <QSystemTrayIcon>
#include <string>
#include <vector>
@@ -28,6 +29,7 @@ class QListWidgetItem;
class QButtonGroup;
class QFrame;
class QAction;
class QSystemTrayIcon;
// Runs a package search off the UI thread. Queries every given provider and
// merges the results, tagging each package with its provider id.
@@ -104,6 +106,11 @@ private slots:
void onNavChanged(int id);
void onClearHistory();
void onRefreshLogs();
void onExportHistory();
void onExportPackageList();
void onLogsFilterChanged();
void onPreviewUpdates();
void onTrayActivated(QSystemTrayIcon::ActivationReason reason);
void onHistoryFilterChanged();
void onInstalledFilterChanged(const QString& text);
void onRecentActivityClicked(QListWidgetItem* item);
@@ -133,7 +140,16 @@ private:
// Show the provider's last error in a dialog when one is available, so a
// failed operation explains itself instead of failing silently.
void showProviderError(const QString& title, IPackageManager* provider);
// Returns true when the error was a locked pacman DB (caller may offer
// a retry once the lock is gone).
bool showProviderError(const QString& title, IPackageManager* provider);
// Re-runs the given privileged action. Used by the "Réessayer" button
// on db-lock errors: the lock (other manager / stale db.lck) is often
// gone by the time the user retries.
void retryPrivilegedAction(const QString& action);
QString m_pendingRetryAction;
void setupUI();
void setupSidebar();
@@ -150,6 +166,7 @@ private:
void refreshRecentActivity();
void refreshPluginsTable();
void updatePackageInfo(const PackageInfo& pkg);
std::string richDetails(const PackageInfo& pkg);
void resetDetailsPanel();
void setBrowseMode(BrowseMode mode);
void performInstall(const std::string& package);
@@ -158,11 +175,18 @@ private:
void appendPackageRows(const std::vector<PackageInfo>& results);
void addPackageRow(int row, const PackageInfo& pkg);
void setBusy(bool busy);
// Single privileged op at a time (pacman DB lock). Returns false + a
// status message when an operation already runs.
bool tryAcquireOp();
void reloadCurrentView();
void loadInstalled();
void loadUpdates();
void refreshHistoryTable();
void loadLogs();
void applyLogsFilter();
void setupTray();
void setupShortcuts();
void notifyUpdatesAvailable(int count);
QFrame* makeCard();
QFrame* makeStatCard(const QString& iconName, const QString& title, QLabel** valueOut);
@@ -217,6 +241,11 @@ private:
// Logs page
QTextEdit* m_logsText = nullptr;
QLineEdit* m_logsFilter = nullptr;
QString m_logsRaw;
// Tray (optional: hidden when the desktop has no system tray)
QSystemTrayIcon* m_tray = nullptr;
// Plugins page
QTableWidget* m_pluginTable = nullptr;
@@ -231,6 +260,9 @@ private:
HistoryManager* m_historyManager = nullptr;
UpdateManager* m_updateManager = nullptr; // checks Gitea releases (owned)
BrowseMode m_browseMode = ModeSearch;
// True while a privileged op (or blocking load) runs; guards the pacman
// DB lock against concurrent operations from double-clicks.
bool m_busy = false;
// Settings
QSettings m_settings;