mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
fix: headword dialog assert exception
This commit is contained in:
parent
53ce63fbf5
commit
034e5e8378
|
@ -81,12 +81,12 @@ void HeadwordListModel::requestFinished()
|
||||||
filtered << w;
|
filtered << w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( filtered.isEmpty() )
|
||||||
|
return;
|
||||||
|
|
||||||
beginInsertRows( QModelIndex(), words.size(), words.size() + filtered.count() - 1 );
|
beginInsertRows( QModelIndex(), words.size(), words.size() + filtered.count() - 1 );
|
||||||
|
|
||||||
for( const auto & word : filtered )
|
for( const auto & word : filtered )
|
||||||
words.append( word );
|
words.append( word );
|
||||||
|
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue