ExtensionManager: Refresh View after installing

Change-Id: Id4963d52d07aaf8f7e5a3904f95dc3accf204f80
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Marcus Tillmanns
2025-01-21 14:19:26 +01:00
parent 75c8b2f674
commit 6afdb96832
3 changed files with 8 additions and 0 deletions

View File

@@ -721,6 +721,7 @@ void ExtensionManagerWidget::fetchAndInstallPlugin(const QUrl &url, const QStrin
storage, storage,
NetworkQueryTask{onQuerySetup, onQueryDone}, NetworkQueryTask{onQuerySetup, onQueryDone},
Sync{onPluginInstallation}, Sync{onPluginInstallation},
Sync{[this]() { updateView(m_extensionBrowser->currentIndex()); }},
NetworkQueryTask{onDownloadSetup, onDownloadDone}, NetworkQueryTask{onDownloadSetup, onDownloadDone},
}; };

View File

@@ -697,6 +697,11 @@ void ExtensionsBrowser::showEvent(QShowEvent *event)
QWidget::showEvent(event); QWidget::showEvent(event);
} }
QModelIndex ExtensionsBrowser::currentIndex() const
{
return d->selectionModel->currentIndex();
}
void ExtensionsBrowser::fetchExtensions() void ExtensionsBrowser::fetchExtensions()
{ {
#ifdef WITH_TESTS #ifdef WITH_TESTS

View File

@@ -32,6 +32,8 @@ public:
void showEvent(QShowEvent *event) override; void showEvent(QShowEvent *event) override;
QModelIndex currentIndex() const;
signals: signals:
void itemSelected(const QModelIndex &current, const QModelIndex &previous); void itemSelected(const QModelIndex &current, const QModelIndex &previous);