mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
6.2: currentIndexChanged signal is changed.
This commit is contained in:
parent
7b5511a7bd
commit
23d833fbb8
|
@ -677,11 +677,11 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
|||
connect( ui.showReference, SIGNAL( triggered() ),
|
||||
this, SLOT( showGDHelp() ) );
|
||||
|
||||
connect( groupListInDock, SIGNAL( currentIndexChanged( QString const & ) ),
|
||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
||||
connect( groupListInDock, &GroupComboBox::currentIndexChanged,
|
||||
this, &MainWindow::currentGroupChanged );
|
||||
|
||||
connect( groupListInToolbar, SIGNAL( currentIndexChanged( QString const & ) ),
|
||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
||||
connect( groupListInToolbar, &GroupComboBox::currentIndexChanged,
|
||||
this, &MainWindow::currentGroupChanged );
|
||||
|
||||
connect( ui.translateLine, SIGNAL( textChanged( QString const & ) ),
|
||||
this, SLOT( translateInputChanged( QString const & ) ) );
|
||||
|
@ -1391,8 +1391,8 @@ void MainWindow::updateGroupList()
|
|||
|
||||
// currentIndexChanged() signal is very trigger-happy. To avoid triggering
|
||||
// it, we disconnect it while we're clearing and filling back groups.
|
||||
disconnect( groupList, SIGNAL( currentIndexChanged( QString const & ) ),
|
||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
||||
disconnect( groupList, &GroupComboBox::currentIndexChanged,
|
||||
this, &MainWindow::currentGroupChanged );
|
||||
|
||||
groupInstances.clear();
|
||||
|
||||
|
@ -1437,8 +1437,8 @@ void MainWindow::updateGroupList()
|
|||
view.reload();
|
||||
}
|
||||
|
||||
connect( groupList, SIGNAL( currentIndexChanged( QString const & ) ),
|
||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
||||
connect( groupList, &GroupComboBox::currentIndexChanged,
|
||||
this, &MainWindow::currentGroupChanged );
|
||||
}
|
||||
|
||||
void MainWindow::updateDictionaryBar()
|
||||
|
@ -2255,7 +2255,7 @@ void MainWindow::editPreferences()
|
|||
ftsIndexing.doIndexing();
|
||||
}
|
||||
|
||||
void MainWindow::currentGroupChanged( QString const & )
|
||||
void MainWindow::currentGroupChanged( int )
|
||||
{
|
||||
cfg.lastMainGroupId = groupList->getCurrentGroup();
|
||||
Instances::Group const * igrp = groupInstances.findGroup( cfg.lastMainGroupId );
|
||||
|
@ -3740,8 +3740,8 @@ void MainWindow::applyWordsZoomLevel()
|
|||
|
||||
if ( groupList->font().pointSize() != ps )
|
||||
{
|
||||
disconnect( groupList, SIGNAL( currentIndexChanged( QString const & ) ),
|
||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
||||
disconnect( groupList, &GroupComboBox::currentIndexChanged,
|
||||
this, &MainWindow::currentGroupChanged );
|
||||
int n = groupList->currentIndex();
|
||||
groupList->clear();
|
||||
groupList->setFont( font );
|
||||
|
|
|
@ -377,7 +377,7 @@ private slots:
|
|||
void editCurrentGroup();
|
||||
void editPreferences();
|
||||
|
||||
void currentGroupChanged( QString const & );
|
||||
void currentGroupChanged( int );
|
||||
void translateInputChanged( QString const & );
|
||||
void translateInputFinished( bool checkModifiers = true );
|
||||
|
||||
|
|
|
@ -254,8 +254,8 @@ ScanPopup::ScanPopup( QWidget * parent,
|
|||
connect( &switchExpandModeAction, SIGNAL( triggered() ),
|
||||
this, SLOT(switchExpandOptionalPartsMode() ) );
|
||||
|
||||
connect( ui.groupList, SIGNAL( currentIndexChanged( QString const & ) ),
|
||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
||||
connect( ui.groupList, &QComboBox::currentIndexChanged,
|
||||
this, &ScanPopup::currentGroupChanged);
|
||||
|
||||
connect( &wordFinder, SIGNAL( finished() ),
|
||||
this, SLOT( prefixMatchFinished() ) );
|
||||
|
@ -717,8 +717,7 @@ QString ScanPopup::elideInputWord()
|
|||
QString const & inputWord = inputPhrase.phrase;
|
||||
return inputWord.size() > 32 ? inputWord.mid( 0, 32 ) + "..." : inputWord;
|
||||
}
|
||||
|
||||
void ScanPopup::currentGroupChanged( QString const & )
|
||||
void ScanPopup::currentGroupChanged( int )
|
||||
{
|
||||
cfg.lastPopupGroupId = ui.groupList->getCurrentGroup();
|
||||
Instances::Group const * igrp = groups.findGroup( cfg.lastPopupGroupId );
|
||||
|
|
|
@ -194,7 +194,7 @@ private:
|
|||
private slots:
|
||||
void clipboardChanged( QClipboard::Mode );
|
||||
void mouseHovered( QString const & , bool forcePopup);
|
||||
void currentGroupChanged( QString const & );
|
||||
void currentGroupChanged( int );
|
||||
void prefixMatchFinished();
|
||||
void on_pronounceButton_clicked();
|
||||
void pinButtonClicked( bool checked );
|
||||
|
|
Loading…
Reference in a new issue