fix:currentIndexChanged slot does not match

This commit is contained in:
xiaoyifang 2022-04-01 23:32:11 +08:00
parent 5d2426c805
commit 8b9544bc17
2 changed files with 6 additions and 6 deletions

View file

@ -3755,8 +3755,8 @@ void MainWindow::applyWordsZoomLevel()
groupList->setFont( font ); groupList->setFont( font );
groupList->fill( groupInstances ); groupList->fill( groupInstances );
groupList->setCurrentIndex( n ); groupList->setCurrentIndex( n );
connect( groupList, SIGNAL( currentIndexChanged( QString const & ) ), connect( groupList, &GroupComboBox::currentIndexChanged,
this, SLOT( currentGroupChanged( QString const & ) ) ); this, &MainWindow::currentGroupChanged );
} }
wordsZoomBase->setEnabled( cfg.preferences.wordsZoomLevel != 0 ); wordsZoomBase->setEnabled( cfg.preferences.wordsZoomLevel != 0 );

View file

@ -421,15 +421,15 @@ void ScanPopup::applyWordsZoomLevel()
if ( ui.groupList->font().pointSize() != ps ) if ( ui.groupList->font().pointSize() != ps )
{ {
disconnect( ui.groupList, SIGNAL( currentIndexChanged( QString const & ) ), disconnect( ui.groupList, &GroupComboBox::currentIndexChanged,
this, SLOT( currentGroupChanged( QString const & ) ) ); this, &ScanPopup::currentGroupChanged );
int n = ui.groupList->currentIndex(); int n = ui.groupList->currentIndex();
ui.groupList->clear(); ui.groupList->clear();
ui.groupList->setFont( font ); ui.groupList->setFont( font );
ui.groupList->fill( groups ); ui.groupList->fill( groups );
ui.groupList->setCurrentIndex( n ); ui.groupList->setCurrentIndex( n );
connect( ui.groupList, SIGNAL( currentIndexChanged( QString const & ) ), connect( ui.groupList, &GroupComboBox::currentIndexChanged,
this, SLOT( currentGroupChanged( QString const & ) ) ); this, &ScanPopup::currentGroupChanged );
} }
ui.outerFrame->layout()->activate(); ui.outerFrame->layout()->activate();