mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
code clean: format
This commit is contained in:
parent
8fc762a57b
commit
aaea8d8e04
|
@ -180,7 +180,7 @@ QString ArticleView::runJavaScriptSync(QWebEnginePage* frame, const QString& var
|
|||
QString result;
|
||||
QSharedPointer<QEventLoop> loop = QSharedPointer<QEventLoop>(new QEventLoop());
|
||||
QTimer::singleShot(1000, loop.data(), &QEventLoop::quit);
|
||||
frame->runJavaScript(variable, [loop,&result](const QVariant &v)
|
||||
frame->runJavaScript(variable, [=,&result](const QVariant &v)
|
||||
{
|
||||
if(loop->isRunning()){
|
||||
if(v.isValid())
|
||||
|
@ -758,7 +758,7 @@ void ArticleView::tryMangleWebsiteClickedUrl( QUrl & url, Contexts & contexts )
|
|||
|
||||
void ArticleView::updateCurrentArticleFromCurrentFrame( QWebEnginePage * frame ,QPoint * point)
|
||||
{
|
||||
qDebug("updateCurrentArticleFromCurrentFrame");
|
||||
|
||||
}
|
||||
|
||||
void ArticleView::saveHistoryUserData()
|
||||
|
@ -973,16 +973,14 @@ QString ArticleView::getMutedForGroup( unsigned group )
|
|||
return QString();
|
||||
}
|
||||
|
||||
QStringList ArticleView::getMutedDictionaries(unsigned group)
|
||||
{
|
||||
if (dictionaryBarToggled && dictionaryBarToggled->isChecked())
|
||||
{
|
||||
QStringList ArticleView::getMutedDictionaries(unsigned group) {
|
||||
if (dictionaryBarToggled && dictionaryBarToggled->isChecked()) {
|
||||
// Dictionary bar is active -- mute the muted dictionaries
|
||||
Instances::Group const* groupInstance = groups.findGroup(group);
|
||||
Instances::Group const *groupInstance = groups.findGroup(group);
|
||||
|
||||
// Find muted dictionaries for current group
|
||||
Config::Group const* grp = cfg.getGroup(group);
|
||||
Config::MutedDictionaries const* mutedDictionaries;
|
||||
Config::Group const *grp = cfg.getGroup(group);
|
||||
Config::MutedDictionaries const *mutedDictionaries;
|
||||
if (group == Instances::Group::AllGroupId)
|
||||
mutedDictionaries = popupView ? &cfg.popupMutedDictionaries : &cfg.mutedDictionaries;
|
||||
else
|
||||
|
@ -992,12 +990,9 @@ QStringList ArticleView::getMutedDictionaries(unsigned group)
|
|||
|
||||
QStringList mutedDicts;
|
||||
|
||||
if (groupInstance)
|
||||
{
|
||||
for (unsigned x = 0; x < groupInstance->dictionaries.size(); ++x)
|
||||
{
|
||||
QString id = QString::fromStdString(
|
||||
groupInstance->dictionaries[x]->getId());
|
||||
if (groupInstance) {
|
||||
for (unsigned x = 0; x < groupInstance->dictionaries.size(); ++x) {
|
||||
QString id = QString::fromStdString(groupInstance->dictionaries[x]->getId());
|
||||
|
||||
if (mutedDictionaries->contains(id))
|
||||
mutedDicts.append(id);
|
||||
|
|
Loading…
Reference in a new issue