diff --git a/src/article_maker.cc b/src/article_maker.cc index 70d13b2e..d576792a 100644 --- a/src/article_maker.cc +++ b/src/article_maker.cc @@ -524,7 +524,11 @@ void ArticleRequest::altSearchFinished() QString requestUrl = Utils::WebSite::urlReplaceWord( QString::fromStdString( url ), word ); emit GlobalBroadcaster::instance() - -> websiteDictionary( QString::fromStdString( activeDict->getName() ), requestUrl ); + -> websiteDictionarySignal( QString::fromStdString( activeDict->getName() ), requestUrl ); + QStringList dictIds; + dictIds << QString::fromStdString( activeDict->getId() ); + ActiveDictIds hittedWord{ group.id, word, dictIds }; + emit GlobalBroadcaster::instance() -> dictionaryChanges( hittedWord ); continue; } } diff --git a/src/common/globalbroadcaster.hh b/src/common/globalbroadcaster.hh index 36c262b6..1f9112d2 100644 --- a/src/common/globalbroadcaster.hh +++ b/src/common/globalbroadcaster.hh @@ -47,7 +47,7 @@ signals: void indexingDictionary( QString ); - void websiteDictionary( QString, QString ); + void websiteDictionarySignal( QString, QString ); }; #endif // GLOBAL_GLOBALBROADCASTER_H diff --git a/src/ui/articleview.cc b/src/ui/articleview.cc index 3b347567..4984642b 100644 --- a/src/ui/articleview.cc +++ b/src/ui/articleview.cc @@ -96,9 +96,10 @@ void ArticleView::setupWebview() auto * baseLayout = new QVBoxLayout( this ); this->tabWidget = new QTabWidget( this ); + baseLayout->setContentsMargins( 0, 0, 0, 0 ); baseLayout->addWidget( this->tabWidget ); - QWidget * tab1 = new QWidget( tabWidget ); + auto * tab1 = new QWidget( tabWidget ); // Layout auto * mainLayout = new QVBoxLayout( tab1 ); mainLayout->addWidget( this->webview ); diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 7cd7615b..9569320b 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -715,7 +715,7 @@ MainWindow::MainWindow( Config::Class & cfg_ ): this, &MainWindow::showFTSIndexingName ); connect( GlobalBroadcaster::instance(), - &GlobalBroadcaster::websiteDictionary, + &GlobalBroadcaster::websiteDictionarySignal, this, &MainWindow::openWebsiteInNewTab ); @@ -2149,7 +2149,7 @@ void MainWindow::updateFoundInDictsList() if ( dictionaries[ x ]->getId() == i->toUtf8().data() ) { QString dictName = QString::fromUtf8( dictionaries[ x ]->getName().c_str() ); QString dictId = QString::fromUtf8( dictionaries[ x ]->getId().c_str() ); - QListWidgetItem * item = + auto * item = new QListWidgetItem( dictionaries[ x ]->getIcon(), dictName, ui.dictsList, QListWidgetItem::Type ); item->setData( Qt::UserRole, QVariant( dictId ) ); item->setToolTip( dictName ); @@ -2163,7 +2163,7 @@ void MainWindow::updateFoundInDictsList() } } - //if no item in dict List panel has been choose ,select first one. + //if no item in dict List panel has been choosen ,select first one. if ( ui.dictsList->count() > 0 && ui.dictsList->selectedItems().empty() ) { ui.dictsList->setCurrentRow( 0 ); }