ExtensionManager: Introduce extensions service response parser and model

This adds a parser for the JSON response of the extension rest API. The
data, combined with the PluginSpecs of local plugins, serve as data
model for the extension mode view.

A couple of "packs" are provided as test data.

Change-Id: I5ce961a9de9bf54ca745e5e5a5e584b1698e6ac6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Alessandro Portale
2024-05-29 16:00:22 +02:00
parent fb2a1ecd37
commit 1a1d938170
14 changed files with 1234 additions and 512 deletions

View File

@@ -3,27 +3,19 @@
#include <coreplugin/welcomepagehelper.h>
QT_BEGIN_NAMESPACE
class QTextBrowser;
QT_END_NAMESPACE
namespace ExtensionManager::Internal {
class CollapsingWidget;
class ExtensionsBrowser;
class ExtensionManagerWidget final : public Core::ResizeSignallingWidget
{
public:
explicit ExtensionManagerWidget();
explicit ExtensionManagerWidget(QWidget *parent = nullptr);
~ExtensionManagerWidget();
private:
void updateView(const QModelIndex &current, [[maybe_unused]] const QModelIndex &previous);
void updateView(const QModelIndex &current);
void fetchAndInstallPlugin(const QUrl &url);
ExtensionsBrowser *m_leftColumn;
CollapsingWidget *m_secondarDescriptionWidget;
QTextBrowser *m_primaryDescription;
QTextBrowser *m_secondaryDescription;
class ExtensionManagerWidgetPrivate *d = nullptr;
};
} // ExtensionManager::Internal