[vlc-commits] [Git][videolan/vlc][master] qt: plugins: reset selection when reloading extensions
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Tue Feb 7 09:20:40 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
4cca6109 by Alexandre Janniaux at 2023-02-07T09:02:25+00:00
qt: plugins: reset selection when reloading extensions
When selecting an extension and reloading them afterwards, the selection
points to invalid data but still represent a valid index for Qt, so the
button More Information is still clickable and will lead to a crash.
Reset the selection when reloading to prevent that.
Fixes #27830
- - - - -
1 changed file:
- modules/gui/qt/dialogs/plugins/plugins.cpp
Changes:
=====================================
modules/gui/qt/dialogs/plugins/plugins.cpp
=====================================
@@ -255,7 +255,10 @@ ExtensionTab::ExtensionTab( qt_intf_t *p_intf_ )
QPushButton *reload = new QPushButton( QIcon( ":/menu/update.svg" ),
qtr( "Reload extensions" ),
this );
- connect( reload, &QPushButton::clicked, EM, &ExtensionsManager::reloadExtensions );
+ connect( reload, &QPushButton::clicked, [this, EM](){
+ extList->clearSelection();
+ EM->reloadExtensions();
+ });
connect( reload, &QPushButton::clicked, this, &ExtensionTab::updateButtons );
connect( extList->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &ExtensionTab::updateButtons );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4cca6109e2a003c5e7260a9d760b2feee22ed036
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4cca6109e2a003c5e7260a9d760b2feee22ed036
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list