mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
clean: convert navPronounce connect to new syntax
This commit is contained in:
parent
cfe1a1c8c0
commit
6498bd4f17
|
@ -233,8 +233,9 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
|||
navPronounce->setEnabled( false );
|
||||
navToolbar->widgetForAction( navPronounce )->setObjectName( "soundButton" );
|
||||
|
||||
connect( navPronounce, SIGNAL( triggered() ),
|
||||
this, SLOT( pronounce() ) );
|
||||
connect( navPronounce, &QAction::triggered, [ this ]() {
|
||||
getCurrentArticleView()->playSound();
|
||||
} );
|
||||
|
||||
// zooming
|
||||
// named separator (to be able to hide it via CSS)
|
||||
|
@ -1910,8 +1911,9 @@ void MainWindow::pageLoaded( ArticleView * view )
|
|||
|
||||
updatePronounceAvailability();
|
||||
|
||||
if ( cfg.preferences.pronounceOnLoadMain )
|
||||
pronounce( view );
|
||||
if ( cfg.preferences.pronounceOnLoadMain && view != nullptr ) {
|
||||
view->playSound();
|
||||
}
|
||||
|
||||
//updateFoundInDictsList();
|
||||
}
|
||||
|
@ -1970,14 +1972,6 @@ void MainWindow::dictionaryBarToggled( bool )
|
|||
applyMutedDictionariesState(); // Visibility change affects searches and results
|
||||
}
|
||||
|
||||
void MainWindow::pronounce( ArticleView * view )
|
||||
{
|
||||
if ( view )
|
||||
view->playSound();
|
||||
else
|
||||
getCurrentArticleView()->playSound();
|
||||
}
|
||||
|
||||
void MainWindow::showDictsPane( )
|
||||
{
|
||||
if( !ui.dictsPane->isVisible() )
|
||||
|
|
|
@ -329,11 +329,6 @@ private slots:
|
|||
|
||||
void dictionaryBarToggled( bool checked );
|
||||
|
||||
/// Pronounces the currently displayed word by playing its first audio
|
||||
/// reference, if it has any.
|
||||
/// If view is 0, the operation is done for the currently open tab.
|
||||
void pronounce( ArticleView * view = 0 );
|
||||
|
||||
void zoomin();
|
||||
void zoomout();
|
||||
void unzoom();
|
||||
|
|
Loading…
Reference in a new issue