opt: rename emitDicts signal to dictionaryChanges

This commit is contained in:
Xiao YiFang 2022-05-14 17:22:34 +08:00
parent 609cfa74b5
commit eda434f38e
3 changed files with 5 additions and 5 deletions

View file

@ -733,19 +733,19 @@ void ArticleRequest::bodyFinished()
{
update();
qDebug() << "send dicts(stemmed):" << word << ":" << dictIds;
emit GlobalBroadcaster::instance()->emitDictIds(ActiveDictIds{word, dictIds});
emit GlobalBroadcaster::instance()->dictionaryChanges(ActiveDictIds{word, dictIds});
dictIds.clear();
}
else {
finish();
qDebug() << "send dicts(finished):" << word << ":" << dictIds;
emit GlobalBroadcaster::instance()->emitDictIds(ActiveDictIds{word, dictIds});
emit GlobalBroadcaster::instance()->dictionaryChanges(ActiveDictIds{word, dictIds});
dictIds.clear();
}
} else if (wasUpdated) {
update();
qDebug() << "send dicts(updated):" << word << ":" << dictIds;
emit GlobalBroadcaster::instance()->emitDictIds(ActiveDictIds{word, dictIds});
emit GlobalBroadcaster::instance()->dictionaryChanges(ActiveDictIds{word, dictIds});
dictIds.clear();
}
}

View file

@ -347,7 +347,7 @@ ArticleView::ArticleView( QWidget * parent, ArticleNetworkAccessManager & nm, Au
// Variable name for store current selection range
rangeVarName = QString( "sr_%1" ).arg( QString::number( (quint64)this, 16 ) );
connect(GlobalBroadcaster::instance(), SIGNAL( emitDictIds(ActiveDictIds)), this,
connect(GlobalBroadcaster::instance(), SIGNAL( dictionaryChanges(ActiveDictIds)), this,
SLOT(setActiveDictIds(ActiveDictIds)));
channel = new QWebChannel(ui.definition->page());

View file

@ -22,7 +22,7 @@ public:
GlobalBroadcaster( QObject * parent = nullptr );
static GlobalBroadcaster * instance();
signals:
void emitDictIds( ActiveDictIds ad );
void dictionaryChanges( ActiveDictIds ad );
};
#endif // GLOBAL_GLOBALBROADCASTER_H