Skip to content

Commit 966e2d6

Browse files
committed
Make QgsOptionsDialogBase's slots virtual for overriding in derived clases with non-standard tabs (fixes broken tab behaviour in Plugin manager)
1 parent 17aa88c commit 966e2d6

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

python/gui/qgsoptionsdialogbase.sip

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ class QgsOptionsDialogBase : QDialog
127127
%End
128128

129129
protected slots:
130-
void updateOptionsListVerticalTabs();
131-
void optionsStackedWidget_CurrentChanged( int indx );
132-
void optionsStackedWidget_WidgetRemoved( int indx );
130+
virtual void updateOptionsListVerticalTabs();
131+
virtual void optionsStackedWidget_CurrentChanged( int indx );
132+
virtual void optionsStackedWidget_WidgetRemoved( int indx );
133+
133134
void warnAboutMissingObjects();
134135

135136
protected:

src/app/pluginmanager/qgspluginmanager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class QgsPluginManager : public QgsOptionsDialogBase, private Ui::QgsPluginManag
172172
void showHelp();
173173

174174
//! Reimplement QgsOptionsDialogBase method to prevent modifying the tab list by signals from the stacked widget
175-
void optionsStackedWidget_CurrentChanged( int indx ) { Q_UNUSED( indx ) }
175+
void optionsStackedWidget_CurrentChanged( int indx ) override { Q_UNUSED( indx ) };
176176

177177
//! Only show plugins from selected repository (e.g. for inspection)
178178
void setRepositoryFilter();

src/gui/qgsoptionsdialogbase.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,10 @@ class GUI_EXPORT QgsOptionsDialogBase : public QDialog
158158
void searchText( const QString &text );
159159

160160
protected slots:
161-
void updateOptionsListVerticalTabs();
162-
void optionsStackedWidget_CurrentChanged( int indx );
163-
void optionsStackedWidget_WidgetRemoved( int indx );
161+
virtual void updateOptionsListVerticalTabs();
162+
virtual void optionsStackedWidget_CurrentChanged( int indx );
163+
virtual void optionsStackedWidget_WidgetRemoved( int indx );
164+
164165
void warnAboutMissingObjects();
165166

166167
protected:

0 commit comments

Comments
 (0)