diff --git a/editdictionaries.cc b/editdictionaries.cc index 9c0cc68d..91ce1149 100644 --- a/editdictionaries.cc +++ b/editdictionaries.cc @@ -48,7 +48,7 @@ EditDictionaries::EditDictionaries( QWidget * parent, Config::Class & cfg_, connect( &sources, SIGNAL( rescan() ), this, SLOT( rescanSources() ) ); connect( groups.get(), SIGNAL( showDictionaryInfo( QString const & ) ), - this, SLOT( showDictionaryInfo(QString const & ) ) ); + this, SIGNAL( showDictionaryInfo(QString const & ) ) ); } void EditDictionaries::editGroup( unsigned id ) @@ -236,17 +236,3 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) origCfg.inactiveDictionaries = orderAndProps->getCurrentInactiveDictionaries(); } } - -void EditDictionaries::showDictionaryInfo( QString const & dictId ) -{ - unsigned n; - for( n = 0; n < dictionaries.size(); n++ ) - if( dictId.compare( QString::fromUtf8( dictionaries[ n ]->getId().c_str() ) ) == 0 ) - break; - if( n < dictionaries.size() ) - { - DictInfo infoMsg( cfg, this ); - infoMsg.showInfo( dictionaries[ n ] ); - infoMsg.exec(); - } -} diff --git a/editdictionaries.hh b/editdictionaries.hh index 13b2d600..dd2a01eb 100644 --- a/editdictionaries.hh +++ b/editdictionaries.hh @@ -47,6 +47,8 @@ private slots: void rescanSources(); +signals: + void showDictionaryInfo( QString const & dictId ); private: diff --git a/mainwindow.cc b/mainwindow.cc index 3ac31fe0..e1692e01 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -1707,6 +1707,9 @@ void MainWindow::editDictionaries( unsigned editDictionaryGroup ) Config::Class newCfg = cfg; EditDictionaries dicts( this, newCfg, dictionaries, groupInstances, dictNetMgr ); + connect( &dicts, SIGNAL( showDictionaryInfo( QString const & ) ), + this, SLOT( showDictionaryInfo( QString const & ) ) ); + if ( editDictionaryGroup != Instances::Group::NoGroupId ) dicts.editGroup( editDictionaryGroup );