Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[Plugin Manager] Small cleanups: don't connect redundant signal, remo…
- Loading branch information
|
@@ -68,7 +68,6 @@ QgsPluginManager::QgsPluginManager( QWidget *parent, bool pluginsAreEnabled, Qt: |
|
|
mPythonUtils = nullptr; |
|
|
|
|
|
setupUi( this ); |
|
|
connect( vwPlugins, &QListView::clicked, this, &QgsPluginManager::vwPlugins_clicked ); |
|
|
connect( vwPlugins, &QListView::doubleClicked, this, &QgsPluginManager::vwPlugins_doubleClicked ); |
|
|
connect( wvDetails, &QgsWebView::linkClicked, this, &QgsPluginManager::wvDetails_linkClicked ); |
|
|
connect( leFilter, &QgsFilterLineEdit::textChanged, this, &QgsPluginManager::leFilter_textChanged ); |
|
@@ -1241,31 +1240,13 @@ void QgsPluginManager::setCurrentTab( int idx ) |
|
|
|
|
|
|
|
|
void QgsPluginManager::currentPluginChanged( const QModelIndex &index ) |
|
|
{ |
|
|
if ( index.column() == 0 ) |
|
|
{ |
|
|
// Do exactly the same as if a plugin was clicked |
|
|
vwPlugins_clicked( index ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void QgsPluginManager::vwPlugins_clicked( const QModelIndex &index ) |
|
|
{ |
|
|
if ( index.column() == 0 ) |
|
|
{ |
|
|
// If the model has been filtered, the index row in the proxy won't match the index row in the underlying model |
|
|
// so we need to jump through this little hoop to get the correct item |
|
|
QModelIndex realIndex = mModelProxy->mapToSource( index ); |
|
|
QStandardItem *mypItem = mModelPlugins->itemFromIndex( realIndex ); |
|
|
if ( !mypItem->isEnabled() ) |
|
|
{ |
|
|
//The item is inactive (uncompatible or broken plugin), so it can't be selected. Display it's data anyway. |
|
|
vwPlugins->clearSelection(); |
|
|
} |
|
|
// Display details in any case: selection changed, inactive button clicked, |
|
|
// or previously selected plugin clicked (while details view contains the welcome message for a category) |
|
|
showPluginDetails( mypItem ); |
|
|
} |
|
|
} |
|
|
|
@@ -111,9 +111,6 @@ class QgsPluginManager : public QgsOptionsDialogBase, private Ui::QgsPluginManag |
|
|
//! Load/unload plugin when checkbox state changed |
|
|
void pluginItemChanged( QStandardItem *item ); |
|
|
|
|
|
//! Display details of inactive item too |
|
|
void vwPlugins_clicked( const QModelIndex &index ); |
|
|
|
|
|
//! Load/unload plugin by double-click |
|
|
void vwPlugins_doubleClicked( const QModelIndex &index ); |
|
|
|
|
|