mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
replace dictionary vector with QMap
remove signal DictGroupWidget::showDictionaryInfo
This commit is contained in:
parent
c664ac315c
commit
0560785a65
|
@ -481,6 +481,7 @@ QString generateRandomDictionaryId();
|
|||
|
||||
QMap< std::string, sptr< Dictionary::Class > >
|
||||
dictToMap( std::vector< sptr< Dictionary::Class > > const & dicts );
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -585,8 +585,7 @@ void DictGroupsWidget::populate( Config::Groups const & groups,
|
|||
{
|
||||
DictGroupWidget *gr = new DictGroupWidget( this, *allDicts, groups[ x ] );
|
||||
addTab( gr, escapeAmps( groups[ x ].name ) );
|
||||
connect( gr, SIGNAL( showDictionaryInfo( QString const & ) ),
|
||||
this, SIGNAL( showDictionaryInfo( QString const & ) ) );
|
||||
// connect( gr, &DictGroupWidget::showDictionaryInfo,this, &DictGroupsWidget::showDictionaryInfo );
|
||||
connect( gr->getModel(), SIGNAL( contentChanged() ), this, SLOT( tabDataChanged() ) );
|
||||
|
||||
setCurrentIndex( x );
|
||||
|
|
|
@ -1346,9 +1346,7 @@ void MainWindow::makeDictionaries()
|
|||
loadDictionaries( this, isVisible(), cfg, dictionaries, dictNetMgr, false );
|
||||
|
||||
//create map
|
||||
for(const auto &dict:dictionaries){
|
||||
dictMap.insert(dict->getId(),dict);
|
||||
}
|
||||
dictMap = Dictionary::dictToMap(dictionaries);
|
||||
|
||||
for( unsigned x = 0; x < dictionaries.size(); x++ )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue