Skip to content

Commit 57faed4

Browse files
committed
[Plugin Manager] Small cleanups: don't connect redundant signal, remove unused condition.
1 parent 9254e49 commit 57faed4

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

src/app/pluginmanager/qgspluginmanager.cpp

-19
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ QgsPluginManager::QgsPluginManager( QWidget *parent, bool pluginsAreEnabled, Qt:
6868
mPythonUtils = nullptr;
6969

7070
setupUi( this );
71-
connect( vwPlugins, &QListView::clicked, this, &QgsPluginManager::vwPlugins_clicked );
7271
connect( vwPlugins, &QListView::doubleClicked, this, &QgsPluginManager::vwPlugins_doubleClicked );
7372
connect( wvDetails, &QgsWebView::linkClicked, this, &QgsPluginManager::wvDetails_linkClicked );
7473
connect( leFilter, &QgsFilterLineEdit::textChanged, this, &QgsPluginManager::leFilter_textChanged );
@@ -1241,31 +1240,13 @@ void QgsPluginManager::setCurrentTab( int idx )
12411240

12421241

12431242
void QgsPluginManager::currentPluginChanged( const QModelIndex &index )
1244-
{
1245-
if ( index.column() == 0 )
1246-
{
1247-
// Do exactly the same as if a plugin was clicked
1248-
vwPlugins_clicked( index );
1249-
}
1250-
}
1251-
1252-
1253-
1254-
void QgsPluginManager::vwPlugins_clicked( const QModelIndex &index )
12551243
{
12561244
if ( index.column() == 0 )
12571245
{
12581246
// If the model has been filtered, the index row in the proxy won't match the index row in the underlying model
12591247
// so we need to jump through this little hoop to get the correct item
12601248
QModelIndex realIndex = mModelProxy->mapToSource( index );
12611249
QStandardItem *mypItem = mModelPlugins->itemFromIndex( realIndex );
1262-
if ( !mypItem->isEnabled() )
1263-
{
1264-
//The item is inactive (uncompatible or broken plugin), so it can't be selected. Display it's data anyway.
1265-
vwPlugins->clearSelection();
1266-
}
1267-
// Display details in any case: selection changed, inactive button clicked,
1268-
// or previously selected plugin clicked (while details view contains the welcome message for a category)
12691250
showPluginDetails( mypItem );
12701251
}
12711252
}

src/app/pluginmanager/qgspluginmanager.h

-3
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ class QgsPluginManager : public QgsOptionsDialogBase, private Ui::QgsPluginManag
111111
//! Load/unload plugin when checkbox state changed
112112
void pluginItemChanged( QStandardItem *item );
113113

114-
//! Display details of inactive item too
115-
void vwPlugins_clicked( const QModelIndex &index );
116-
117114
//! Load/unload plugin by double-click
118115
void vwPlugins_doubleClicked( const QModelIndex &index );
119116

0 commit comments

Comments
 (0)