Merge branch 'feat/fwspacm-plugin-packages' into release-1.6.0
This commit is contained in:
29 files changed
+2107
-1047
No files matched your search
+17
-14
@@ -21,7 +21,7 @@ class QThread;
|
||||
class SearchWorker;
|
||||
class ListWorker;
|
||||
class InstallWorker;
|
||||
class PluginShop;
|
||||
class PluginPackage;
|
||||
|
||||
// Logic layer: everything the application *does*. It owns the providers
|
||||
// (pacman, Flatpak, AUR, ...), the plugin registry, the history, the privileged
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
PluginManager* plugins() const { return m_plugins; }
|
||||
HistoryManager* history() const { return m_history; }
|
||||
UpdateManager* updateManager() const { return m_update; }
|
||||
PluginShop* shop() const { return m_shop; }
|
||||
PluginPackage* packages() const { return m_packages; }
|
||||
// User preferences (journal, drag & drop, language, update policy). The
|
||||
// core reads them to decide whether a version check may run; the Settings
|
||||
// screen writes them. Shared process-wide, hence the accessor rather than
|
||||
@@ -117,6 +117,10 @@ public:
|
||||
// Whether any available provider knows that file, so the window only accepts
|
||||
// drops it can act on.
|
||||
bool canInstallFile(const QString& path) const;
|
||||
// Whether a file is a plugin package (.fwspacm). Packages are not installed
|
||||
// by a provider: they carry a plugin, they are not packages to install, so
|
||||
// they never take the sudo gate and never enter the file install queue.
|
||||
bool isPluginPackage(const QString& path) const;
|
||||
// Bulk removal: one command per provider, run one provider at a time
|
||||
// (pacman locks its database for the whole operation).
|
||||
StartResult removePackages(const std::vector<PackageInfo>& packages,
|
||||
@@ -153,13 +157,13 @@ public:
|
||||
void setPluginEnabled(const std::string& pluginId, bool enabled);
|
||||
void reloadPlugins();
|
||||
|
||||
// ---- Plugin shop ----
|
||||
// Fetches the catalogue the shop offers and installs/removes one of its
|
||||
// entries. Installing drops the shared library in the per-user plugin
|
||||
// directory and reloads the registry, so the plugin is usable right away.
|
||||
void loadPluginCatalog();
|
||||
void installShopPlugin(const QString& id);
|
||||
void removeShopPlugin(const QString& id);
|
||||
// ---- Plugin packages ----
|
||||
// Installs a .fwspacm package (the archive the packaging script builds) and
|
||||
// removes one that was installed this way. Installing writes the shared
|
||||
// library in the per-user plugin directory and reloads the registry, so the
|
||||
// plugin is usable right away.
|
||||
void installPluginPackage(const QString& path);
|
||||
void removePluginPackage(const QString& id);
|
||||
|
||||
// ---- Application self-update ----
|
||||
// Whether a version check may run right now: the daily check is not asked
|
||||
@@ -202,10 +206,9 @@ signals:
|
||||
void statusMessage(const QString& message);
|
||||
void historyChanged();
|
||||
void pluginsChanged();
|
||||
// The shop's catalogue was fetched (or failed to be), and an install or a
|
||||
// removal from it finished.
|
||||
void pluginCatalogChanged();
|
||||
void shopInstallFinished(const QString& id, bool success, const QString& message);
|
||||
// A plugin package was installed or removed (or the attempt was refused).
|
||||
void pluginPackageInstalled(const QString& id, bool success, const QString& message);
|
||||
void pluginPackageRemoved(const QString& id, bool success, const QString& message);
|
||||
void updateCheckFinished(bool hasUpdate, const QString& latestVersion,
|
||||
const QString& errorMessage);
|
||||
void selfUpdateFinished(bool success, const QString& message);
|
||||
@@ -266,7 +269,7 @@ private:
|
||||
void clearCredentialsAfterUse();
|
||||
|
||||
PluginManager* m_plugins = nullptr;
|
||||
PluginShop* m_shop = nullptr;
|
||||
PluginPackage* m_packages = nullptr;
|
||||
PacmanManager* m_pacman = nullptr; // non-owning, for sudo credentials and the lock
|
||||
HistoryManager* m_history = nullptr;
|
||||
UpdateManager* m_update = nullptr;
|
||||
|
||||
Reference in new issue
Block a user